pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Philippe BEAUDOIN <phb.emaj@free.fr>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Column rename in an extension update script
Date: Wed, 3 May 2017 19:36:58 +0200
Message-ID: <bc6f67dc-65e4-bb00-ebb1-f98c290cf4ad@free.fr> (raw)
In-Reply-To: <649.1493832597@sss.pgh.pa.us>
References: <2cf7941e-4e41-7714-3de8-37b1a8f74dff@free.fr>
	<331e2430-9c74-ebeb-6e6c-e2257058bf92@aklaver.com>
	<649.1493832597@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

Le 03/05/2017 à 19:29, Tom Lane a écrit :
> Adrian Klaver <adrian.klaver@aklaver.com> writes:
>> On 04/30/2017 11:54 PM, Philippe BEAUDOIN wrote:
>>> Just after the ALTER TABLE statement, I want to access this table. But
>>> at this time, the altered column is not visible with its new name.
>>   From the error it looks to me like the statements are each run in a
>> separate session and the UPDATE is not seeing the ALTER TABLE.
> No, it's in the same session; the problem is the lack of a
> CommandCounterIncrement call between the ALTER's update and the parsing
> of the next statement.  That means the update isn't visible yet,
> even in its own session.  See the fix here:
>
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=9209e07605afe0349660447f20d83ef16...
>
> 			regards, tom lane
Thanks Tom for the fix. And thanks to Julien and Adrian too, for the 
time spent on this issue.

Regards.



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



view thread (6+ messages)

Message-ID: <bc6f67dc-65e4-bb00-ebb1-f98c290cf4ad@free.fr>
Permalink:  ../bc6f67dc-65e4-bb00-ebb1-f98c290cf4ad@free.fr/
Also on:    postgresql.org/message-id/bc6f67dc-65e4-bb00-ebb1-f98c290cf4ad@free.fr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: phb.emaj@free.fr, tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com
  Subject: Re: Column rename in an extension update script
  In-Reply-To: <bc6f67dc-65e4-bb00-ebb1-f98c290cf4ad@free.fr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox