[pgbr-geral] Problema com sequence : criando intervalo involuntário.
Rubens José Rodrigues
rubens.rodrigues em batistarepresentacoes.com
Sexta Novembro 14 13:50:59 UTC 2008
Pessoal,
Eu já tive este problema mas sinceramente deu “branco” aqui e não havia
documentado.
Cenário:
Estrutura
Windows Vista
PostgreSQL 8.3.3, compiled by Visual C++ build 1400
Zeos 6.6.2-RC
Lógica
create sequence seq_foo start with 1;
create table foo (seq bigint default (‘seq_foo’::regclass), texto
varchar(1));
No PSQL :
Insert into foo (texto) values (‘a’);
Insert into foo (texto) values (‘b’);
Insert into foo (texto) values (‘c’);
Via Delphi/Zeos
Mesmo item acima numa query.
Problema :
Ao pegar o result set da tabela acima o seqüencial está :
seq texto
1 a
3 b
5 c
Ou seja ele está “pulando” a seqüencia, mesmo sabendo que não tenho uma
trigger para isto e ou não tenho outras transações usando esta sequence.
Alguém poderia me ajudar?
Att.
----------------------------------------------------------------------------
Rubens José Rodrigues
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.postgresql.org.br/pipermail/pgbr-geral/attachments/20081114/12486d8a/attachment.html>
More information about the pgbr-geral
mailing list