PL/pgSQL RENAME bug?

Поиск
Список
Период
Сортировка
От Command Prompt, Inc.
Тема PL/pgSQL RENAME bug?
Дата
Msg-id Pine.LNX.4.30.0110221831380.31721-100000@commandprompt.com
обсуждение исходный текст
Ответ на Re: [GENERAL] To Postgres Devs : Wouldn't changing the select limit  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: PL/pgSQL RENAME bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Good day,

My name is John Worsley, I'm one of the authors of the new O'Reilly
PostgrSQL book. We're wrapping up the PL/pgSQL chapter's technical edit
right now, but there are a couple of concerns that I was hoping someone
might be able to help with.

Mainly, the existing documentation on the RENAME statement seems
inaccurate; it states that you can re-name variables, records, or
rowtypes. However, in practice, our tests show that attempting to RENAME
valid variables with:
 RENAME varname TO newname;

...yeilds a PL/pgSQL parse error, inexplicably. If I try the same syntax
on a non-declared variable, it actually says "there is no variable" with
that name in the current block, so...I think something odd is happening. :)

I believe we have only gotten RENAME to work with either the NEW or OLD
record variables when using PL/pgSQL with triggers, but the documentation
suggests that this should be a general-purpose statement.

Any assistance would be greatly appreciated. :)

The RENAME statement seems kind of odd, since it seems that you could just
as easily declare a general variable with the right name to begin with,
and maybe that's why this isn't apparently documented anywhere else? I
just want to make sure the documentation is both accurate and complete.


Kind Regards,
Jw.
-- 
John Worsley, Command Prompt, Inc.
jlx@commandprompt.com by way of pgsql-hackers@commandprompt.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: createlang difficulty.
Следующее
От: Hiroshi Inoue
Дата:
Сообщение: Re: [GENERAL] To Postgres Devs : Wouldn't changing the