Re: Insert a default timestamp when nothing given

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: "Jim Buttafuoco"
Дата:
Сообщение: Re: Insert a default timestamp when nothing given
Следующее
От: Ian Harding
Дата:
Сообщение: Re: tsearch2 and "how to use"