Re: [SQL] rewriting values with before trigger

Поиск
Список
Период
Сортировка
От Robert Treat
Тема Re: [SQL] rewriting values with before trigger
Дата
Msg-id 1051209495.7747.544.camel@camel
обсуждение исходный текст
Ответ на Re: [SQL] rewriting values with before trigger  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: [SQL] rewriting values with before trigger  (Dennis Gearon <gearond@cvc.net>)
Список pgsql-general
On Thu, 2003-04-24 at 12:39, Josh Berkus wrote:
> Robert,
>
> > Is there anyway to do be able to change the '' into NULL before data
> > validity is checked with a trigger?
>
> What about using a RULE instead?
>

RULE's follow this same behavior, erroring out if the data is not a
valid timestamp. (At least I've not been able to write a rule that
doesn't follow this) In fact you actually can't create the rule if you
have a where clause that isn't a proper matching datatype.

I seem to recall a solution for folks who need '' to represent 0 in int
fields was to use triggers or rules, but I guess that really isn't
possible :-(

Robert Treat




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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Factoring where clauses through UNIONS take 2
Следующее
От: Dennis Gearon
Дата:
Сообщение: Re: [SQL] rewriting values with before trigger