Olá, Alisson

Como assim? Pega o último registro? E se a tabela estiver vazia?

Qual versão você está usando?

postgres=# CREATE TABLE tab_ex_data(data timestamp default
current_timestamp);

postgres=# INSERT INTO tab_ex_data VALUES (default);

\q

postgres=# INSERT INTO tab_ex_data VALUES (default);

postgres=# select * from tab_ex_data;
           data
----------------------------------------------
2009-03-30 17:07:58.423735
2009-03-30 17:09:07.801028

2009/3/30 Alisson Viegas <p...@acsiv.com.br>

>  Boa tarde, pessoal.
> Tenho um campo timestamp com default current_timestamp.
> Acontece que ao adicionar o primeiro registro, após a conexão, ele pega o
> último valor inserido neste campo.
> As demais inserções são feitas corretamente. Isso é bug?
> Obrigado!
>
>
>
> At.te,
> Alisson Viegas
> Acsiv Sistemas
>
>
>
> _______________________________________________
> pgbr-geral mailing list
> pgbr-geral@listas.postgresql.org.br
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>
>

[]s
-- 
JotaComm
http://jotacomm.wordpress.com
http://www.dextra.com.br/postgres
_______________________________________________
pgbr-geral mailing list
pgbr-geral@listas.postgresql.org.br
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a