Re: column names query

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: column names query
Date: 2017-09-07 16:33:55
Message-ID: ce7c5ed7-8d9a-af90-c31c-c24e5e153cef@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/7/2017 12:18 AM, hamann(dot)w(at)t-online(dot)de wrote:
> is there a simple way to retrieve column names from a query - basically the way psql adds
> column headings when I do a select?

if you're using libpq to do your queries, PQfname(*result,
column_number) returns the name of that column number.

there are equivalent functions in most other APIs.

--
john r pierce, recycling bits in santa cruz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2017-09-07 22:07:18 Re: WAL & ready files retained after turning off log shipping
Previous Message Jeff Janes 2017-09-07 16:08:21 Re: Confused about max_standby_streaming_delay