Re: "SELECT FROM foo" acts like "SELECT COUNT(*) FROM foo"?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Ron <ronljohnsonjr(at)gmail(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: "SELECT FROM foo" acts like "SELECT COUNT(*) FROM foo"?
Date: 2023-02-01 20:18:44
Message-ID: CAKFQuwb1ZRNwcdCaKvmzv3AgZLR87kDt3coWAqXeE+xNSwTRhA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday, February 1, 2023, Ron <ronljohnsonjr(at)gmail(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rodrigo Luna 2023-02-01 20:19:10 Re: FATAL: database "xxx" does not exist when it does
Previous Message Rodrigo Luna 2023-02-01 20:15:37 Re: FATAL: database "xxx" does not exist when it does