non fatal casting? - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject non fatal casting?
Date
Msg-id 20010916100740.2c349142.depesz@depesz.pl
Whole thread Raw
List pgsql-general
hi
is there any way to make non-fatal casts (text -=> date and so on?)
it would be just perfect if i could do something like:
try:
    my_date := my_text::date;
except:
    return -1;
end:
    return 0;

i'd like to use it in plpgsql functions. anyway to do it?

depesz

--
hubert depesz lubaczewski                          http://www.depesz.pl/
------------------------------------------------------------------------
... vows are spoken to be broken ...                 [enjoy the silence]
... words are meaningless and forgettable ...             [depeche mode]

pgsql-general by date:

Previous
From: Justin Clift
Date:
Subject: Re: Does Postgresql 7.1.x Still Have 8K Maximum Field Size?
Next
From: Arne Weiner
Date:
Subject: Re: adding a superuser