diff options
| author | Marc G. Fournier | 1998-08-30 21:05:27 +0000 |
|---|---|---|
| committer | Marc G. Fournier | 1998-08-30 21:05:27 +0000 |
| commit | 6c4982851a7ce1585fb89adc2747c8f848183d1b (patch) | |
| tree | 75ec012134c37f3a9aff83220d8dd21a1bfb900d /src/man | |
| parent | 6f3de1bb6673b2e8d4ca83a17a482c5c546cd71e (diff) | |
From: Massimo Dal Zotto <dz@cs.unitn.it>
Diffstat (limited to 'src/man')
| -rw-r--r-- | src/man/create_sequence.l | 19 | ||||
| -rw-r--r-- | src/man/listen.l | 13 |
2 files changed, 26 insertions, 6 deletions
diff --git a/src/man/create_sequence.l b/src/man/create_sequence.l index 0a695fa6bf4..588e70f3944 100644 --- a/src/man/create_sequence.l +++ b/src/man/create_sequence.l @@ -1,6 +1,6 @@ .\" This is -*-nroff-*- .\" XXX standard disclaimer belongs here.... -.\" $Header: /cvsroot/pgsql/src/man/Attic/create_sequence.l,v 1.5 1998/07/14 01:45:25 momjian Exp $ +.\" $Header: /cvsroot/pgsql/src/man/Attic/create_sequence.l,v 1.6 1998/08/30 21:03:19 scrappy Exp $ .TH "CREATE SEQUENCE" SQL 07/13/98 PostgreSQL PostgreSQL .SH NAME create sequence - create a new sequence number generator @@ -82,6 +82,14 @@ given sequence in the current backend session. Also beware that it does not give the last number ever allocated, only the last one allocated by this backend. .PP +The function +.BR setval +('sequence_name', value) +may be used to set the current value of the specified sequence. +The next call to +.BR nextval +will return the given value + the sequence increment. +.PP Use a query like .nf SELECT * FROM <sequence_name>; @@ -134,6 +142,15 @@ select nextval ('seq'); -- Use sequence in insert -- insert into table _table_ values (nextval ('seq'),...); +.nf +-- +-- Set the sequence value after a copy in +-- +create function table_id_max() returns int4 + as 'select max(id) from _table_' + language 'sql'; +copy _table_ from 'input_file'; +select setval('seq', table_id_max()); .fi .SH "SEE ALSO" drop_sequence(l). diff --git a/src/man/listen.l b/src/man/listen.l index 49801408f73..165fe7ab026 100644 --- a/src/man/listen.l +++ b/src/man/listen.l @@ -1,6 +1,6 @@ .\" This is -*-nroff-*- .\" XXX standard disclaimer belongs here.... -.\" $Header: /cvsroot/pgsql/src/man/Attic/listen.l,v 1.7 1998/07/09 03:29:09 scrappy Exp $ +.\" $Header: /cvsroot/pgsql/src/man/Attic/listen.l,v 1.8 1998/08/30 21:03:20 scrappy Exp $ .TH "LISTEN" SQL 03/12/94 PostgreSQL PostgreSQL .SH NAME listen - listen for notification on a relation @@ -27,16 +27,19 @@ in order to find out the name of the class to which a given notification corresponds. If this code is not included in the application, the event notification will be queued and never be processed. +.PP +Note that +.IR class_name +needs not to be a valid class name but can be any ascii string up to 32 +characters long. It must however be eclosed in double-quotes if it is +not valid as class name. .SH "SEE ALSO" create_rule(l), notify(l), select(l), +unlisten(l), libpq. .SH BUGS -There is no way to un-\c -.BR listen -except to drop the connection (i.e., restart the backend server). -.PP The .IR psql(1) command does not poll for asynchronous events. |
