Re: \describe*

From: David Fetter <david(at)fetter(dot)org>
To: Ryan Murphy <ryanfmurphy(at)gmail(dot)com>
Cc: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: \describe*
Date: 2018-01-29 14:56:57
Message-ID: 20180129145657.GV3977@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 29, 2018 at 02:51:53PM +0000, Ryan Murphy wrote:
> >
> > >What I propose is in fact a server command, >which at least three of
> > >the other popular RDBMSs already have.
> >
> Well to actually implement it, it would probably be a client command,
> because that's what \d* are.

Why should this command be silo'ed off to the psql client? If it's a
server command, it's available to all clients, not just psql.

> We would most likely want them implemented the same, to avoid
> needless complexity.

We could certainly have \d call DESCRIBE for later versions of the
server. \ commands which call different SQL depending on server
version have long been a standard practice.

> I think people are more ok with \describe (with the backslash), which seems
> like what you're suggesting anyway. I read Vik's "hard pass" as being on
> having DESCRIBE which looks like an SQL command but would actually be
> implemented on the client. This seems simpler at first but could cause
> deep confusion later.

If we implement \d as DESCRIBE for server versions as of when DESCRIBE
is actually implemented, we've got wins all around.

Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-01-29 15:07:38 Re: [HACKERS] MERGE SQL Statement for PG11
Previous Message Robert Haas 2018-01-29 14:55:43 Re: Wait for parallel workers to attach