2009/4/10 Juan Jose Rosales Rodriguez <[email protected]>:
> Buenas tengo el problema de que cuando hago un campo feha con el tipo
> timestamo y le pongo el valor por defecto now()
>
> No me sale nada a la hora de instertar , hay algo que tengo que configurar en
> el servidor?
> o en la bd?
>
Como definiste tu tabla ? le pusiste default now() cuando la creaste ?
mira:
pruebas=# create table prueba (id integer, fecha timestamp default now() );
CREATE TABLE
pruebas=# insert into prueba (id) values (1);
INSERT 0 1
pruebas=# select * from prueba;
id | fecha
----+-------------------------
1 | 2009-04-10 22:18:14.546
(1 row)
pruebas=#
--
"Linux is for people who hate Windows, BSD is for people who love UNIX".
"Social Engineer -> Because there is no patch for human stupidity"
"The Unix Guru's View of Sex unzip ; strip ; touch ; grep ; finger ;
mount ; fsck ; more ; yes ; umount ; sleep."
"Documentation is like sex: when it is good, it is very, very good;
and when it is bad, it is better than nothing."
--
TIP 5: ¿Has leído nuestro extenso FAQ?
http://www.postgresql.org/docs/faqs.FAQ.html