| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | CONNECTION keyword use in CREATE FOREIGN DATA WRAPPER |
| Date: | 2026-08-28 15:50:00 |
| Message-ID: | 3a890e4f-98ac-48a0-bc83-e465616ba1cb@eisentraut.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
A new feature in PG19 is that you can equip a foreign data wrapper with
a connection function that can be used by subscriptions, instead of
those subscriptions defining a connection string.
The syntax is
CREATE FOREIGN DATA WRAPPER ... CONNECTION function_name
I find that this is confusing compared to the existing
CREATE SUBSCRIPTION ... CONNECTION 'connection-string'
These two are closely related, per this feature, so the use of the same
keyword for two quite different things seems unfortunate.
I suggest that CREATE FOREIGN DATA WRAPPER should use a different
keyword. Option 1 would be something like CONNECTOR, which would match
well with the existing HANDLER and VALIDATOR. Option 2 might be
something like CONNECTION FUNCTION, which avoids a new keyword, and
matches a bit with CONNECTION LIMIT.
Thoughts?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jan Nidzwetzki | 2026-08-28 15:51:08 | Re: [PATCH] Fix PITR pause bypass when initial XLOG_RUNNING_XACTS has subxid overflow |
| Previous Message | Jacob Champion | 2026-08-28 15:29:02 | Re: [Proposal] add portaddr like hostaddr |