Re: "SELECT FROM foo" acts like "SELECT COUNT(*) FROM foo"? - Mailing list pgsql-general

From David G. Johnston
Subject Re: "SELECT FROM foo" acts like "SELECT COUNT(*) FROM foo"?
Date
Msg-id CAKFQuwb1ZRNwcdCaKvmzv3AgZLR87kDt3coWAqXeE+xNSwTRhA@mail.gmail.com
Whole thread Raw
In response to "SELECT FROM foo" acts like "SELECT COUNT(*) FROM foo"?  (Ron <ronljohnsonjr@gmail.com>)
List pgsql-general

On Wednesday, February 1, 2023, Ron <ronljohnsonjr@gmail.com> wrote:

https://www.postgresql.org/docs/12/sql-select.html

The docs say that one of these are required in the SELECT list.
[ * | expression [ [ AS ] output_name ] [, ...] ]

The square brackets you show are how optional elements are introduced so while those two options exists neither are required.

David J. 

pgsql-general by date:

Previous
From: Rodrigo Luna
Date:
Subject: Re: FATAL: database "xxx" does not exist when it does
Next
From: Rodrigo Luna
Date:
Subject: Re: FATAL: database "xxx" does not exist when it does