PL/pgSQL RENAME bug?

From: "Command Prompt, Inc(dot)" <pgsql-hackers(at)commandprompt(dot)com>
To: Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: PL/pgSQL RENAME bug?
Date: 2001-10-23 01:36:31
Message-ID: Pine.LNX.4.30.0110221831380.31721-100000@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general 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(at)commandprompt(dot)com by way of pgsql-hackers(at)commandprompt(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-10-23 01:40:08 Re: [GENERAL] To Postgres Devs : Wouldn't changing the selectlimit
Previous Message Bruce Momjian 2001-10-23 01:28:12 Re: [GENERAL] To Postgres Devs : Wouldn't changing the selectlimit

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-10-23 01:40:08 Re: [GENERAL] To Postgres Devs : Wouldn't changing the selectlimit
Previous Message Thomas Lockhart 2001-10-23 01:34:00 Re: Does "postmaster -i"...