Re: INSERT ... ON CONFLICT doesn't work

2021-12-01 Thread Jenda Krynicky
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

Re: INSERT ... ON CONFLICT doesn't work

2021-12-01 Thread Jenda Krynicky
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 ... ) > >

Re: INSERT ... ON CONFLICT doesn't work

2021-12-01 Thread Jenda Krynicky
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 "Uui

Re: INSERT ... ON CONFLICT doesn't work

2021-12-01 Thread Jenda Krynicky
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

INSERT ... ON CONFLICT doesn't work

2021-12-01 Thread Jenda Krynicky
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