Hello List: I have a situation where I'm doing a select statement of the form: SELECT column_1, column_2, my_func(column_3) AS "column_3", column_4... FROM my_table INNER JOIN other_table ON ... There are several tables involved in the query. Note that "my_func(column_3)" from above does some formatting of the data. I issue the command with PQsendQuery(). When loading a widget with data, I have a need of knowing the table oid from which the data came. I have been using PQftable() to get that information, but when I added the "my_func(column_3)" to the query, the value of PQftable() for each of the columns referenced by calls to my_func() comes back as zero. PQfname() works correctly because I added the AS "column_3" to the query. So, is this the expected behavior or is this a bug? If this is the expected behavior, is there anything I can do to get hold of the table oid as part of the select statement? Using the C api with PostgreSQL version: rnd=# select version(); version -------------------------------------------------------------------------------------------------------------- PostgreSQL 7.4.6 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-49) (1 row) TIA