Re: COMMENT ON INDEX silently fails - Mailing list pgsql-bugs

From Michael Herold
Subject Re: COMMENT ON INDEX silently fails
Date
Msg-id 1475263505.3787.0@mail.hemio.de
Whole thread Raw
In response to Re: COMMENT ON INDEX silently fails  (David Fetter <david@fetter.org>)
Responses Re: COMMENT ON INDEX silently fails  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
> Sure it does.

Okay, correct phrasing would be: It has unexpected effects.

> I suspect you were expecting the comment to be displayed in some
> place it
> isn't, but that's hard to discuss intelligently when you didn't say
> where
> you expected it to show up.

create table foo (f1 int primary key);
comment on index foo_pkey is 'test comment';
comment on constraint foo_pkey on foo is 'test comment 2';

# \di+
                           List of relations
Schema |   Name   | Type  |  Owner   | Table |    Size    | Description
--------+----------+-------+----------+-------+------------+--------------
public | foo_pkey | index | postgres | foo   | 8192 bytes | test comment
(1 row)

# SELECT * FROM pg_description WHERE description LIKE 'test com%';
objoid | classoid | objsubid |  description
--------+----------+----------+----------------
123732 |     1259 |        0 | test comment
123733 |     2606 |        0 | test comment 2
(2 rows)

$ pgAdmin III

Before `comment on constraint` the textarea for comment is empty and no
statement for comment in SQL pane.

Afterwards it is using 'test comment 2'.

Best,
Michael

pgsql-bugs by date:

Previous
From: Reyes Ponce
Date:
Subject: Re: BUG #14343: UPSERT (ON CONFLICT) doesn't check ON CONFLICT constraint first
Next
From: Tom Lane
Date:
Subject: Re: COMMENT ON INDEX silently fails