Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Sequence objects have no global currval operator?

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Sequence objects have no global currval operator?
Date: 1998-07-13 21:50:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
How about SELECT * FROM sequence_table_name?  Sequence numbers are
stored in their own tables.

> I'm planning to use a "sequence" object to allow multiple clients of a
> shared database to label table records with guaranteed-increasing serial
> numbers.  (The underlying problem is to let all the clients efficiently
> find changes that any one of them makes.  Every insertion or update will
> assign a new sequence number to each new or modified record; then the
> writer must issue a NOTIFY.  Upon being notified, each client can read
> all the newly-modified records with
> 	SELECT ... FROM table WHERE seqno > lastseqno;
> 	lastseqno := max(seqno seen in retrieved records);

Bruce Momjian                          |  830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 1998-07-13 22:02:51
Subject: Re: [HACKERS] Sequence objects have no global currval operator?
Previous:From: Bruce MomjianDate: 1998-07-13 21:31:34
Subject: Re: [HACKERS] Anyone working on optimizing subset min/max queries?

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group