From: | Petr Chmelar <chmelarp(at)fit(dot)vutbr(dot)cz> |
---|---|
To: | bricklen <bricklen(at)gmail(dot)com> |
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 19:40:08 |
Message-ID: | cy1oxh.mqghb4.2x6c5e-qmf@kazi.fit.vutbr.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Dear Briklen and Pavel,
Yes, the z. is a typo, it should be z.z ... I can send the complete query and tables tomorrow, also I'll try to make it simpler (the function is about 300 lines).
Thanks for the early answers,
Petr
Dne 24.07.2013 17:14 napsal uživatel bricklen:
On Wed, Jul 24, 2013 at 7:45 AM, <chmelarp(at)fit(dot)vutbr(dot)cz> wrote:
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.
Can you reduce it to a simpler test case without the details you are not able to show? Statistically it is more likely there is an error in your plpgsql function than in postgres itself.
Also, is the "z." a typo, or is there really a dot after the "z"?
From | Date | Subject | |
---|---|---|---|
Next Message | prateek | 2013-07-25 07:22:15 | BUG #8330: Accessing Postgres database on iOS Application |
Previous Message | Pavel Stehule | 2013-07-24 15:45:15 | Re: BUG #8329: UPDATE x SET x.y = x.y + z does not work in PL/pgSQL |