Re: ALTER TABLE behind-the-scenes effects' CONTEXT - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: ALTER TABLE behind-the-scenes effects' CONTEXT
Date
Msg-id CAFj8pRDnaZWnHMc5bypaycXGvvHD_fa0p27Kb_uBb7HS1ns+4A@mail.gmail.com
Whole thread Raw
In response to ALTER TABLE behind-the-scenes effects' CONTEXT  (Marko Tiikkaja <marko@joh.to>)
Responses Re: ALTER TABLE behind-the-scenes effects' CONTEXT  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers


2015-10-05 0:08 GMT+02:00 Marko Tiikkaja <marko@joh.to>:
Hi,

In the past I've found the error message in cases such as this somewhat less helpful than it could be:

=# CREATE TABLE qqq (a int);
=# CREATE UNIQUE INDEX IF NOT EXISTS qqq_a_idx ON qqq(a);
=# ALTER TABLE qqq ALTER COLUMN a TYPE json USING NULL;
ERROR:  data type json has no default operator class for access method "btree"
HINT:  You must specify an operator class for the index or define a default operator class for the data type.

The attached patch adds a CONTEXT line to index and constraint rebuilds, e.g:

  CONTEXT:  while rebuilding index qqq_a_idx

Any feedback welcome.

I prefer using DETAIL field for this case.

Regards

Pavel



.m


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


pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Speed up Clog Access by increasing CLOG buffers
Next
From: Michael Paquier
Date:
Subject: Re: [PATCH] postgres_fdw extension support