From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | WHERE CURRENT OF $n still needed? |
Date: | 2009-11-06 19:47:58 |
Message-ID: | 1072.1257536878@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
There is some code in the core parser to support the syntax
UPDATE/DELETE ... WHERE CURRENT OF $n
where $n is a parameter symbol. This was put in to support plpgsql,
with the expectation that $n would refer to a plpgsql cursor variable.
Now that plpgsql is not doing textual insertion of $n symbols, this
is dead code --- and in fact I just realized that the case is actually
broken :-(. There is a regression test for WHERE CURRENT OF in
plpgsql, but it is only working accidentally because the cursor's
portal name is the same as its plpgsql name. What we need is for the
core parser to see if the name can be resolved as a parameter, instead.
While I'm fixing that, I wonder whether we should take out the $n
syntax case? It's undocumented, but that doesn't mean that someone
hasn't found a way to use it. Comments?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-11-06 19:59:51 | Re: operator exclusion constraints |
Previous Message | Jeff Davis | 2009-11-06 19:22:31 | Re: operator exclusion constraints |