Re: BUG #18190: PL/pgSQL does not document comparison operations on RECORD (or ROW) types

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #18190: PL/pgSQL does not document comparison operations on RECORD (or ROW) types
Дата
Msg-id CAKFQuwa53Li4gL-orx6Cwt47rB6OvKzzppHHJubH7wvhZc9jSA@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #18190: PL/pgSQL does not document comparison operations on RECORD (or ROW) types  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #18190: PL/pgSQL does not document comparison operations on RECORD (or ROW) types  ("Karl O. Pinc" <kop@karlpinc.com>)
Список pgsql-bugs
On Friday, November 10, 2023, PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      18190
Logged by:          Karl Pinc
Email address:      kop@karlpinc.com
PostgreSQL version: 15.4
Operating system:   Linux
Description:       

Nothing is said about how to compare entire RECORD type variables, or ROW
type variables.

There is, in the chapters with the word compare in their titles.




This leads to surprising behavior in the code below.

You couldn’t make something less difficult to read?  Like a self-contained select that shows true when you expected false?  Or even a DO block with no dynamic SQL?

    IF problem IS NOT NULL THEN

As noted in the docs, “not (composite is null)” is not equivalent to “composite is not null”; you usually want the former.


If the issue is documentation, the PL/pgSQL docs should link to the
composite type docs, or the expression docs, or type conversion, or where
ever the current documentation is that I can't find or that needs to be
written.


The behavior involved is in no way specific to pl/pgsql; it doesn’t seem warranted to choose to link to SQL documentation from pl/pgsql generally.  The writer of such code can reference the SQL docs for any SQL they need to write.

David J.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: AW: BUG #18189: Value partitioned tables: Upd ERROR: more than one row returned by a subquery used as an expression
Следующее
От: "Karl O. Pinc"
Дата:
Сообщение: Re: BUG #18190: PL/pgSQL does not document comparison operations on RECORD (or ROW) types