Home: Perl Programming Help: DBI:
pgsql getting fieldname



toshesh
Novice

Apr 12, 2005, 5:45 PM


Views: 6437
pgsql getting fieldname

Hi everyone,

I am currently using pgsql 7.2.3 and I'm wondering if there's a DBI function that can return just the fieldname of a specific table.

thank you


davorg
Thaumaturge / Moderator

Apr 13, 2005, 5:35 AM


Views: 6435
Re: [toshesh] pgsql getting fieldname

Not sure what you mean. What is a table's "fieldname"?

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


toshesh
Novice

Apr 13, 2005, 5:04 PM


Views: 6428
Re: [davorg] pgsql getting fieldname

Thank you for replying and I apologise for the lack of information.

Fieldname is the Database table's column title ie the columns created

during the CREATE TABLE command.

In the following example DATA1 and DATA2 are the column title(fieldname).

e.g. CREATE TABLE TEST (DATA1 integer, DATA2 integer);


davorg
Thaumaturge / Moderator

Apr 14, 2005, 5:33 AM


Views: 6415
Re: [toshesh] pgsql getting fieldname

Are you asking for a list of the columns contained within a table?

If so, you should look at the column_info method in the DBI module.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks