Re: pgsql: Allow empty target list in SELECT.

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thom Brown <thom(at)linux(dot)com>, pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Allow empty target list in SELECT.
Date: 2015-03-25 01:04:40
Message-ID: 20150325010440.GG19256@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Fri, Mar 20, 2015 at 08:25:50AM -0400, Bruce Momjian wrote:
> > regression=# create table foo();
> > CREATE TABLE
> > regression=# insert into foo default values;
> > INSERT 0 1
> > regression=# insert into foo default values;
> > INSERT 0 1
> > regression=# select * from foo;
> > --
> > (2 rows)
> >
> > regression=# \x on
> > Expanded display is on.
> > regression=# select * from foo;
> > (No rows)
>
> I have developed a patch to fix this, e.g.:
>
> test=> select * from foo;
> --
> (2 rows)
>
> test=> \x
> Expanded display is on.
> test=> select * from foo;
> (2 rows)
>
> I used the same footer function every other output format was using.
> Patch attached.

Patch applied.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2015-03-25 01:10:43 pgsql: PL/pgSQL docs: recommend format() for query construction
Previous Message Bruce Momjian 2015-03-25 01:04:16 pgsql: psql: show proper row count in \x mode for zero-column output