pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
 error on „ 38.5. Query Language (SQL) Functions“: a single row is returned
2+ messages / 2 participants
[nested] [flat]

*  error on „ 38.5. Query Language (SQL) Functions“: a single row is returned
@ 2022-09-18 08:44 PG Doc comments form <noreply@postgresql.org>
  2022-09-18 15:01 ` Re: error on „ 38.5. Query Language (SQL) Functions“: a single row is returned Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2022-09-18 08:44 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: code@lhorn.de

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/xfunc-sql.html
Description:

On the page „ 38.5. Query Language (SQL) Functions“ below the example

CREATE FUNCTION new_emp() RETURNS emp AS $$
    SELECT ROW('None', 1000.0, 25, '(2,2)')::emp;
$$ LANGUAGE SQL;

this sentence is wrong:

„ Here we wrote a SELECT that returns just a single column of the correct
composite type.“

It is not a single column but a single row that is returned.


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: error on „ 38.5. Query Language (SQL) Functions“: a single row is returned
  2022-09-18 08:44  error on „ 38.5. Query Language (SQL) Functions“: a single row is returned PG Doc comments form <noreply@postgresql.org>
@ 2022-09-18 15:01 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2022-09-18 15:01 UTC (permalink / raw)
  To: code@lhorn.de; +Cc: pgsql-docs@lists.postgresql.org

PG Doc comments form <noreply@postgresql.org> writes:
> The following documentation comment has been logged on the website:
> Page: https://www.postgresql.org/docs/14/xfunc-sql.html
> Description:

> On the page „ 38.5. Query Language (SQL) Functions“ below the example

> CREATE FUNCTION new_emp() RETURNS emp AS $$
>     SELECT ROW('None', 1000.0, 25, '(2,2)')::emp;
> $$ LANGUAGE SQL;

> this sentence is wrong:

> „ Here we wrote a SELECT that returns just a single column of the correct
> composite type.“

> It is not a single column but a single row that is returned.

It's also a single column, which is more relevant to the point being
made.  Compare this to the immediately preceding example.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2022-09-18 15:01 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-18 08:44  error on „ 38.5. Query Language (SQL) Functions“: a single row is returned PG Doc comments form <noreply@postgresql.org>
2022-09-18 15:01 ` Tom Lane <tgl@sss.pgh.pa.us>

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