[HACKERS] Typo in insert.sgml
[HACKERS] Typo in insert.sgml
Patch attached. -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Typo in insert.sgml
От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
On 6/18/17 03:16, Julien Rouhaud wrote: > Patch attached. This was not a typo, this was intentional. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: [HACKERS] Typo in insert.sgml
От:
Robert Haas <robertmhaas@gmail.com>
Дата:
On Tue, Jun 20, 2017 at 2:34 PM, Peter Eisentraut wrote: > On 6/18/17 03:16, Julien Rouhaud wrote: >> Patch attached. > > This was not a typo, this was intentional. To me, Julien's change seems to make it easier to understand, but maybe I'm misunderstanding what it's trying to say in the first place. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Re: [HACKERS] Typo in insert.sgml
От:
Julien Rouhaud <julien.rouhaud@dalibo.com>
Дата:
On 20/06/2017 20:34, Peter Eisentraut wrote: > On 6/18/17 03:16, Julien Rouhaud wrote: >> Patch attached. > > This was not a typo, this was intentional. > Oh, sorry. I'm not a native english speaker, that sounded really weird. -- Julien Rouhaud http://dalibo.com - http://dalibo.org
Re: [HACKERS] Typo in insert.sgml
От:
"David G. Johnston" <david.g.johnston@gmail.com>
Дата:
On Tuesday, June 20, 2017, Robert Haas <robertmhaas@gmail.com> wrote:
On Tue, Jun 20, 2017 at 2:34 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> On 6/18/17 03:16, Julien Rouhaud wrote:
>> Patch attached.
>
> This was not a typo, this was intentional.
To me, Julien's change seems to make it easier to understand, but
maybe I'm misunderstanding what it's trying to say in the first place.
Maybe
[...] that are not identity columns in <literal>tbl2</literal>. Values for identity columns will come from the sequence generators for <literal>tbl2</literal>.
Otherwise I'd drop the word "continue" altogether and just say "but will use the sequence counters for".
David J.
Re: [HACKERS] Typo in insert.sgml
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Robert Haas writes: > On Tue, Jun 20, 2017 at 2:34 PM, Peter Eisentraut > wrote: >> This was not a typo, this was intentional. > To me, Julien's change seems to make it easier to understand, but > maybe I'm misunderstanding what it's trying to say in the first place. I think there are two subtly different things here: the sequence counters will continue to be attached to the identity columns, and the counters will continue in sequence (ie, no implied ALTER SEQUENCE RESTART). The existing text seems to mean the latter but Julien's change makes it about the former. It could use rewording for clarity, just not this rewording. regards, tom lane
Re: [HACKERS] Typo in insert.sgml
От:
"David G. Johnston" <david.g.johnston@gmail.com>
Дата:
On Tue, Jun 20, 2017 at 1:35 PM, Tom Lane wrote: > Robert Haas writes: >> On Tue, Jun 20, 2017 at 2:34 PM, Peter Eisentraut >> wrote: >>> This was not a typo, this was intentional. > >> To me, Julien's change seems to make it easier to understand, but >> maybe I'm misunderstanding what it's trying to say in the first place. > > I think there are two subtly different things here: the sequence counters > will continue to be attached to the identity columns, and the counters > will continue in sequence (ie, no implied ALTER SEQUENCE RESTART). > The existing text seems to mean the latter but Julien's change makes it > about the former. > > It could use rewording for clarity, just not this rewording. Tom, I'm not following your train of thought: Given one sequenced IDENTITY column in each table (some rows were delete from each already): tbl1 4 5 6 tbl2 10 11 12 The point being made is that inserting all rows from tbl1 into tbl2 will result in tbl2 having: 10 11 12 13 14 15 and not: 10 11 12 4 5 6 That the sequence counters continue to be attached seems like it can and should be taken for granted. Inserting to a table likewise should never cause an ALTER SEQUENCE RESTART to occur and so can and should be taken for granted. ISTM that both the existing text and Julien's variation say this, just differently. I think the word "continue" is part of the problem. I also think not being explicit about the fact that its tbl2's sequence that supplies the new values - instead of using the values already present in tbl1 - requires one to think harder about the scenario than need be. David J.
Re: [HACKERS] Typo in insert.sgml
От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
On 6/20/17 15:03, David G. Johnston wrote: > On Tuesday, June 20, 2017, Robert Haas > wrote: > > On Tue, Jun 20, 2017 at 2:34 PM, Peter Eisentraut > > wrote: > > On 6/18/17 03:16, Julien Rouhaud wrote: > >> Patch attached. > > > > This was not a typo, this was intentional. > > To me, Julien's change seems to make it easier to understand, but > maybe I'm misunderstanding what it's trying to say in the first place. > > > Maybe > > [...] that are not identity columns in tbl2. Values > for identity columns will come from the sequence generators for > tbl2. > > Otherwise I'd drop the word "continue" altogether and just say "but will > use the sequence counters for". I have committed something along those lines. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services