pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
COMMENT ON CONSTRAINT
2+ messages / 2 participants
[nested] [flat]

* COMMENT ON CONSTRAINT
@ 2004-08-11 14:29  Sascha Ziemann <ziemann@secunet.de>
  0 siblings, 1 reply; 2+ messages in thread

From: Sascha Ziemann @ 2004-08-11 14:29 UTC (permalink / raw)
  To: pgsql-sql

Hi,

I have a problem with the COMMENT command.  Here:

http://www.postgresql.org/docs/7.4/static/sql-comment.html

it is defined in this way:

COMMENT ON
{
  TABLE object_name |
  COLUMN table_name.column_name |
  AGGREGATE agg_name (agg_type) |
  CONSTRAINT constraint_name ON table_name |
  DATABASE object_name |
  DOMAIN object_name |
  FUNCTION func_name (arg1_type, arg2_type, ...) |
  INDEX object_name |
  OPERATOR op (leftoperand_type, rightoperand_type) |
  RULE rule_name ON table_name |
  SCHEMA object_name |
  SEQUENCE object_name |
  TRIGGER trigger_name ON table_name |
  TYPE object_name |
  VIEW object_name
} IS 'text'

I would like to comment a constraint but it doesn't work.  I did the
following:

create table tab3 (
  a integer,
  b integer,
  constraint uni unique (a, b)
);

comment on constraint uni on table tab3 is 'unique pair';

Did I do anything wrong or is this a bug?

cu Sascha

-- 
secunet Security Networks AG, Im Teelbruch 116, 45219 Essen
Tel: +49-2054-123-408   Fax: +49-2054-123-123
PGP: FBE2 A49B 6526 C1B4 7F10  24E4 5004 7C27 6E9A 9698




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: COMMENT ON CONSTRAINT
@ 2004-08-16 01:03  Andreas Seltenreich <seltenreich@gmx.de>
  parent: Sascha Ziemann <ziemann@secunet.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Andreas Seltenreich @ 2004-08-16 01:03 UTC (permalink / raw)
  To: ziemann@secunet.de; +Cc: pgsql-sql

Sascha Ziemann writes:

> it is defined in this way:
[...]
>   CONSTRAINT constraint_name ON table_name |

Well then...

> comment on constraint uni on table tab3 is 'unique pair';
                               ^^^^^
...why do you insert "table" when it is defined without? :-)

regards
Andreas



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-08-16 01:03 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-08-11 14:29 COMMENT ON CONSTRAINT Sascha Ziemann <ziemann@secunet.de>
2004-08-16 01:03 ` Andreas Seltenreich <seltenreich@gmx.de>

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