Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
262c1a42
Commit
262c1a42
authored
Oct 19, 2010
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unbreak comments on composite type attributes.
Report and diagnosis by Peter Eisentraut.
parent
9df96f9b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
src/backend/catalog/objectaddress.c
src/backend/catalog/objectaddress.c
+1
-1
src/test/regress/expected/create_type.out
src/test/regress/expected/create_type.out
+4
-0
src/test/regress/sql/create_type.sql
src/test/regress/sql/create_type.sql
+3
-0
No files found.
src/backend/catalog/objectaddress.c
View file @
262c1a42
...
@@ -473,7 +473,7 @@ get_object_address_attribute(ObjectType objtype, List *objname,
...
@@ -473,7 +473,7 @@ get_object_address_attribute(ObjectType objtype, List *objname,
/* Extract relation name and open relation. */
/* Extract relation name and open relation. */
attname
=
strVal
(
lfirst
(
list_tail
(
objname
)));
attname
=
strVal
(
lfirst
(
list_tail
(
objname
)));
relname
=
list_truncate
(
list_copy
(
objname
),
list_length
(
objname
)
-
1
);
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
);
reloid
=
RelationGetRelid
(
relation
);
/* Look up attribute and construct return value. */
/* Look up attribute and construct return value. */
...
...
src/test/regress/expected/create_type.out
View file @
262c1a42
...
@@ -97,6 +97,10 @@ COMMENT ON TYPE bad IS 'bad comment';
...
@@ -97,6 +97,10 @@ COMMENT ON TYPE bad IS 'bad comment';
ERROR: type "bad" does not exist
ERROR: type "bad" does not exist
COMMENT ON TYPE default_test_row IS 'good comment';
COMMENT ON TYPE default_test_row IS 'good comment';
COMMENT ON TYPE default_test_row IS NULL;
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
-- Check shell type create for existing types
CREATE TYPE text_w_default; -- should fail
CREATE TYPE text_w_default; -- should fail
ERROR: type "text_w_default" already exists
ERROR: type "text_w_default" already exists
...
...
src/test/regress/sql/create_type.sql
View file @
262c1a42
...
@@ -95,6 +95,9 @@ SELECT * FROM get_default_test();
...
@@ -95,6 +95,9 @@ SELECT * FROM get_default_test();
COMMENT
ON
TYPE
bad
IS
'bad comment'
;
COMMENT
ON
TYPE
bad
IS
'bad comment'
;
COMMENT
ON
TYPE
default_test_row
IS
'good comment'
;
COMMENT
ON
TYPE
default_test_row
IS
'good comment'
;
COMMENT
ON
TYPE
default_test_row
IS
NULL
;
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
-- Check shell type create for existing types
CREATE
TYPE
text_w_default
;
-- should fail
CREATE
TYPE
text_w_default
;
-- should fail
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment