Re: INSERT ... ON CONFLICT doesn't work
От | Adrian Klaver |
---|---|
Тема | Re: INSERT ... ON CONFLICT doesn't work |
Дата | |
Msg-id | e096c99b-75ec-7507-cd6b-c446f2c4b745@aklaver.com обсуждение исходный текст |
Ответ на | INSERT ... ON CONFLICT doesn't work ("Jenda Krynicky" <Jenda@Krynicky.cz>) |
Ответы |
Re: INSERT ... ON CONFLICT doesn't work
|
Список | pgsql-general |
On 12/1/21 11:20 AM, Jenda Krynicky wrote: > So let's suppose I have a table like this: > > > So pretty please with a cherry on top, how do I explain to postgres > 13.4, that yes indeed by "Uuid" I mean the stinking column "Uuid". The basic issue is described here: https://www.postgresql.org/docs/current/plpgsql-implementation.html#PLPGSQL-VAR-SUBST "Since the names of variables are syntactically no different from the names of table columns, there can be ambiguity in statements that also refer to tables: is a given name meant to refer to a table column, or a variable? Let's change the previous example to ..." ERROR: column reference "Uuid" is ambiguous LINE 3: ON CONFLICT ("Uuid") Is occurring because there is ambiguity between: "Uuid" text in RETURNS TABLE and "Lockers"."Uuid" I would say the easiest way out of this is to change: "Uuid" text --> "uuid_out" text > > Jenda > -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: