CONNECTION keyword use in CREATE FOREIGN DATA WRAPPER - Mailing list pgsql-hackers

From Peter Eisentraut
Subject CONNECTION keyword use in CREATE FOREIGN DATA WRAPPER
Date
Msg-id 3a890e4f-98ac-48a0-bc83-e465616ba1cb@eisentraut.org
Whole thread
Responses Re: Making the ENUM operators LEAKPROOF
List 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?




pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: [Proposal] add portaddr like hostaddr
Next
From: Daniel Gustafsson
Date:
Subject: Re: Changing the state of data checksums in a running cluster