pl/pgsql breakage in 8.1b4?
От | Philip Yarra |
---|---|
Тема | pl/pgsql breakage in 8.1b4? |
Дата | |
Msg-id | 200510281232.16050.philip@utiba.com обсуждение исходный текст |
Ответы |
Re: pl/pgsql breakage in 8.1b4?
|
Список | pgsql-hackers |
Just testing pl/pgsql functions in 8.1beta4, I see failures for syntax that works in 8.0.3. The simplest test case for this is: create table ptest(foo int, bar varchar(10)); create or replace function modify_ptest(foo int,bar varchar) returns numeric as $$ declare res numeric; beginupdate ptestset bar = modify_ptest.barwhere foo = modify_ptest.foo;res := 0; return res; end; $$ LANGUAGE plpgsql; The error message from psql is: ERROR: syntax error at or near "$1" at character 19 QUERY: update ptest set $1 = modify_ptest.bar where $2 = modify_ptest.foo CONTEXT: SQL statement in PL/PgSQL function "modify_ptest" near line 7 LINE 1: update ptest set $1 = modify_ptest.bar where $2 = modify... ^ I assume what I'm trying should still work, though I couldn't find comparable examples in the doco. Looks to me like a problem with parameter aliasing. Regards, Philip. ----------------- Utiba Pty Ltd This message has been scanned for viruses and dangerous content by Utiba mail server and is believed to be clean.
В списке pgsql-hackers по дате отправления: