Re: Converting empty input strings to Nulls

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Converting empty input strings to Nulls
Дата
Msg-id 1212260065.6360.1.camel@jdavis
обсуждение исходный текст
Ответ на Converting empty input strings to Nulls  ("Ken Winter" <ken@sunward.org>)
Список pgsql-general
On Sat, 2008-05-31 at 13:40 -0400, Ken Winter wrote:
> I'm looking for a way to trap this bad input at the database level, quietly
> convert the input empty strings to Null, and store the Null in the date
> column.  I tried a BEFORE INSERT OR UPDATE trigger evoking this function ...

You can replace your table with a view and use rules to transform the
updates and inserts.

Regards,
    Jeff Davis


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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Converting empty input strings to Nulls
Следующее
От: "Martin"
Дата:
Сообщение: Re: Converting empty input strings to Nulls