Search Postgresql Archives

Test text value as interval

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 following to generate an error...

test := NEW.textfield::interval;

I'd like to test the field and RAISE EXCEPTION if not valid interval.

-- 
Robert


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux