Re: [HACKERS] Typo in insert.sgml

2017-08-27 Thread Peter Eisentraut
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


-- 
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

2017-06-20 Thread David G. Johnston
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.


-- 
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

2017-06-20 Thread Tom Lane
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


-- 
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

2017-06-20 Thread David G. Johnston
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".

David J.


Re: [HACKERS] Typo in insert.sgml

2017-06-20 Thread Julien Rouhaud
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


-- 
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

2017-06-20 Thread Robert Haas
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


-- 
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

2017-06-20 Thread Peter Eisentraut
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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers