PostgreSQL equivalent for mysql_field_flags
Posted: Thu Aug 09, 2007 6:47 am
Hey folks,
I'm looking for a solution to retrieving field flag information for result set fields using PostgreSQL.
There is obviously no function available, which does the same like mysql_field_flags. So I guess a SQL query will be required.
However, I see a problem there, if the SQL query, which produced the previously mentioned result set, contained some attribute renaming:
so there won't be a way to retrieve the desired field flags in every case, on the workaround route; or am I wrong?
I mainly need to know about a result set field, whether it is a primary key or not.
I hope someone knows a solution for this problem :-/
Thanks in advance!
I'm looking for a solution to retrieving field flag information for result set fields using PostgreSQL.
There is obviously no function available, which does the same like mysql_field_flags. So I guess a SQL query will be required.
However, I see a problem there, if the SQL query, which produced the previously mentioned result set, contained some attribute renaming:
Code: Select all
SELECT name as X FROM usersI mainly need to know about a result set field, whether it is a primary key or not.
I hope someone knows a solution for this problem :-/
Thanks in advance!