Re: Show type in psql SELECT - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: Show type in psql SELECT
Date
Msg-id CAMkU=1zjgPuD7zBAN148N6WMC97ykbUR6C8XoKg1Vht87RtYVw@mail.gmail.com
Whole thread Raw
In response to Re: Show type in psql SELECT  (David Fetter <david@fetter.org>)
Responses Re: Show type in psql SELECT
List pgsql-hackers
On Sat, Feb 23, 2013 at 9:55 AM, David Fetter <david@fetter.org> wrote:
On Sat, Feb 23, 2013 at 12:09:51PM +1300, Mike Toews wrote:
> Hi hackers,
>
> Type info can be viewed with "\d mytable", however often I'd like to
> see the type (and typmod) info in SELECT queries with psql, similar
> to pgAdmin III. For example:

I'm thinking we should add it as a SET parameter and expose it to all
SQL.

This information is already provided through libpq, see PQftype.

It is merely a matter of making psql present the data it already has in a way people find convenient.
 
 The next client program(s) shouldn't have to re-invent this
separately.

The client has to decide what to do with this information, I don't see any way around that.  The server can't make that decision for it.

Cheers,

Jeff

pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: make: *** pg_xlogdump: No such file or directory. Stop.
Next
From: Jeff Janes
Date:
Subject: Re: [GENERAL] autoanalyze criteria