Re: [GENERAL] Test text value as interval

2008-02-07 Thread Tom Lane
Robert Fitzpatrick <[EMAIL PROTECTED]> writes: > Yes, this looks like it might work, thanks! But not sure which condition > to look for or if I'm doing this correctly. I tried syntax_error > condition, but I'm still receiving the same cast error trying this in a > trigger function... SYNTAX_ERROR

Re: [GENERAL] Test text value as interval

2008-02-07 Thread Robert Fitzpatrick
On Thu, 2008-02-07 at 16:58 -0800, Jeff Davis wrote: > On Thu, 2008-02-07 at 19:37 -0500, Robert Fitzpatrick wrote: > > Been searching for a way to do this, but haven't found what I was hoping > > to find. Is there any way in pl/pgsql to test a text value to see if it > > would be a valid interval

Re: [GENERAL] Test text value as interval

2008-02-07 Thread Jeff Davis
On Thu, 2008-02-07 at 19:37 -0500, Robert Fitzpatrick wrote: > Been searching for a way to do this, but haven't found what I was hoping > to find. Is there any way in pl/pgsql to test a text value to see if it > would be a valid interval without having to try and store in a field? In > a trigger, I

[GENERAL] Test text value as interval

2008-02-07 Thread Robert Fitzpatrick
Been searching for a way to do this, but haven't found what I was hoping to find. Is there any way in pl/pgsql to test a text value to see if it would be a valid interval without having to try and store in a field? In a trigger, I'd like to test a NEW text type field. Right now, I have just the fol