| От | dev@archonet.com |
|---|---|
| Тема | Re: I was spoiled by the MySQL timestamp field |
| Дата | |
| Msg-id | 2942.192.168.1.16.1043344097.squirrel@mainbox.archonet.com обсуждение исходный текст |
| Ответ на | I was spoiled by the MySQL timestamp field ("Alan T. Miller" <amiller@hollywood101.com>) |
| Список | pgsql-general |
> As someone who is just getting started with PostygreSQL from years working > with MySQL, it appears that the timestamp data type does not behave in the > way it did with MySQL. Much as I like MySQL, it can sometimes be a little *too* helpful. > I got used to just defining a column as a timestamp > and letting the database throw the latest time stamp in there whenever a > row > was updated. Is there anything simular in PosgreSQL? When you create the table do something like: CREATE TABLE foo ( bar timestamp DEFAULT now(), ... ); You can of course do this with any column-type and value. See the SQL-reference for details. - Richard Huxton
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера