Re: Information about columns

From: John DeSoi <desoi(at)pgedit(dot)com>
To: Dario Teixeira <darioteixeira(at)yahoo(dot)com>
Cc: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, pgsql-general(at)postgresql(dot)org
Subject: Re: Information about columns
Date: 2009-06-22 18:40:38
Message-ID: 171E2FA9-59E0-4320-9769-CD5505CA83C8@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Jun 22, 2009, at 11:43 AM, Dario Teixeira wrote:

>> How are you talking to the database ? ODBC? JDBC? LibPQ? Something
>> else?
>> Or do you want this from within PL/PgSQL ?
>
> I'm hacking on a client-side library which talks directly to the
> Postmaster
> using the wire protocol [1]. I need this information to improve some
> of the
> nullability-detection heuristics used by the library.

The information you want is always returned from the query as a row
description message. This includes the type oid of real and computed
columns.

See the RowDescription message on this page for details:

http://www.postgresql.org/docs/8.3/static/protocol-message-formats.html

John DeSoi, Ph.D.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mike Toews 2009-06-22 18:41:44 Re: Select ranges based on sequential breaks
Previous Message Tom Lane 2009-06-22 16:52:48 Re: FYI: Load times for a largish DB in 8.2 vs. 8.3 vs. 8.4