From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | chmelarp(at)fit(dot)vutbr(dot)cz |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #8329: UPDATE x SET x.y = x.y + z does not work in PL/pgSQL |
Date: | 2013-07-24 15:45:15 |
Message-ID: | CAFj8pRD4Gp3OA-iU+gUF6uq4z+JDL4PUUfDqpPxXn7znqGW+Hw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hello
2013/7/24 <chmelarp(at)fit(dot)vutbr(dot)cz>:
> The following bug has been logged on the website:
>
> Bug reference: 8329
> Logged by: Petr
> Email address: chmelarp(at)fit(dot)vutbr(dot)cz
> PostgreSQL version: 9.2.4
> Operating system: Fedora x64
> Description:
>
> Hi there,
> we have an issue - if I run a query from a console, it runs OK. When it is
> run using EXECUTE in an PL/pgSQL function, it sets NULL. The simplest
> version of the query is like this:
> UPDATE x
> SET x.y = x.y + z.
> FROM (SELECT z) as Z
> WHERE ... ;
>
>
> If I don't use the "+" in the SET command, it works OK. The whle query is
> quite complex, but OK in a console. If you need the query an tables..., mail
> me, please. I can't make it public.
>
It looks like some problem with naming collision - have you some
plpgsql variable named "z" ??
Please, you have to send a complete example in this case. Usually this
query is ook - and probably you have a problem with some interaction
PL/pgSQL | SQL
Regards
Pavel Stehule
>
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
From | Date | Subject | |
---|---|---|---|
Next Message | Petr Chmelar | 2013-07-24 19:40:08 | Re: BUG #8329: UPDATE x SET x.y = x.y + z does not work in PL/pgSQL |
Previous Message | bricklen | 2013-07-24 15:14:22 | Re: BUG #8329: UPDATE x SET x.y = x.y + z does not work in PL/pgSQL |