From: | 德哥 <digoal(at)126(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re:Re: BUG #16702: inline code and function : when use dynamic name for rowtype, there is some bug! |
Date: | 2020-11-09 13:49:04 |
Message-ID: | 5b81a119.63f0.175ad446e65.Coremail.digoal@126.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)g(dot)johnston(at)gmail(dot)com> 写道:
On Wednesday, November 4, 2020, PG Bug reporting form <noreply(at)postgresql(dot)org> wrote:
The following bug has been logged on the website:
Bug reference: 16702
Logged by: Zhou Digoal
Email address: digoal(at)126(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2020-11-09 14:15:35 | Re: Re: BUG #16702: inline code and function : when use dynamic name for rowtype, there is some bug! |
Previous Message | Amit Kapila | 2020-11-09 10:54:31 | Re: BUG #16643: PG13 - Logical replication - initial startup never finishes and gets stuck in startup loop |