| From: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
|---|---|
| To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Ajit Awekar <ajitpostgres(at)gmail(dot)com> |
| Subject: | Re: Allow table AMs to define their own reloptions |
| Date: | 2026-10-11 22:26:18 |
| Message-ID: | CAN4CZFOJjMc+4KpMHYrDOUOfdkZKX6fZzj1qrZNn32=ckOhewg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> That requires AMs to inherit standard option names rather than
> redefine
It looks a lot better this way, but shouldn't the documentation
mention somewhere that AMs that don't do this, like
dummy_custom_table_am can fail to restore --no-table-access-method
dumps from other AMs?
+
+/* The standard options, all of which dummy_table_am accepts */
+static const relopt_parse_elt dt_std_options[] = {
+ {"fillfactor", RELOPT_TYPE_INT,
+ offsetof(struct DummyTableOptions, std.fillfactor)},
and
+ for (int j = 0; j < lengthof(dt_std_options); j++)
+ {
+ add_reloption_to_kind(dt_std_options[j].optname, dt_relopt_kind);
+ dt_relopt_tab[i++] = dt_std_options[j];
+ }
+
Wouldn't a helper be useful for this based on / around
stdRdOptionsTab, so that it doesn't require this much fragile
copy-pasting?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-10-11 22:59:16 | Re: ABI Compliance Checker GSoC Project |
| Previous Message | Álvaro Herrera | 2026-10-11 21:40:28 | Re: Bug in logical decoding with DDL and subtransactions |