Re: Rename a column if not already renamed.? - Mailing list pgsql-general

From Luca Ferrari
Subject Re: Rename a column if not already renamed.?
Date
Msg-id CAKoxK+5X5pwc97Jwt+jPGi6Nnp2JUnQccAUJstfu_3dKY3b-wA@mail.gmail.com
Whole thread Raw
In response to Rename a column if not already renamed.?  ("Day, David" <david.day@redcom.com>)
List pgsql-general
On Tue, Aug 20, 2019 at 9:07 PM Day, David <david.day@redcom.com> wrote:
>     EXECUTE format ('ALTER TABLE %s RENAME %s TO %s', schema_table_, old_name_, new_name);

Hard to say without the error, but any chance there is a quoting problem?
EXECUTE format ('ALTER TABLE %s RENAME %I TO %I', schema_table_,
old_name_, new_name);

Luca



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Rename a column if not already renamed.?
Next
From: "Day, David"
Date:
Subject: RE: Rename a column if not already renamed.?