| От | strawman@plexi.com |
|---|---|
| Тема | timestamps |
| Дата | |
| Msg-id | 36D3801C.7F016EEA@plexi.com обсуждение исходный текст |
| Список | 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.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера