On 12/1/21 20:20, Michael Lewis wrote:
Perhaps I missed something, but why all this effort to reference the
column and not just reference IX_Lockers_Uuid for the on conflict clause?
Two reasons:
1) The OP thought that ON CONFLICT could only reference a column.
2) Explaining why the error occu
Perhaps I missed something, but why all this effort to reference the column
and not just reference IX_Lockers_Uuid for the on conflict clause?
On 12/1/21 12:55, Adrian Klaver wrote:
On 12/1/21 11:43, Jenda Krynicky wrote:
From: Adrian Klaver
On 12/1/21 11:20 AM, Jenda Krynicky wrote:
While the ON CONFLICT () very explicitely insists on there being a
name of a column of the table being inserted into. Makes nonsense.
On 12/1/21 11:43, Jenda Krynicky wrote:
From: Adrian Klaver
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 colum
On Wed, Dec 1, 2021 at 1:04 PM Jenda Krynicky wrote:
> I did not create the table and I did not forget the quotes. I removed
> them in one of many attempts to appease PostgreSQL. I've already
> learned about those braindead rules.
>
>
Nothing is perfect, especially something that started decades
"Jenda Krynicky" writes:
> From: Tom Lane
>> It's also possible to qualify the name in the ON CONFLICT clause,
>> although I think you have to parenthesize it to do so:
>> ... ON CONFLICT (("Lockers"."Uuid"))
> ERROR: invalid reference to FROM-clause entry for table "Lockers"
>
From: "David G. Johnston"
> On Wed, Dec 1, 2021 at 12:44 PM Jenda Krynicky wrote:
>
> > How's that a variable for gawd's sake? It's a column name too! A
> > column name in the definition of the resulting table.
> >
>
> The columns of the returns table are provided to the function as variables
>
From: Tom Lane
> "David G. Johnston" writes:
> > On Wed, Dec 1, 2021 at 12:21 PM Jenda Krynicky wrote:
> >> THERE IS NO (CENSORED) VARIABLE "Uuid"!
>
> > Yes, there is. RETURNS TABLE (... "Uuid" text ... )
>
> > Changing that to something else should remove the ambiguity. I
On Wed, Dec 1, 2021 at 12:59 PM David G. Johnston <
david.g.johns...@gmail.com> wrote:
> On Wed, Dec 1, 2021 at 12:52 PM Tom Lane wrote:
>
>> It's also possible to qualify the name in the ON CONFLICT clause,
>> although I think you have to parenthesize it to do so:
>>
>> ... ON CONFLICT (("Locker
On Wed, Dec 1, 2021 at 12:52 PM Tom Lane wrote:
> It's also possible to qualify the name in the ON CONFLICT clause,
> although I think you have to parenthesize it to do so:
>
> ... ON CONFLICT (("Lockers"."Uuid"))
>
>
This really needs to be confirmed and, if so, better documented on the
INSERT p
On Wed, Dec 1, 2021 at 12:44 PM Jenda Krynicky wrote:
> How's that a variable for gawd's sake? It's a column name too! A
> column name in the definition of the resulting table.
>
The columns of the returns table are provided to the function as variables
so that one can write:
output_column1 :=
"David G. Johnston" writes:
> On Wed, Dec 1, 2021 at 12:21 PM Jenda Krynicky wrote:
>> THERE IS NO (CENSORED) VARIABLE "Uuid"!
> Yes, there is. RETURNS TABLE (... "Uuid" text ... )
> Changing that to something else should remove the ambiguity. I agree it is
> not an ideal solution though. I'
From: Adrian Klaver
> 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 bas
From: "David G. Johnston"
> On Wed, Dec 1, 2021 at 12:21 PM Jenda Krynicky wrote:
>
> >
> > CREATE OR REPLACE FUNCTION public.findorcreatelocker(
> > lockeruuid text,
> > ipaddress text)
> > RETURNS TABLE("Id" integer, "Created" timestamp without time
> > zone, "Uuid" text,
On Wed, Dec 1, 2021 at 12:21 PM Jenda Krynicky wrote:
>
> CREATE OR REPLACE FUNCTION public.findorcreatelocker(
> lockeruuid text,
> ipaddress text)
> RETURNS TABLE("Id" integer, "Created" timestamp without time
> zone, "Uuid" text, "State" integer, "ConnectionStatus" integer,
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/c
So let's suppose I have a table like this:
CREATE TABLE IF NOT EXISTS public."Lockers"
(
"Id" integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
"Uuid" text COLLATE pg_catalog."default",
"IpAddress" text COLLATE pg_catalog
17 matches
Mail list logo