ALTER TABLE behind-the-scenes effects' CONTEXT

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема ALTER TABLE behind-the-scenes effects' CONTEXT
Дата
Msg-id 5611A371.2030704@joh.to
обсуждение исходный текст
Ответы Re: ALTER TABLE behind-the-scenes effects' CONTEXT  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
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.


.m

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Less than ideal error reporting in pg_stat_statements
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Less than ideal error reporting in pg_stat_statements