Re: comparing NEW and OLD (any good this way?)

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: comparing NEW and OLD (any good this way?)
Дата
Msg-id 7781715e-7540-4a24-943e-2ab616cc0048@mm
обсуждение исходный текст
Ответ на Re: comparing NEW and OLD (any good this way?)  (Sam Mason <sam@samason.me.uk>)
Список pgsql-general
    Sam Mason wrote:

> > CREATE FUNCTION test() returns void as $$
> > declare
> >  r our_table;
> > begin
> >  r:=null;
> > end;
> > $$ LANGUAGE plpgsql;
> >
> > SELECT test() yields:
> > ERROR:        cannot assign non-composite value to a row variable
> > CONTEXT:  PL/pgSQL function "test" line 4 at assignment
>
> This just looks like PG missing a feature. plpgsql has much less user
> and developer time spent on it, so I'd expect to find more strangeness
> in darker corners like this.

Actually if I had written r:=null::our_table then this would have worked,
which negates the point I was trying to make. I'm not sure if it's an
oversight of plpgsql that null by itself is not accepted in this context, but
anyway my idea that it had something to do with a conceptual problem was
wrong.

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org

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

Предыдущее
От: "Daniel Verite"
Дата:
Сообщение: Re: comparing NEW and OLD (any good this way?)
Следующее
От: Harald Fuchs
Дата:
Сообщение: Re: Generating random unique alphanumeric IDs