Skip to content

Commit 01f5823

Browse files
ashutosh-bapatCommitfest Bot
authored and
Commitfest Bot
committed
\dG tests and improvements
Commit 00f4c29 added support to use expanded mode to all list meta-commands. This commit adds a test to make sure that the support also works for new metacommand \dG added to list property graphs. a14707d introduced relation specific headers in describe output. Adjust it for property graphs. Ashutosh Bapat
1 parent 44b0462 commit 01f5823

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/bin/psql/describe.c

+1
Original file line numberDiff line numberDiff line change
@@ -4291,6 +4291,7 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys
42914291
(showMatViews) ? _("List of materialized views") :
42924292
(showSeq) ? _("List of sequences") :
42934293
(showForeign) ? _("List of foreign tables") :
4294+
(showPropGraphs) ? _("List of property graphs") :
42944295
"List of ???"; /* should not get here */
42954296
myopt.translate_header = true;
42964297
myopt.translate_columns = translate_columns;

src/test/regress/expected/create_property_graph.out

+9-1
Original file line numberDiff line numberDiff line change
@@ -645,12 +645,20 @@ SELECT pg_get_propgraphdef('pg_type'::regclass); -- error
645645
ERROR: "pg_type" is not a property graph
646646
\a\t
647647
\dG g1
648-
List of relations
648+
List of property graphs
649649
Schema | Name | Type | Owner
650650
-----------------------------+------+----------------+---------------------
651651
create_property_graph_tests | g1 | property graph | regress_graph_user1
652652
(1 row)
653653

654+
\dGx g1
655+
List of property graphs
656+
-[ RECORD 1 ]-----------------------
657+
Schema | create_property_graph_tests
658+
Name | g1
659+
Type | property graph
660+
Owner | regress_graph_user1
661+
654662
-- TODO
655663
\d g1
656664
Property graph "create_property_graph_tests.g1"

src/test/regress/sql/create_property_graph.sql

+1
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ SELECT pg_get_propgraphdef('pg_type'::regclass); -- error
248248
\a\t
249249

250250
\dG g1
251+
\dGx g1
251252

252253
-- TODO
253254
\d g1

0 commit comments

Comments
 (0)