From: | "Jenda Krynicky" <Jenda(at)Krynicky(dot)cz> |
---|---|
To: | "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: INSERT ... ON CONFLICT doesn't work |
Date: | 2021-12-01 20:04:27 |
Message-ID: | 61A7D54B.30766.342986BF@Jenda.Krynicky.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
From: "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
> On Wed, Dec 1, 2021 at 12:44 PM Jenda Krynicky <Jenda(at)krynicky(dot)cz> 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 := 'value';
> output_column2 := 'value';
> return;
>
> Instead of having to do:
> return (output_column1, output_column2);
Yeah ... after I specified that instead of a few scalars I intend to
return a resultset/recordset/table/whatever-you-want-to-call-it and
while using a language that cannot distinguish between columns and
variables even at a place that doesn't accept anything other than a
column name. Right.
> > Right. Because lowercasing everything I write and then comparing it case
> > sensitively to the names of database objects makes a lot of sense. I mean
> > who would want to use capital letters in names of objects in the first
> > place?
> >
>
> Fair point, but you're not going to get much sympathy for not knowing the
> rules of the tool that you are using and the choices you've made regarding
> them. I agree that your quoting everything has merit, but don't go
> complaining that when you forgot the quotes the system tells you the name
> is no longer found.
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.
Jenda
===== Jenda(at)Krynicky(dot)cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-12-01 20:15:09 | Re: INSERT ... ON CONFLICT doesn't work |
Previous Message | David G. Johnston | 2021-12-01 20:04:07 | Re: INSERT ... ON CONFLICT doesn't work |