Re: Bug report for plpgsql

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Slivaev Dmitry <dmitry(dot)slivaev(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Bug report for plpgsql
Date: 2024-11-29 15:48:56
Message-ID: CAFj8pRDFnUzSySSWos64TzkvbUBO3Eq79mgXLbsSPy4ps+UHqQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi

pá 29. 11. 2024 v 16:41 odesílatel David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> napsal:

> On Thursday, November 28, 2024, Slivaev Dmitry <dmitry(dot)slivaev(at)gmail(dot)com>
> wrote:
>
>> Postrgesql version
>>
>> PostgreSQL 17.0 (Debian 17.0-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
>>
>>
>> *Description:*
>> When a RETURNS TABLE function in PL/pgSQL includes a column name that
>> matches a column in a table being targeted for an ON CONFLICT clause,
>> PostgreSQL throws an error stating that the column reference is ambiguous.
>> This happens even though the context of ON CONFLICT unambiguously refers
>> to table column names, not PL/pgSQL variables.
>> This behavior leads to unexpected errors in scenarios where the
>> function's RETURNS TABLE includes columns with the same name as those in
>> the target table. Explicit qualification of column names in ON CONFLICT
>> (e.g., table.column) also fails to resolve the issue.
>>
>
> Yes, this is a known limitation that has a very low priority for being
> fixed. You can find more discussion on the mailing list archives.
>
>
> https://www.postgresql.org/message-id/CAKFQuwb1AxxOBR-0BkUwZypjs8tqdFLSsTa46Xwxkkm+xdQxbg@mail.gmail.com
>

Maybe this issue could be documented. Today is zero documented.

Regards

Pavel

> David J.
>
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message yuansong 2024-12-01 13:09:41 Re:Re:Re:Re: backup server core when redo btree_xlog_insert that type is XLOG_BTREE_INSERT_POST
Previous Message David G. Johnston 2024-11-29 15:41:11 Re: Bug report for plpgsql