Re: Function Like IsDate in pgSQL

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Function Like IsDate in pgSQL
Дата
Msg-id 7391.1136225115@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Function Like IsDate in pgSQL  ("Sistemas C.M.P." <sistemascmp@redynet4.com.ar>)
Список pgsql-odbc
"Sistemas C.M.P." <sistemascmp@redynet4.com.ar> writes:
> I have a query  that use the IsDate(string)  function (Ms function). =
> This function return true if the argument (string) is a valid date.
> I need to implement this function in postgreSQL=20

In PG 8.0 and up this is trivial --- try to cast the string to date and
see if you get an error or not.  Use the BEGIN ... EXCEPTION syntax
to catch the error and return false.

            regards, tom lane

В списке pgsql-odbc по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Library names on Unix
Следующее
От: Ludek Finstrle
Дата:
Сообщение: Re: Table's Field Info