Re: Show type in psql SELECT

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Mike Toews <mwtoews(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Show type in psql SELECT
Date: 2013-02-23 20:07:35
Message-ID: CAMkU=1zjgPuD7zBAN148N6WMC97ykbUR6C8XoKg1Vht87RtYVw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Feb 23, 2013 at 9:55 AM, David Fetter <david(at)fetter(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2013-02-23 20:30:22 Re: [GENERAL] autoanalyze criteria
Previous Message Jeff Janes 2013-02-23 19:32:31 Re: make: *** pg_xlogdump: No such file or directory. Stop.