-
Notifications
You must be signed in to change notification settings - Fork 595
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
comment on
clause support (#12849)
Co-authored-by: Richard Chien <[email protected]> Co-authored-by: August <[email protected]>
- Loading branch information
1 parent
7f791d6
commit b724be7
Showing
39 changed files
with
535 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,65 @@ | ||
query IIITT | ||
SELECT d.*, c.relname FROM pg_catalog.pg_description d join pg_catalog.pg_class c on d.objoid = c.oid ORDER BY d.objoid limit 15; | ||
statement ok | ||
create table t(a int, b text, c date); | ||
|
||
statement ok | ||
comment on table t is 'Lorem ipsum'; | ||
|
||
statement ok | ||
comment on column t.a is 'Praesent elementum'; | ||
|
||
statement ok | ||
comment on column public.t.c is 'Nullam ultricies'; | ||
|
||
statement ok | ||
comment on column public.t._row_id is 'facilisis enim'; | ||
|
||
query TIIIT | ||
SELECT | ||
c.relname, | ||
( | ||
SELECT relname FROM pg_catalog.pg_class WHERE oid = d.classoid | ||
) AS classoid, | ||
d.objsubid, | ||
d.description | ||
FROM | ||
pg_catalog.pg_description d | ||
JOIN pg_catalog.pg_class c | ||
ON d.objoid = c.oid | ||
ORDER BY d.objsubid; | ||
---- | ||
1 NULL 0 NULL pg_type | ||
2 NULL 0 NULL pg_namespace | ||
3 NULL 0 NULL pg_cast | ||
4 NULL 0 NULL pg_matviews | ||
5 NULL 0 NULL pg_user | ||
6 NULL 0 NULL pg_class | ||
7 NULL 0 NULL pg_index | ||
8 NULL 0 NULL pg_opclass | ||
9 NULL 0 NULL pg_collation | ||
10 NULL 0 NULL pg_am | ||
11 NULL 0 NULL pg_operator | ||
12 NULL 0 NULL pg_views | ||
13 NULL 0 NULL pg_attribute | ||
14 NULL 0 NULL pg_database | ||
15 NULL 0 NULL pg_description | ||
t rw_tables -1 facilisis enim | ||
t rw_tables 0 Lorem ipsum | ||
t rw_tables 1 Praesent elementum | ||
t rw_tables 3 Nullam ultricies | ||
|
||
statement ok | ||
comment on table public.t is NULL; | ||
|
||
statement ok | ||
comment on column t._row_id is NULL; | ||
|
||
statement ok | ||
comment on column t.c is ''; | ||
|
||
statement ok | ||
comment on column public.t.b is 'Vivamus fermentum'; | ||
|
||
query TIIIT | ||
SELECT | ||
c.relname, | ||
( | ||
SELECT relname FROM pg_catalog.pg_class WHERE oid = d.classoid | ||
) AS classoid, | ||
d.objsubid, | ||
d.description | ||
FROM | ||
pg_catalog.pg_description d | ||
JOIN pg_catalog.pg_class c | ||
ON d.objoid = c.oid | ||
ORDER BY d.objsubid; | ||
---- | ||
t rw_tables 1 Praesent elementum | ||
t rw_tables 2 Vivamus fermentum | ||
|
||
statement ok | ||
drop table t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.