RowDescription message

Поиск
Список
Период
Сортировка
Искать

RowDescription message

От:
Tatsuo Ishii <ishii@sraoss.co.jp>
Дата:
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?

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


Re: RowDescription message

От:
Andres Freund <andres@anarazel.de>
Дата:
Hi,

On 2019-10-07 17:00:24 +0900, Tatsuo Ishii wrote:
> 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;


Re: RowDescription message

От:
Tatsuo Ishii <ishii@sraoss.co.jp>
Дата:
>> 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?

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


Re: RowDescription message

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Tatsuo Ishii  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:

  
   Empty <literal>SELECT</literal> Lists

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


			regards, tom lane


Re: RowDescription message

От:
Wim Bertels <wim.bertels@ucll.be>
Дата:
Or
CREATE TABLE t();

SELECT *
FROM t;

Van: Tatsuo Ishii <ishii@sraoss.co.jp>
Verzonden: maandag 7 oktober 2019 10:00
Aan: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Onderwerp: RowDescription message
 
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?

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


FAQ