Re: COMMENT ON mega patch - Mailing list pgsql-patches

From Tom Lane
Subject Re: COMMENT ON mega patch
Date
Msg-id 11069.1069454723@sss.pgh.pa.us
Whole thread Raw
In response to COMMENT ON mega patch  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: COMMENT ON mega patch  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-patches
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> This patch does the following:
> 1. Comment on 5 new objects:
> [ etc ]

Reviewed and applied.  Couple things I didn't like:

* You were using a bare C string as the amname argument in COMMENT ON
OPERATOR CLASS.  This won't do because the parse tree is not a valid
Node structure; copyObject will fail on it.  I inserted makeString()
and strVal() calls to fix it.

BTW, a simple test to detect uncopiable-parsetree problems is to compile
with COPY_PARSE_PLAN_TREES defined.  Doing so revealed that you're not
the only person to have made this mistake lately --- ALTER SEQUENCE is
broken too.

* I made the macros LARGE and OBJECT be LARGE_P and OBJECT_P; they
seemed just a little too ripe for conflicts as-is ...

* The pg_dump code for COMMENT ON OPCLASS pretty obviously had not been
tested :-(

            regards, tom lane

pgsql-patches by date:

Previous
From: Joe Conway
Date:
Subject: Re: Problem with dblink
Next
From: Craig Boston
Date:
Subject: PATCH: Uninitialized variable usage in contrib/pg_autovacuum