From 9c10cc16d894b6a2dbf51f6b66cfb40d6d6e29fe Mon Sep 17 00:00:00 2001 From: Junwang Zhao Date: Fri, 7 Feb 2025 14:57:52 +0000 Subject: [PATCH v11 10/13] adapt property graph to more-intuitive titles --- src/bin/psql/describe.c | 6 ++++++ src/test/regress/expected/create_property_graph.out | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 124a749aed8..5751a228118 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4257,6 +4257,9 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys else if (showForeign) pg_log_error("Did not find any foreign tables named \"%s\".", pattern); + else if (showPropGraphs) + pg_log_error("Did not find any property graphs named \"%s\".", + pattern); else /* should not get here */ pg_log_error_internal("Did not find any ??? named \"%s\".", pattern); @@ -4277,6 +4280,8 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys pg_log_error("Did not find any sequences."); else if (showForeign) pg_log_error("Did not find any foreign tables."); + else if (showPropGraphs) + pg_log_error("Did not find any property graphs."); else /* should not get here */ pg_log_error_internal("Did not find any ??? relations."); } @@ -4291,6 +4296,7 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys (showMatViews) ? _("List of materialized views") : (showSeq) ? _("List of sequences") : (showForeign) ? _("List of foreign tables") : + (showPropGraphs) ? _("List of property graphs") : "List of ???"; /* should not get here */ myopt.translate_header = true; myopt.translate_columns = translate_columns; diff --git a/src/test/regress/expected/create_property_graph.out b/src/test/regress/expected/create_property_graph.out index 824695358f8..41a89a2708f 100644 --- a/src/test/regress/expected/create_property_graph.out +++ b/src/test/regress/expected/create_property_graph.out @@ -645,7 +645,7 @@ SELECT pg_get_propgraphdef('pg_type'::regclass); -- error ERROR: "pg_type" is not a property graph \a\t \dG g1 - List of relations + List of property graphs Schema | Name | Type | Owner -----------------------------+------+----------------+--------------------- create_property_graph_tests | g1 | property graph | regress_graph_user1 -- 2.39.5