Re: Insert a default timestamp when nothing given
Вложения
В списке pgsql-general по дате отправления:
| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: Insert a default timestamp when nothing given |
| Дата | |
| Msg-id | 20060119142142.GJ9949@svana.org обсуждение |
| Ответ на | Re: Insert a default timestamp when nothing given (" Martin Pohl" <Nilpherd@gmx.net>) |
| Список | pgsql-general |
On Thu, Jan 19, 2006 at 02:43:26PM +0100, Martin Pohl wrote: > Hi, > > > > Not directly. I suppose you could create a view that converted the > > > value to the right date on insert. > > I think a trigger might make more sense. > > That was a very good idea! I tought it would solve my problem. Unfortunately > it didn't: I still get the "invalid syntax" error (I ensured that the > trigger worked by using other values). Apparently the syntax check is done, > before the trigger is called: Yeah, it's done in the type input function. I suppose you could create your own msdate type that behaved the way you wanted. There are some packages out there to make porting easier, perhaps one of those can help? Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера