From: | strawman(at)plexi(dot)com |
---|---|
To: | General Postgres List <pgsql-general(at)postgreSQL(dot)org> |
Subject: | timestamps |
Date: | 1999-02-24 04:29:17 |
Message-ID: | 36D3801C.7F016EEA@plexi.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm trying to create a column that defaults to the current time and date. I
tried the SQLServer like syntax below but potgresql choked:
CREATE TABLE clicks (
avo_userid varchar (10) NOT NULL ,
link_id int NOT NULL ,
the_time timestamp NOT NULL CONSTRAINT df_now DEFAULT (timestamp('now'))
);
NOTICE: there is more than one function named "timestamp"
NOTICE: that satisfies the given argument types. you will have to
NOTICE: retype your query using explicit typecasts.
ERROR: function timestamp(unknown) does not exist
Is "timestamp" not both a type and a function? How can I look it up?
And one more question: How does one construct a foreign key relationship in
postgres?
Thanks for any help.
From | Date | Subject | |
---|---|---|---|
Next Message | Bob VonMoss | 1999-02-24 05:35:52 | restricting select statements |
Previous Message | Bruce Momjian | 1999-02-24 03:02:07 | Re: [GENERAL] Transaction logging |