Re: Insert a default timestamp when nothing given - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Insert a default timestamp when nothing given
Date
Msg-id 20060119142142.GJ9949@svana.org
Whole thread Raw
In response to Re: Insert a default timestamp when nothing given  (" Martin Pohl" <Nilpherd@gmx.net>)
List 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.

Attachment

pgsql-general by date:

Previous
From: "Jim Buttafuoco"
Date:
Subject: Re: Insert a default timestamp when nothing given
Next
From: Ian Harding
Date:
Subject: Re: tsearch2 and "how to use"