pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tatsuo Ishii <ishii@sraoss.co.jp>
Cc: andres@anarazel.de
Cc: pgsql-general@postgresql.org
Subject: Re: RowDescription message
Date: Mon, 07 Oct 2019 09:32:29 -0400
Message-ID: <25427.1570455149@sss.pgh.pa.us> (raw)
In-Reply-To: <20191007.215201.2052961183053680920.t-ishii@sraoss.co.jp>
References: <20191007.170024.989131059222651917.t-ishii@sraoss.co.jp>
	<20191007092722.ilnb7xuylvbelow6@alap3.anarazel.de>
	<20191007.215201.2052961183053680920.t-ishii@sraoss.co.jp>

Tatsuo Ishii <ishii@sraoss.co.jp> writes:
>>> According to the manualof RowDescription message
>>> https://www.postgresql.org/docs/12/protocol-message-formats.html
>>> Specifies the number of fields in a row (can be zero).
>>> Does 0 fields could actually happen?

>> Yes, e.g.:
>> SELECT;

> Thanks. Is it a valid SQL statement according to the standard?

See select.sgml:

  <refsect2>
   <title>Empty <literal>SELECT</literal> Lists</title>

   <para>
    The list of output expressions after <literal>SELECT</literal> can be
    empty, producing a zero-column result table.
    This is not valid syntax according to the SQL standard.
    <productname>PostgreSQL</productname> allows it to be consistent with
    allowing zero-column tables.
    However, an empty list is not allowed when <literal>DISTINCT</literal> is used.
   </para>
  </refsect2>


			regards, tom lane





view thread (5+ messages)  latest in thread

Message-ID: <25427.1570455149@sss.pgh.pa.us>
Permalink:  ../25427.1570455149@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25427.1570455149@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ishii@sraoss.co.jp, andres@anarazel.de
  Subject: Re: RowDescription message
  In-Reply-To: <25427.1570455149@sss.pgh.pa.us>
  References: <20191007.170024.989131059222651917.t-ishii@sraoss.co.jp> <20191007092722.ilnb7xuylvbelow6@alap3.anarazel.de> <20191007.215201.2052961183053680920.t-ishii@sraoss.co.jp> <25427.1570455149@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox