Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux