Re: [HACKERS] Reconsidering the behavior of ALTER COLUMN TYPE

2015-06-12 Thread Tom Lane
Noah Misch writes: > On Thu, Jun 11, 2015 at 03:41:49PM -0500, Merlin Moncure wrote: >> On Thu, Jun 11, 2015 at 3:12 PM, Tom Lane wrote: >>> In any case, we oughta use two different error messages for the two cases, >>> as per my comment in the above thread. That seems like a back-patchable >>>

Re: [HACKERS] Reconsidering the behavior of ALTER COLUMN TYPE

2015-06-11 Thread Noah Misch
On Thu, Jun 11, 2015 at 03:41:49PM -0500, Merlin Moncure wrote: > On Thu, Jun 11, 2015 at 3:12 PM, Tom Lane wrote: > > Specifically, it's not clear why you can change the type of a uuid[] > > column with > > > > alter table t alter u type text[]; > > > > but then you can't change it back with > >

Re: [HACKERS] Reconsidering the behavior of ALTER COLUMN TYPE

2015-06-11 Thread Merlin Moncure
On Thu, Jun 11, 2015 at 3:12 PM, Tom Lane wrote: > A recent thread in pgsql-general shows yet another user who's befuddled by > the need to add a USING clause to an ALTER TABLE ... ALTER COLUMN TYPE > command: > > http://www.postgresql.org/message-id/flat/CAD25zGDiaqCG=eqXp=byvzcdgvcqubh7kbpjpjqse

[HACKERS] Reconsidering the behavior of ALTER COLUMN TYPE

2015-06-11 Thread Tom Lane
A recent thread in pgsql-general shows yet another user who's befuddled by the need to add a USING clause to an ALTER TABLE ... ALTER COLUMN TYPE command: http://www.postgresql.org/message-id/flat/CAD25zGDiaqCG=eqXp=byvzcdgvcqubh7kbpjpjqsespowfv...@mail.gmail.com Specifically, it's not clear why