pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedMerge statement
11+ messages / 5 participants
[nested] [flat]
* Merge statement
@ 2022-11-17 17:19 PG Doc comments form <noreply@postgresql.org>
2022-11-17 17:47 ` Re: Merge statement Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 1 reply; 11+ messages in thread
From: PG Doc comments form @ 2022-11-17 17:19 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org; +Cc: bobocc@yahoo.com
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/15/sql-merge.html
Description:
From the description it looks like a single WHEN clause is accepted, which
is definitely not true.
Please let us know how many WHEN clauses are accepted for each of WNEM
MATCHED and WHEN NOT MATCHED.
Kindly please see the below description of the "when_clause" as it is now in
the documentation:
and when_clause is:
{ WHEN MATCHED [ AND condition ] THEN { merge_update | merge_delete | DO
NOTHING } |
WHEN NOT MATCHED [ AND condition ] THEN { merge_insert | DO NOTHING } }
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Merge statement
2022-11-17 17:19 Merge statement PG Doc comments form <noreply@postgresql.org>
@ 2022-11-17 17:47 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-11-17 18:20 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
0 siblings, 1 reply; 11+ messages in thread
From: Alvaro Herrera @ 2022-11-17 17:47 UTC (permalink / raw)
To: bobocc@yahoo.com; pgsql-docs@lists.postgresql.org
On 2022-Nov-17, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/15/sql-merge.html
> Description:
>
> From the description it looks like a single WHEN clause is accepted, which
> is definitely not true.
Hmm, the main synopsis has
when_clause [...]
where the [...] is there to indicate that when_clause can appear an
arbitrary number of times.
> Please let us know how many WHEN clauses are accepted for each of WNEM
> MATCHED and WHEN NOT MATCHED.
There's no specific restriction, although I didn't try to find a
limit. I wonder what happens if you have a few hundred thousand ...
Time to experiment, I guess.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"No deja de ser humillante para una persona de ingenio saber
que no hay tonto que no le pueda enseñar algo." (Jean B. Say)
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Merge statement
2022-11-17 17:19 Merge statement PG Doc comments form <noreply@postgresql.org>
2022-11-17 17:47 ` Re: Merge statement Alvaro Herrera <alvherre@alvh.no-ip.org>
@ 2022-11-17 18:20 ` Boboc Cristi <bobocc@yahoo.com>
2022-11-17 18:41 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 11+ messages in thread
From: Boboc Cristi @ 2022-11-17 18:20 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>; Alvaro Herrera <alvherre@alvh.no-ip.org>
Hello!Thank you. I was fooled by the fact that sometimes it is marked with [...] and other times with [,...]
I think that consistency might worth attention, since [...] may indicate "anything", while [,...] are more likely to indicate a specific thing that may be repeated.
Best regards, Cristi Boboc
On Thursday, November 17, 2022 at 07:47:41 PM GMT+2, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
On 2022-Nov-17, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/15/sql-merge.html
> Description:
>
> From the description it looks like a single WHEN clause is accepted, which
> is definitely not true.
Hmm, the main synopsis has
when_clause [...]
where the [...] is there to indicate that when_clause can appear an
arbitrary number of times.
> Please let us know how many WHEN clauses are accepted for each of WNEM
> MATCHED and WHEN NOT MATCHED.
There's no specific restriction, although I didn't try to find a
limit. I wonder what happens if you have a few hundred thousand ...
Time to experiment, I guess.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"No deja de ser humillante para una persona de ingenio saber
que no hay tonto que no le pueda enseñar algo." (Jean B. Say)
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Merge statement
2022-11-17 17:19 Merge statement PG Doc comments form <noreply@postgresql.org>
2022-11-17 17:47 ` Re: Merge statement Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-11-17 18:20 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
@ 2022-11-17 18:41 ` David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 19:05 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
0 siblings, 1 reply; 11+ messages in thread
From: David G. Johnston @ 2022-11-17 18:41 UTC (permalink / raw)
To: Boboc Cristi <bobocc@yahoo.com>; +Cc: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>; Alvaro Herrera <alvherre@alvh.no-ip.org>
On Thu, Nov 17, 2022 at 11:20 AM Boboc Cristi <bobocc@yahoo.com> wrote:
> Hello!
> Thank you. I was fooled by the fact that sometimes it is marked with [...]
> and other times with [,...]
>
> I think that consistency might worth attention, since [...] may indicate
> "anything", while [,...] are more likely to indicate a specific thing that
> may be repeated.
>
>
That isn't how that works. The former means you don't have to add a comma
between each of the multiples, the later means you do.
David J.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Merge statement
2022-11-17 17:19 Merge statement PG Doc comments form <noreply@postgresql.org>
2022-11-17 17:47 ` Re: Merge statement Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-11-17 18:20 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 18:41 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
@ 2022-11-17 19:05 ` Boboc Cristi <bobocc@yahoo.com>
2022-11-17 19:21 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 11+ messages in thread
From: Boboc Cristi @ 2022-11-17 19:05 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>; Alvaro Herrera <alvherre@alvh.no-ip.org>; Kirk Parker <khp@equatoria.us>
I agree that your statement is true, but it is still not quite self sufficient.
For the time being I have no idea how to make it easier to be understood. As I have said, for me it is a little confusing.
I would pay attention to Kirk Parker <khp@equatoria.us> idea: when_clause [ when_clause [...]] to indicate repetitions without commas and xyz [, xyz[, ...]] to indicate repetitions that require commas.
I'll be back if some worthy idea will hit my mind.
Best regards, Cristi Boboc
On Thursday, November 17, 2022 at 08:48:19 PM GMT+2, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Thu, Nov 17, 2022 at 11:20 AM Boboc Cristi <bobocc@yahoo.com> wrote:
Hello!Thank you. I was fooled by the fact that sometimes it is marked with [...] and other times with [,...]
I think that consistency might worth attention, since [...] may indicate "anything", while [,...] are more likely to indicate a specific thing that may be repeated.
That isn't how that works. The former means you don't have to add a comma between each of the multiples, the later means you do.
David J.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Merge statement
2022-11-17 17:19 Merge statement PG Doc comments form <noreply@postgresql.org>
2022-11-17 17:47 ` Re: Merge statement Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-11-17 18:20 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 18:41 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 19:05 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
@ 2022-11-17 19:21 ` David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 19:48 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
0 siblings, 1 reply; 11+ messages in thread
From: David G. Johnston @ 2022-11-17 19:21 UTC (permalink / raw)
To: Boboc Cristi <bobocc@yahoo.com>; +Cc: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>; Alvaro Herrera <alvherre@alvh.no-ip.org>; Kirk Parker <khp@equatoria.us>
On Thu, Nov 17, 2022 at 12:06 PM Boboc Cristi <bobocc@yahoo.com> wrote:
> I agree that your statement is true, but it is still not quite self
> sufficient.
>
> For the time being I have no idea how to make it easier to be understood.
> As I have said, for me it is a little confusing.
>
> I would pay attention to Kirk Parker <khp@equatoria.us> idea: when_clause
> [ when_clause [...]] to indicate repetitions without commas and xyz [,
> xyz[, ...]] to indicate repetitions that require commas.
>
>
Please don't top-post. The convention here is inline and bottom posting.
The convention for the documentation is to display repetition the way it is
shown on this page. Having this page deviate from convention is
undesirable, as is changing the convention. 100% satisfaction is not a
goal - and as evidenced here the mailing lists are in place to handle rare
cases of reader confusion.
David J.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Merge statement
2022-11-17 17:19 Merge statement PG Doc comments form <noreply@postgresql.org>
2022-11-17 17:47 ` Re: Merge statement Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-11-17 18:20 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 18:41 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 19:05 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 19:21 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
@ 2022-11-17 19:48 ` Boboc Cristi <bobocc@yahoo.com>
2022-11-17 19:54 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 11+ messages in thread
From: Boboc Cristi @ 2022-11-17 19:48 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>; Alvaro Herrera <alvherre@alvh.no-ip.org>; Kirk Parker <khp@equatoria.us>
OK, I agree. I'll do my best to adopt the site conventions for every specific type of site within the corresponding pages.
Top-posting is not by my choice, it is how the email client works.
Since you have good reasons to keep the conventions of yours, then please accept that email clients have the same or very similar good reasons to keep their conventions too and stop criticize those.
Best regards, Cristi Boboc
On Thursday, November 17, 2022 at 09:21:21 PM GMT+2, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Thu, Nov 17, 2022 at 12:06 PM Boboc Cristi <bobocc@yahoo.com> wrote:
I agree that your statement is true, but it is still not quite self sufficient.
For the time being I have no idea how to make it easier to be understood. As I have said, for me it is a little confusing.
I would pay attention to Kirk Parker <khp@equatoria.us> idea: when_clause [ when_clause [...]] to indicate repetitions without commas and xyz [, xyz[, ...]] to indicate repetitions that require commas.
Please don't top-post. The convention here is inline and bottom posting.
The convention for the documentation is to display repetition the way it is shown on this page. Having this page deviate from convention is undesirable, as is changing the convention. 100% satisfaction is not a goal - and as evidenced here the mailing lists are in place to handle rare cases of reader confusion.
David J.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Merge statement
2022-11-17 17:19 Merge statement PG Doc comments form <noreply@postgresql.org>
2022-11-17 17:47 ` Re: Merge statement Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-11-17 18:20 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 18:41 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 19:05 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 19:21 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 19:48 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
@ 2022-11-17 19:54 ` David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 20:05 ` Re: Merge statement Tom Lane <tgl@sss.pgh.pa.us>
2022-11-18 07:04 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
0 siblings, 2 replies; 11+ messages in thread
From: David G. Johnston @ 2022-11-17 19:54 UTC (permalink / raw)
To: Boboc Cristi <bobocc@yahoo.com>; +Cc: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>; Alvaro Herrera <alvherre@alvh.no-ip.org>; Kirk Parker <khp@equatoria.us>
On Thu, Nov 17, 2022 at 12:48 PM Boboc Cristi <bobocc@yahoo.com> wrote:
> OK, I agree. I'll do my best to adopt the site conventions for every
> specific type of site within the corresponding pages.
>
> *Top-posting is not by my choice, it is how the email client works.*
>
>
Mine has the same default/convention. It is not difficult to choose to
behave differently if one wishes. Given that these messages are read in
archive by many people and usually with fairly long threads, most of which
are indeed done to the bottom-posting convention, the wisdom of "when in
Rome, do as the Romans do" is suggested.
David J.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Merge statement
2022-11-17 17:19 Merge statement PG Doc comments form <noreply@postgresql.org>
2022-11-17 17:47 ` Re: Merge statement Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-11-17 18:20 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 18:41 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 19:05 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 19:21 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 19:48 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 19:54 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
@ 2022-11-17 20:05 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 11+ messages in thread
From: Tom Lane @ 2022-11-17 20:05 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Boboc Cristi <bobocc@yahoo.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>; Alvaro Herrera <alvherre@alvh.no-ip.org>; Kirk Parker <khp@equatoria.us>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thu, Nov 17, 2022 at 12:48 PM Boboc Cristi <bobocc@yahoo.com> wrote:
>> *Top-posting is not by my choice, it is how the email client works.*
> Mine has the same default/convention. It is not difficult to choose to
> behave differently if one wishes. Given that these messages are read in
> archive by many people and usually with fairly long threads, most of which
> are indeed done to the bottom-posting convention, the wisdom of "when in
> Rome, do as the Romans do" is suggested.
Right. The point of quoting in a sensible order and trimming irrelevant
material is to make it easier on the readers. Failing to do that is
discourteous: it shows that you consider a few seconds of your time
to be worth more than a similar amount of time expended by each of
(possibly) thousands of other people.
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Merge statement
2022-11-17 17:19 Merge statement PG Doc comments form <noreply@postgresql.org>
2022-11-17 17:47 ` Re: Merge statement Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-11-17 18:20 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 18:41 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 19:05 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 19:21 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 19:48 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 19:54 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
@ 2022-11-18 07:04 ` Boboc Cristi <bobocc@yahoo.com>
2022-11-18 08:03 ` Re: Merge statement Alvaro Herrera <alvherre@alvh.no-ip.org>
1 sibling, 1 reply; 11+ messages in thread
From: Boboc Cristi @ 2022-11-18 07:04 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>; Alvaro Herrera <alvherre@alvh.no-ip.org>; Kirk Parker <khp@equatoria.us>
Dear David, your suggestion would be good if it could be applied.
I have not found the setting you are talking about. I attach here a screenshot of the settings page. Since obviously you are more experimented than me about the mail clients, please help.I mention I am using Yahoo's web client.
Best regards, Cristi Boboc
On Thursday, November 17, 2022 at 09:54:55 PM GMT+2, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Thu, Nov 17, 2022 at 12:48 PM Boboc Cristi <bobocc@yahoo.com> wrote:
OK, I agree. I'll do my best to adopt the site conventions for every specific type of site within the corresponding pages.
Top-posting is not by my choice, it is how the email client works.
Mine has the same default/convention. It is not difficult to choose to behave differently if one wishes. Given that these messages are read in archive by many people and usually with fairly long threads, most of which are indeed done to the bottom-posting convention, the wisdom of "when in Rome, do as the Romans do" is suggested.
David J.
Attachments:
[image/png] 1668755070222blob.jpg (48.2K, ../../1259173277.1593590.1668755072883@mail.yahoo.com/3-1668755070222blob.jpg)
download | view image
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Merge statement
2022-11-17 17:19 Merge statement PG Doc comments form <noreply@postgresql.org>
2022-11-17 17:47 ` Re: Merge statement Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-11-17 18:20 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 18:41 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 19:05 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 19:21 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 19:48 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
2022-11-17 19:54 ` Re: Merge statement David G. Johnston <david.g.johnston@gmail.com>
2022-11-18 07:04 ` Re: Merge statement Boboc Cristi <bobocc@yahoo.com>
@ 2022-11-18 08:03 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 11+ messages in thread
From: Alvaro Herrera @ 2022-11-18 08:03 UTC (permalink / raw)
To: Boboc Cristi <bobocc@yahoo.com>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>; Kirk Parker <khp@equatoria.us>
On 2022-Nov-18, Boboc Cristi wrote:
> Dear David, your suggestion would be good if it could be applied.
>
> I have not found the setting you are talking about. I attach here a
> screenshot of the settings page. Since obviously you are more
> experimented than me about the mail clients, please help.I mention I
> am using Yahoo's web client.
Hello,
Kindly take this conversation off-list.
Regards
--
Álvaro Herrera
^ permalink raw reply [nested|flat] 11+ messages in thread
end of thread, other threads:[~2022-11-18 08:03 UTC | newest]
Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17 17:19 Merge statement PG Doc comments form <noreply@postgresql.org>
2022-11-17 17:47 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-11-17 18:20 ` Boboc Cristi <bobocc@yahoo.com>
2022-11-17 18:41 ` David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 19:05 ` Boboc Cristi <bobocc@yahoo.com>
2022-11-17 19:21 ` David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 19:48 ` Boboc Cristi <bobocc@yahoo.com>
2022-11-17 19:54 ` David G. Johnston <david.g.johnston@gmail.com>
2022-11-17 20:05 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-11-18 07:04 ` Boboc Cristi <bobocc@yahoo.com>
2022-11-18 08:03 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox