From: | Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
---|---|
To: | ahsan hadi <ahsan(dot)hadi(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Cc: | Lætitia AVROT <laetitia(dot)avrot(at)gmail(dot)com> |
Subject: | Re: pg_dump new feature: exporting functions only. Bad or good idea ? |
Date: | 2021-07-09 22:43:42 |
Message-ID: | 269300d1-24c9-5bf2-9fad-812f89ed0091@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I took a quick look at the patch today. There was some minor bitrot
requiring a rebase, so I attach the rebased patch as v3.
The separate 0002 part contains some minor fixes - a couple
typos/rewording in the docs (would be good if a native speaker looked at
it, thought), and a slightly reworked chunk of code from pg_dump.c. The
change is more a matter of personal preference than correctness - it
just seems simpler this way, but ymmv. And I disliked that the comment
said "If we have to export only the functions .." but the if condition
was actually the exact opposite of that.
The main question I have is whether this should include procedures. I'd
probably argue procedures should be considered different from functions
(i.e. requiring a separate --procedures-only option), because it pretty
much is meant to be a separate object type. We don't allow calling DROP
FUNCTION on a procedure, etc. It'd be silly to introduce an unnecessary
ambiguity in pg_dump and have to deal with it sometime later.
I wonder if we should allow naming a function to dump, similarly to how
--table works for tables, for example.
regards
--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment | Content-Type | Size |
---|---|---|
0001-v3.patch | text/x-patch | 7.7 KB |
0002-minor-review-tweaks.patch | text/x-patch | 2.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jacob Champion | 2021-07-09 23:31:48 | Re: [PATCH] Pull general SASL framework out of SCRAM |
Previous Message | Bossart, Nathan | 2021-07-09 21:08:27 | Re: Pre-allocating WAL files |