On Mon, Mar 26, 2007 at 04:37:59PM +0200, Serguei Pronkine wrote:
> How can I now retrieve column number from column name?

Query pg_attribute.

http://www.postgresql.org/docs/8.2/interactive/catalog-pg-attribute.html

Since psql can display object comments you could study the SQL that
it executes:

\set ECHO_HIDDEN
\d+ mytab

-- 
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to