Unbreak comments on composite type attributes.
Report and diagnosis by Peter Eisentraut.
This commit is contained in:
parent
9df96f9bb1
commit
262c1a42dc
|
@ -473,7 +473,7 @@ get_object_address_attribute(ObjectType objtype, List *objname,
|
|||
/* Extract relation name and open relation. */
|
||||
attname = strVal(lfirst(list_tail(objname)));
|
||||
relname = list_truncate(list_copy(objname), list_length(objname) - 1);
|
||||
relation = heap_openrv(makeRangeVarFromNameList(relname), lockmode);
|
||||
relation = relation_openrv(makeRangeVarFromNameList(relname), lockmode);
|
||||
reloid = RelationGetRelid(relation);
|
||||
|
||||
/* Look up attribute and construct return value. */
|
||||
|
|
|
@ -97,6 +97,10 @@ COMMENT ON TYPE bad IS 'bad comment';
|
|||
ERROR: type "bad" does not exist
|
||||
COMMENT ON TYPE default_test_row IS 'good comment';
|
||||
COMMENT ON TYPE default_test_row IS NULL;
|
||||
COMMENT ON COLUMN default_test_row.nope IS 'bad comment';
|
||||
ERROR: column "nope" of relation "default_test_row" does not exist
|
||||
COMMENT ON COLUMN default_test_row.f1 IS 'good comment';
|
||||
COMMENT ON COLUMN default_test_row.f1 IS NULL;
|
||||
-- Check shell type create for existing types
|
||||
CREATE TYPE text_w_default; -- should fail
|
||||
ERROR: type "text_w_default" already exists
|
||||
|
|
|
@ -95,6 +95,9 @@ SELECT * FROM get_default_test();
|
|||
COMMENT ON TYPE bad IS 'bad comment';
|
||||
COMMENT ON TYPE default_test_row IS 'good comment';
|
||||
COMMENT ON TYPE default_test_row IS NULL;
|
||||
COMMENT ON COLUMN default_test_row.nope IS 'bad comment';
|
||||
COMMENT ON COLUMN default_test_row.f1 IS 'good comment';
|
||||
COMMENT ON COLUMN default_test_row.f1 IS NULL;
|
||||
|
||||
-- Check shell type create for existing types
|
||||
CREATE TYPE text_w_default; -- should fail
|
||||
|
|
Loading…
Reference in New Issue