sequences in transaction blocks

Поиск
Список
Период
Сортировка
От Marian Naghen
Тема sequences in transaction blocks
Дата
Msg-id 003401c60480$114271d0$f503a8c0@lapcontr01
обсуждение исходный текст
Ответы Re: sequences in transaction blocks  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: sequences in transaction blocks  (Tino Wildenhain <tino@wildenhain.de>)
Список pgsql-general
I want to insert records inside a transaction block (BEGIN - COMMIT/ROLLBACK). If the transaction fails,
the sequence do not rollback and retain the new value.
 
This is the default behavior of sequences ?
 
 
I use the following table:
 
CREATE TABLE proceduri
(
  procedura_id int4 NOT NULL DEFAULT nextval('proceduri_proceduri_id_seq'::regclass),
  tip_procedura_id int4,
  ....
  CONSTRAINT proceduri_pkey PRIMARY KEY (procedura_id)
)
WITH OIDS;
 
where 'proceduri_proceduri_id_seq is:
 
CREATE SEQUENCE proceduri_proceduri_id_seq
  INCREMENT 1
  MINVALUE 1000000000
  MAXVALUE 1099999999
  START 1000000001
  CACHE 1;
 
 
 

В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Select list of table names for particular DB
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: sequences in transaction blocks