Re: Fetching column names for a table

From: Philip Hallstrom <postgresql(at)philip(dot)pjkh(dot)com>
To: Steve Manes <smanes(at)magpie(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Fetching column names for a table
Date: 2005-09-21 18:46:33
Message-ID: 20050921114525.H87170@wolf.pjkh.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I need to extract a SETOF column names for a table in plpgsql. How is this
> done?

Start up psql with the -E option. Then type "\dt tablename". This will
print out the SQL that psql runs to give you the column names. Maybe that
will do what you want?

-philip

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tony Wasson 2005-09-21 19:04:20 Re: Network Flow Schema + Bulk Import/Updates
Previous Message Steve Manes 2005-09-21 18:31:23 Fetching column names for a table