pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: sequences
16+ messages / 11 participants
[nested] [flat]
* Re: sequences
@ 2000-09-21 06:13 K Parker <kparker@eudoramail.com>
0 siblings, 2 replies; 16+ messages in thread
From: K Parker @ 2000-09-21 06:13 UTC (permalink / raw)
To: pgsql-general@hub.org
Edward Q. Bridges's detailed statement regarding sequences, of which I extract merely the most pessimistic part:
> begin;
> insert into foo (A,B) values (B);
> select currval('foo_A_seq');
> commit;
>
> note that the transaction is key, without
> which there's no guarantee that some other
> statement will affect the value of the
> sequence.
quite clearly conflicts what what seems to me to be the plain meaning of the manual page for CREATE SEQUENCE which states, in part:
> multiple backends are guaranteed to
> allocate distinct sequence values
Can some knowledgable person here save a bunch of us plain old user-programmers the trouble of trying to trace down what the source says and just clarify this issue? Thanks!
>
Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Re: sequences
@ 2000-09-21 15:06 Edward Q. Bridges <ed.bridges@buzznik.com>
parent: K Parker <kparker@eudoramail.com>
1 sibling, 1 reply; 16+ messages in thread
From: Edward Q. Bridges @ 2000-09-21 15:06 UTC (permalink / raw)
To: kparker@eudoramail.com <kparker@eudoramail.com>; pgsql-general@hub.org <pgsql-general@hub.org>
actually they're saying two different things :)
first, to explain my example a bit better:
the difference between this:
> > begin;
> > insert into foo (A,B) values (B);
> > select currval('foo_A_seq');
> > commit;
and this:
> > insert into foo (A,B) values (B);
> > select currval('foo_A_seq');
is that the first is considered (by the rdbms) to be
one "atomic" transaction; the second is considered to
be two.
the rdbms processes one transaction at a time, in no
guaranteed order (basically). so, in theory, there is
a possibility that an insert by another user to table
foo could occur after your insert and before your select
off the sequence. the implication being, you would get
a value for A that would not refer to the row you just
inserted. by grouping the sql statements into a single
transaction, you ensure the rdbms will process them in
the order you specify.
the other statement you quote from the docs (which is not
entirely clear to me without context) seems to refer to
the fact that a sequence will never return the same number
twice when nextval('seq_name') is called.
HTH
--e--
On Wed, 20 Sep 2000 23:13:23 -0700, K Parker wrote:
> Edward Q. Bridges's detailed statement regarding sequences, of which I extract merely the
most pessimistic part:
>
> > begin;
> > insert into foo (A,B) values (B);
> > select currval('foo_A_seq');
> > commit;
> >
> > note that the transaction is key, without
> > which there's no guarantee that some other
> > statement will affect the value of the
> > sequence.
>
> quite clearly conflicts what what seems to me to be the plain meaning of the manual page for
CREATE SEQUENCE which states, in part:
>
> > multiple backends are guaranteed to
> > allocate distinct sequence values
>
> Can some knowledgable person here save a bunch of us plain old user-programmers the trouble
of trying to trace down what the source says and just clarify this issue? Thanks!
> >
>
>
> Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at
http://www.eudoramail.com
>
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Re: sequences
@ 2000-09-21 17:06 Stephan Szabo <sszabo@megazone23.bigpanda.com>
parent: Edward Q. Bridges <ed.bridges@buzznik.com>
0 siblings, 1 reply; 16+ messages in thread
From: Stephan Szabo @ 2000-09-21 17:06 UTC (permalink / raw)
To: Edward Q. Bridges <ed.bridges@buzznik.com>; +Cc: kparker@eudoramail.com <kparker@eudoramail.com>; pgsql-general@hub.org <pgsql-general@hub.org>
Actually, it looks like currval is defined to give the
value last used in your session. So, the second case
(not in transaction) should still always give the
value of the last nextval, assuming they're part of
the same session.
Stephan Szabo
sszabo@bigpanda.com
On Thu, 21 Sep 2000, Edward Q. Bridges wrote:
> actually they're saying two different things :)
>
> first, to explain my example a bit better:
>
> the difference between this:
>
> > > begin;
> > > insert into foo (A,B) values (B);
> > > select currval('foo_A_seq');
> > > commit;
>
> and this:
>
> > > insert into foo (A,B) values (B);
> > > select currval('foo_A_seq');
>
> is that the first is considered (by the rdbms) to be
> one "atomic" transaction; the second is considered to
> be two.
>
> the rdbms processes one transaction at a time, in no
> guaranteed order (basically). so, in theory, there is
> a possibility that an insert by another user to table
> foo could occur after your insert and before your select
> off the sequence. the implication being, you would get
> a value for A that would not refer to the row you just
> inserted. by grouping the sql statements into a single
> transaction, you ensure the rdbms will process them in
> the order you specify.
>
> the other statement you quote from the docs (which is not
> entirely clear to me without context) seems to refer to
> the fact that a sequence will never return the same number
> twice when nextval('seq_name') is called.
>
> HTH
> --e--
>
>
> On Wed, 20 Sep 2000 23:13:23 -0700, K Parker wrote:
>
> > Edward Q. Bridges's detailed statement regarding sequences, of which I extract merely the
> most pessimistic part:
> >
> > > begin;
> > > insert into foo (A,B) values (B);
> > > select currval('foo_A_seq');
> > > commit;
> > >
> > > note that the transaction is key, without
> > > which there's no guarantee that some other
> > > statement will affect the value of the
> > > sequence.
> >
> > quite clearly conflicts what what seems to me to be the plain meaning of the manual page for
> CREATE SEQUENCE which states, in part:
> >
> > > multiple backends are guaranteed to
> > > allocate distinct sequence values
> >
> > Can some knowledgable person here save a bunch of us plain old user-programmers the trouble
> of trying to trace down what the source says and just clarify this issue? Thanks!
> > >
> >
> >
> > Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at
> http://www.eudoramail.com
> >
>
>
>
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: sequences
@ 2000-09-21 17:18 K Parker <kparker@eudoramail.com>
0 siblings, 0 replies; 16+ messages in thread
From: K Parker @ 2000-09-21 17:18 UTC (permalink / raw)
To: pgsql-general@hub.org
Perhaps I was too brief before, wanting to spare folks long quotes from the manual that we all have, but here goes (quoting from http://www.postgresql.org/users-lounge/docs/7.0/postgres/sql-createsequence.htm):
"After a sequence is created, you may use the function nextval(seqname) to get a new number from the sequence. The function currval('seqname') may be used to determine the number returned by the last call to nextval(seqname) for the specified sequence _in the current session_". [emphasis added]
"Unexpected results may be obtained if a cache setting greater than one is used for a sequence object that will be used
concurrently by multiple backends. Each backend will allocate and cache successive sequence values during one access to
the sequence object and increase the sequence object's last_value accordingly. Then, the next cache-1 uses of nextval within
that backend simply return the preallocated values without touching the shared object. So, numbers allocated but not used in
the current session will be lost. __Furthermore, although multiple backends are guaranteed to allocate distinct sequence values,
the values may be generated out of sequence when all the backends are considered.__" [again, emphasis added].
Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Re: sequences
@ 2000-09-21 21:45 Charles Tassell <ctassell@isn.net>
parent: K Parker <kparker@eudoramail.com>
1 sibling, 0 replies; 16+ messages in thread
From: Charles Tassell @ 2000-09-21 21:45 UTC (permalink / raw)
To: kparker@eudoramail.com; pgsql-general@hub.org
From memory of previous discussions, what a sequence actually does is
guarantee you a unique value, although those vales may not actually occur
in numeric order (ie, a record put in at 1:10pm might get a sequence value
of 12, one at 1:11 might get 15, and a third at 1:12 might get 13.) This
is because each backend allocates it's own block of values within a
sequence when it sees that it's going to need to use it (or at least used
to with 6.5, dunno if it was changed in 7.) So if your first backend
opens up, uses a sequence, then you putter around for a couple more minutes
doing other selects/updates/whatever commands on the same connection, then
use the sequence again, your two values will probably be consecutive. If
in the middle of that putterring around another backend came in and used
the sequence though, it's going to get a higher value than both the
sequences of the previous connection, even if it uses the sequence before
the second one of the first connection. I'm not sure how this is effected
by transactions / no transactions, but this is how someone explained it to
me a few months ago.
If you really want to test it though, open up two psql connections at the
same time in different terminals and try some insert's to see what you
get. Might want to try it both inside and outside of transaction blocks
just in case.
At 03:13 AM 9/21/00, K Parker wrote:
>Edward Q. Bridges's detailed statement regarding sequences, of which I
>extract merely the most pessimistic part:
>
> > begin;
> > insert into foo (A,B) values (B);
> > select currval('foo_A_seq');
> > commit;
> >
> > note that the transaction is key, without
> > which there's no guarantee that some other
> > statement will affect the value of the
> > sequence.
>
>quite clearly conflicts what what seems to me to be the plain meaning of
>the manual page for CREATE SEQUENCE which states, in part:
>
> > multiple backends are guaranteed to
> > allocate distinct sequence values
>
>Can some knowledgable person here save a bunch of us plain old
>user-programmers the trouble of trying to trace down what the source says
>and just clarify this issue? Thanks!
> >
>
>
>Join 18 million Eudora users by signing up for a free Eudora Web-Mail
>account at http://www.eudoramail.com
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Re: sequences
@ 2000-09-22 02:17 Tom Lane <tgl@sss.pgh.pa.us>
parent: Stephan Szabo <sszabo@megazone23.bigpanda.com>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2000-09-22 02:17 UTC (permalink / raw)
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>; +Cc: Edward Q. Bridges <ed.bridges@buzznik.com>; kparker@eudoramail.com <kparker@eudoramail.com>; pgsql-general@hub.org <pgsql-general@hub.org>
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> Actually, it looks like currval is defined to give the
> value last used in your session. So, the second case
> (not in transaction) should still always give the
> value of the last nextval, assuming they're part of
> the same session.
Stephan is correct: you can safely do
insert into foo(B) values (Bvalue); -- column A is defaulted
select currval('foo_A_seq');
even without a transaction block, and be assured of getting the same
value back that was assigned to A.
At least, you don't have to worry about other backends messing you up.
But it's still possible to shoot yourself in the foot. For example, if
you have rules or triggers on insert to foo, and those rules/triggers
themselves cause additional calls to nextval('foo_A_seq'), then the
eventual currval() will return the latest such result, which might not
have been what got inserted into foo. Note that using a transaction
block will not protect you from this gaffe.
For this reason, and because it just seems cleaner to me, I prefer to
solve this problem like so:
select nextval('foo_A_seq');
insert into foo(A,B) values (just-returned-value, Bvalue);
That gets the same result with about the same amount of work, but
seems more understandable and safer to me. It's mostly a matter of
taste, though.
regards, tom lane
^ permalink raw reply [nested|flat] 16+ messages in thread
* Sequences
@ 2003-09-19 03:35 Andrew Rawnsley <ronz@ravensfield.com>
0 siblings, 1 reply; 16+ messages in thread
From: Andrew Rawnsley @ 2003-09-19 03:35 UTC (permalink / raw)
To: pgsql-general
I'm hoping someone can tell me I'm wrong, but I'm thinking not. Anyway,
here it goes:
Sequence information is stored in their individual 1-row tables, with
an entry is pg_class of relkind 'S'. So you can't
really get a list of sequences with last_value in a single query
without a butt-ugly pile of UNIONs in a query
manufactured after a query on pg_class (i.e. SELECT * FROM seq1 UNION
SELECT * FROM seq2...). And
the result would have no schema name with the sequence name, unless I
make my UNION query that much butt-uglier
(i.e. SELECT schema1 || '.' || sequence_name,last_value FROM seq1 UNION
SELECT schema1 || '.' || sequence_name,
last_value FROM seq2,...).
Tell me I have an elegant solution there, and I'll give you flattery
points but I'll still laugh at you.
Anyone have any other tricks?
--------------------
Andrew Rawnsley
President
The Ravensfield Digital Resource Group, Ltd.
(740) 587-0114
www.ravensfield.com
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Sequences
@ 2003-09-19 04:21 Tom Lane <tgl@sss.pgh.pa.us>
parent: Andrew Rawnsley <ronz@ravensfield.com>
0 siblings, 0 replies; 16+ messages in thread
From: Tom Lane @ 2003-09-19 04:21 UTC (permalink / raw)
To: Andrew Rawnsley <ronz@ravensfield.com>; +Cc: pgsql-general
Andrew Rawnsley <ronz@ravensfield.com> writes:
> Sequence information is stored in their individual 1-row tables, with
> an entry is pg_class of relkind 'S'. So you can't
> really get a list of sequences with last_value in a single query
Nope, you can't ... and I surely hope you weren't expecting that the
last_values would all be simultaneously valid ...
What I'd try for this is
select relname, get_last_value(relname) from pg_class where relkind = 'S';
where get_last_value() is a plpgsql function that does an EXECUTE.
But you must realize that there will be time skew between the
last_values.
What is the problem you really want to solve?
regards, tom lane
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Sequences
@ 2003-09-19 04:56 Andrew Rawnsley <ronz@ravensfield.com>
0 siblings, 0 replies; 16+ messages in thread
From: Andrew Rawnsley @ 2003-09-19 04:56 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>
On Friday, September 19, 2003, at 12:21 AM, Tom Lane wrote:
> Andrew Rawnsley <ronz@ravensfield.com> writes:
>> Sequence information is stored in their individual 1-row tables, with
>> an entry is pg_class of relkind 'S'. So you can't
>> really get a list of sequences with last_value in a single query
>
> Nope, you can't ... and I surely hope you weren't expecting that the
> last_values would all be simultaneously valid ...
>
No, I don't expect that. I'm shooting for 'best I can do'.
> What I'd try for this is
>
> select relname, get_last_value(relname) from pg_class where relkind =
> 'S';
>
> where get_last_value() is a plpgsql function that does an EXECUTE.
> But you must realize that there will be time skew between the
> last_values.
>
> What is the problem you really want to solve?
>
Hacking some semblance of sequence support into eRserver. The possible
skew when gathering last_values
doesn't bother me too much - the replicated system is out of sync to
start with, and the hope is that everything will stay pretty
much caught up. Its certainly possible for me to be caught with my
pants down and have a sequence lagging the column its
supposed to represent at time of failure. But a) its not likely, and b)
I don't have much choice anyway. Something is better than
nothing. Pays your money you takes your chances.
I'll poke around with the function idea. Certain better than doing it
all from the client side...
> regards, tom lane
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if
> your
> joining column's datatypes do not match
>
--------------------
Andrew Rawnsley
President
The Ravensfield Digital Resource Group, Ltd.
(740) 587-0114
www.ravensfield.com
--------------------
Andrew Rawnsley
President
The Ravensfield Digital Resource Group, Ltd.
(740) 587-0114
www.ravensfield.com
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Sequences
@ 2003-09-19 05:37 Andrew Rawnsley <ronz@ravensfield.com>
0 siblings, 0 replies; 16+ messages in thread
From: Andrew Rawnsley @ 2003-09-19 05:37 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general
Oh, its a sticky problem, to be sure. Have to get something working at
some point, though...
You're point about approximate solutions is well taken.
On Friday, September 19, 2003, at 01:11 AM, Tom Lane wrote:
> Andrew Rawnsley <ronz@ravensfield.com> writes:
>> On Friday, September 19, 2003, at 12:21 AM, Tom Lane wrote:
>>> What is the problem you really want to solve?
>
>> Hacking some semblance of sequence support into eRserver.
>
> Hmm. I don't see a lot of value in an approximate solution. Either
> the
> sequence is up to date at the slave, or it is not. What's the point of
> "almost up to date"? You'd still have to take some action along the
> lines of "select setval('seq', (select max(col) from tab))" during any
> failover. If you have to do that, it doesn't matter what the sequence
> value was.
>
> Perhaps sequence increments could be broadcast to slaves as-is, using
> some variant of the existing erserver protocol that understands that
> these things happen outside transaction control.
>
> regards, tom lane
>
--------------------
Andrew Rawnsley
President
The Ravensfield Digital Resource Group, Ltd.
(740) 587-0114
www.ravensfield.com
^ permalink raw reply [nested|flat] 16+ messages in thread
* Sequences
@ 2008-05-03 19:35 Oscar Uribe <ouribe@tecnologiavirtual.net>
0 siblings, 1 reply; 16+ messages in thread
From: Oscar Uribe @ 2008-05-03 19:35 UTC (permalink / raw)
To: pgsql-general
Hi,
I need to do something with a sequence. This is the example:
CREATE TABLE TABLE1(
PRIMARY1 INTEGER NOT NULL,
OTHER1 VARCHAR (20) NOT NULL,
CONSTRAINT "MYPK1" PRIMARY KEY (PRIMARY1)
);
CREATE SEQUENCE "SEQ_1" INCREMENT BY 1 MINVALUE 1 NO MAXVALUE START WITH 1 CACHE 1 NO CYCLE OWNED BY TABLE1.PRIMARY1;
CREATE TABLE TABLE2(
PRIMARY1 INTEGER NOT NULL,
REF1 INTEGER NOT NULL,
OTHER1 INTEGER NOT NULL,
OTHER2 VARCHAR(20),
CONSTRAINT "MYPK2" PRIMARY KEY (PRIMARY1),
CONSTRAINT "MYREF1" FOREIGN KEY (REF1) REFERENCES TABLE1(PRIMARY1),
CONSTRAINT "MYUK1" UNIQUE (REF1,OTHER1)
);
CREATE SEQUENCE "SEQ_1" INCREMENT BY 1 MINVALUE 1 NO MAXVALUE START WITH 1 CACHE 1 NO CYCLE OWNED BY TABLE2.PRIMARY1;
TABLE1
PRIMARY1 OTHER1
1 A
2 B
3 C
With this two tables I wan to create a sequence that do:
TABLE2
PRIMARY1 REF OTHER1 OTHER2
1 1 1 A
2 1 2 B
3 1 3 C
4 2 1 A
5 2 2 B
6 3 1 A
7 3 2 B
8 3 3 C
9 3 4 D
10 1 4 D
11 1 5 E
12 3 5 E
13 2 3 E
I want to create a sequence that increases in unit column 3 for each record individually in column 2
How do i create a sequence that can manage this?
Is there a solution for this?
Thanks
Oscar Uribe
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Sequences
@ 2008-06-19 07:20 Artacus <artacus@comcast.net>
parent: Oscar Uribe <ouribe@tecnologiavirtual.net>
0 siblings, 0 replies; 16+ messages in thread
From: Artacus @ 2008-06-19 07:20 UTC (permalink / raw)
To: pgsql-general
>
> I want to create a sequence that increases in unit column 3 for each
> record individually in column 2
>
> How do i create a sequence that can manage this?
> Is there a solution for this?
>
Yeah, depesz shows how to do this here
http://www.depesz.com/index.php/2007/08/17/rownum-anyone-cumulative-sum-in-one-query/
^ permalink raw reply [nested|flat] 16+ messages in thread
* sequences
@ 2019-06-24 09:01 Karl Martin Skoldebrand <KS0C77263@TechMahindra.com>
0 siblings, 2 replies; 16+ messages in thread
From: Karl Martin Skoldebrand @ 2019-06-24 09:01 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Hi,
I'm trying to troubleshoot a case where users are getting data from a database, despite they having said they are not interested.
There is a number of sequences in the database in question, but to me they look "empty", like stubs.
create sequence db_table_seq;
alter sequence db_table_seq owner to dbnameuser;
(all names obfuscated)
To me it look like the only thing going is changing the ownership of the sequence. For unknown reasons.
What is your impression the intention is with this?
//Martin S
============================================================================================================================
Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html <http://www.techmahindra.com/Disclaimer.html; externally http://tim.techmahindra.com/tim/disclaimer.html <http://tim.techmahindra.com/tim/disclaimer.html; internally within TechMahindra.
============================================================================================================================
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: sequences
@ 2019-06-24 09:28 Thiemo Kellner <thiemo@gelassene-pferde.biz>
parent: Karl Martin Skoldebrand <KS0C77263@TechMahindra.com>
1 sibling, 0 replies; 16+ messages in thread
From: Thiemo Kellner @ 2019-06-24 09:28 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hi Karl
I did not double check with the doc whether the SQL you posted is
valid (I guess it could by applying the defaults) however I do not see
how sequences would govern the sending of data to users.
Kind regards
Thiemo
Quoting Karl Martin Skoldebrand <KS0C77263@techmahindra.com>:
> Hi,
>
> I'm trying to troubleshoot a case where users are getting data from
> a database, despite they having said they are not interested.
> There is a number of sequences in the database in question, but to
> me they look "empty", like stubs.
>
> create sequence db_table_seq;
>
> alter sequence db_table_seq owner to dbnameuser;
>
> (all names obfuscated)
>
> To me it look like the only thing going is changing the ownership of
> the sequence. For unknown reasons.
> What is your impression the intention is with this?
>
> //Martin S
>
> ============================================================================================================================
>
> Disclaimer: This message and the information contained herein is
> proprietary and confidential and subject to the Tech Mahindra policy
> statement, you may review the policy at
> http://www.techmahindra.com/Disclaimer.html
> <http://www.techmahindra.com/Disclaimer.html; externally
> http://tim.techmahindra.com/tim/disclaimer.html
> <http://tim.techmahindra.com/tim/disclaimer.html; internally within
> TechMahindra.
>
> ============================================================================================================================
--
S/MIME Public Key: https://oc.gelassene-pferde.biz/index.php/s/eJuAUFONag6ofnH
Signal (Safer than WhatsApp): +49 1578 7723737
Handys: +41 78 947 36 21 | +49 1578 772 37 37
Tox-Id:
B7282A9E31D944DDAD1ECC5B33C36AAE80B32D119AB7391D602C937A65E8CA0625C495C5322B
Attachments:
smime.p7s (application/pkcs7-signature, 3.9K) download
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: sequences
@ 2019-06-24 10:14 Tim Clarke <tim.clarke@minerva.info>
parent: Karl Martin Skoldebrand <KS0C77263@TechMahindra.com>
1 sibling, 1 reply; 16+ messages in thread
From: Tim Clarke @ 2019-06-24 10:14 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
There's nothing really "in" a sequence, it just generates numbers for
you, generally for unintelligent primary keys. Those statements
perfectly create new sequences which will start from 1.
Tim Clarke
IT Director
Direct: +44 (0)1376 504510 | Mobile: +44 (0)7887 563420
On 24/06/2019 10:01, Karl Martin Skoldebrand wrote:
>
> Hi,
>
> I’m trying to troubleshoot a case where users are getting data from a
> database, despite they having said they are not interested.
>
> There is a number of sequences in the database in question, but to me
> they look “empty”, like stubs.
>
> *create sequence *db_table_seq;
>
> *alter sequence *db_table_seq *owner to *dbnameuser;
>
> (all names obfuscated)
>
> To me it look like the only thing going is changing the ownership of
> the sequence. For unknown reasons.
>
> What is your impression the intention is with this?
>
> //Martin S
>
> ============================================================================================================================
>
> Disclaimer: This message and the information contained herein is
> proprietary and confidential and subject to the Tech Mahindra policy
> statement, you may review the policy at
> http://www.techmahindra.com/Disclaimer.html externally
> http://tim.techmahindra.com/tim/disclaimer.html internally within
> TechMahindra.
>
> ============================================================================================================================
>
Telephone: Witham: +44(0)1376 503500 | London: +44 (0)20 3009 0853 | Frankfurt: +49 (0)69 7191 6000 | Hong Kong: +852 5803 1687 | Toronto: +1 647 503 2848
Web: https://www.manifest.co.uk/
Minerva Analytics Ltd - A Solactive Company
9 Freebournes Court | Newland Street | Witham | Essex | CM8 2BL | United Kingdom
________________________________
Copyright: This e-mail may contain confidential or legally privileged information. If you are not the named addressee you must not use or disclose such information, instead please report it to admin@minerva.info<mailto:admin@minerva.info>
Legal: Minerva Analytics is the trading name of: Minerva Analytics Ltd: Registered in England Number 11260966 & The Manifest Voting Agency Ltd: Registered in England Number 2920820 Registered Office at above address. Please Click Here https://www.manifest.co.uk/legal/ for further information.
^ permalink raw reply [nested|flat] 16+ messages in thread
* RE: sequences
@ 2019-06-24 11:07 Karl Martin Skoldebrand <KS0C77263@TechMahindra.com>
parent: Tim Clarke <tim.clarke@minerva.info>
0 siblings, 0 replies; 16+ messages in thread
From: Karl Martin Skoldebrand @ 2019-06-24 11:07 UTC (permalink / raw)
To: Tim Clarke <tim.clarke@minerva.info>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Thanks for replies.
I looked at some tutorial page and there were more instructions in that, so got confused. I was aware sequences create integers.
//Martin S
============================================================================================================================
Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html <http://www.techmahindra.com/Disclaimer.html; externally http://tim.techmahindra.com/tim/disclaimer.html <http://tim.techmahindra.com/tim/disclaimer.html; internally within TechMahindra.
============================================================================================================================
^ permalink raw reply [nested|flat] 16+ messages in thread
end of thread, other threads:[~2019-06-24 11:07 UTC | newest]
Thread overview: 16+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-09-21 06:13 Re: sequences K Parker <kparker@eudoramail.com>
2000-09-21 15:06 ` Edward Q. Bridges <ed.bridges@buzznik.com>
2000-09-21 17:06 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2000-09-22 02:17 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-09-21 21:45 ` Charles Tassell <ctassell@isn.net>
2000-09-21 17:18 Re: sequences K Parker <kparker@eudoramail.com>
2003-09-19 03:35 Sequences Andrew Rawnsley <ronz@ravensfield.com>
2003-09-19 04:21 ` Re: Sequences Tom Lane <tgl@sss.pgh.pa.us>
2003-09-19 04:56 Re: Sequences Andrew Rawnsley <ronz@ravensfield.com>
2003-09-19 05:37 Re: Sequences Andrew Rawnsley <ronz@ravensfield.com>
2008-05-03 19:35 Sequences Oscar Uribe <ouribe@tecnologiavirtual.net>
2008-06-19 07:20 ` Re: Sequences Artacus <artacus@comcast.net>
2019-06-24 09:01 sequences Karl Martin Skoldebrand <KS0C77263@TechMahindra.com>
2019-06-24 09:28 ` Thiemo Kellner <thiemo@gelassene-pferde.biz>
2019-06-24 10:14 ` Tim Clarke <tim.clarke@minerva.info>
2019-06-24 11:07 ` Karl Martin Skoldebrand <KS0C77263@TechMahindra.com>
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