Re:Re: BUG #16702: inline code and function : when use dynamic name for rowtype, there is some bug!

Поиск
Список
Период
Сортировка
От 德哥
Тема Re:Re: BUG #16702: inline code and function : when use dynamic name for rowtype, there is some bug!
Дата
Msg-id 5b81a119.63f0.175ad446e65.Coremail.digoal@126.com
обсуждение исходный текст
Ответ на Re: BUG #16702: inline code and function : when use dynamic name for rowtype, there is some bug!  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Re: BUG #16702: inline code and function : when use dynamic name for rowtype, there is some bug!  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: Re: BUG #16702: inline code and function : when use dynamic name for rowtype, there is some bug!  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs


The customer originally used Oracle. Oracle supports using the table name in the variable name instead, while using the rowType corresponding to the table name of the variable name.


However, in PostgreSQL with the variable % RowType, compilation can pass if the variable has the same name as an existing table. The table name corresponding to the value of the variable name is used as rowType.

However, when the variable name cannot find the table name with the same name, the compilation error is directly reported, which is inconsistent with Oracle.

I think this is a bug, the reason has nothing to do with Oracle, but the execution behavior is biased, either do not replace the value of the variable during the execution, but directly use the table name corresponding to the variable name.

Best regards,
digoal


--公益是一辈子的事,I'm Digoal,Just Do It.


在 2020-11-05 22:15:45,"David G. Johnston" <david.g.johnston@gmail.com> 写道:

On Wednesday, November 4, 2020, PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      16702
Logged by:          Zhou Digoal
Email address:      digoal@126.com
PostgreSQL version: 12.4
Operating system:   CentOS 7.7 x64
Description:       

postgresql 12, when i use dynamic name for rowtype, there is some bug!

  b y%rowtype; 


Rowtype gets attached to an identifier, which must also be a relation.  In PostgreSQL, identifiers cannot be variable.

David J.
 

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: BUG #16643: PG13 - Logical replication - initial startup never finishes and gets stuck in startup loop
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Re: BUG #16702: inline code and function : when use dynamic name for rowtype, there is some bug!