public inbox for [email protected]
help / color / mirror / Atom feedFrom: Aditya Toshniwal <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][RM4191] Comments is not visible in SQL pane for partition table
Date: Thu, 31 Oct 2019 15:16:55 +0530
Message-ID: <CAM9w-_nqKg69zx+tBZ2Qrp4BCPhdg39Qpusb13QeTw9xNG1wig@mail.gmail.com> (raw)
Hi Hackers,
Attached is a tiny patch to show comments in SQL tab for partitions of a
table.
Kindly review.
--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"
Attachments:
[application/octet-stream] RM4191.patch (1.7K, 3-RM4191.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/create.sql
index a033f9c6e..6db5452b5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/create.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/create.sql
@@ -34,3 +34,8 @@ TABLESPACE {{ conn|qtIdent(data.spcname) }};
ALTER TABLE {{conn|qtIdent(data.schema, data.name)}}
OWNER to {{conn|qtIdent(data.relowner)}};
{% endif %}
+{### SQL for COMMENT ###}
+{% if data.description %}
+COMMENT ON TABLE {{conn|qtIdent(data.schema, data.name)}}
+ IS {{data.description|qtLiteral}};
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/create.sql
index a033f9c6e..6db5452b5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/create.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/create.sql
@@ -34,3 +34,8 @@ TABLESPACE {{ conn|qtIdent(data.spcname) }};
ALTER TABLE {{conn|qtIdent(data.schema, data.name)}}
OWNER to {{conn|qtIdent(data.relowner)}};
{% endif %}
+{### SQL for COMMENT ###}
+{% if data.description %}
+COMMENT ON TABLE {{conn|qtIdent(data.schema, data.name)}}
+ IS {{data.description|qtLiteral}};
+{% endif %}
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [pgAdmin][RM4191] Comments is not visible in SQL pane for partition table
In-Reply-To: <CAM9w-_nqKg69zx+tBZ2Qrp4BCPhdg39Qpusb13QeTw9xNG1wig@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox