From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Martin Pohl <Nilpherd(at)gmx(dot)net> |
Cc: | Doug McNaught <doug(at)mcnaught(dot)org>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Insert a default timestamp when nothing given |
Date: | 2006-01-19 14:21:42 |
Message-ID: | 20060119142142.GJ9949@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)svana(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Jonah H. Harris | 2006-01-19 14:26:37 | Re: No heap lookups on index |
Previous Message | Jim Buttafuoco | 2006-01-19 14:16:23 | Re: Insert a default timestamp when nothing given |