Re: [SQL] rewriting values with before trigger

Поиск
Список
Период
Сортировка
От elein
Тема Re: [SQL] rewriting values with before trigger
Дата
Msg-id 200304250033.h3P0XuDl088102@pimout1-ext.prodigy.net
обсуждение исходный текст
Ответ на Re: [SQL] rewriting values with before trigger  (Robert Treat <xzilla@users.sourceforge.net>)
Ответы Re: [SQL] rewriting values with before trigger  (Robert Treat <xzilla@users.sourceforge.net>)
Список pgsql-general
I don't think this is a bug at all.
Argument creation has to come before the execution
of the function.  That in this case the argument is a row type
doesn't matter.  It has nothing to do with the content of the
function and everything to do with creating the row NEW.
How can you possibly assign a value to NEW.bar if NEW as
a whole does not exist?

What are you really trying to do here?  Maybe setting the
table column's default to NULL will achieve what you want.

elein

On Thursday 24 April 2003 12:49, Robert Treat wrote:
> On Thu, 2003-04-24 at 15:35, Dennis Gearon wrote:
> > Well,
> >     does ''::INT do anything valuable?
>
>     not in 7.3+, and given my original problem involves timestamps, not in
> 7.2 either.
>
> >     change column to a string, convert to INTS on the way out, STRINGS on
> > the way in? use an external language to make transitions.
>
> yeah, I've thought of some other crazy ways to get around this, but the
> problem is due to a bug in the application side. I was hoping I could
> write a quick hack (like adding a rule/trigger) to get around this until
> the app was fixed, but I'm not going to make my side a kludge when it
> isn't one now.
>
>
> Robert Treat
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
----------------------------------------------------------------------------------------
elein@varlena.com     Database Consulting     www.varlena.com
              I have always depended on the [QA] of strangers.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Factoring where clauses through UNIONS take 2
Следующее
От: elein
Дата:
Сообщение: Re: Storing sequence numbers for later use