From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Clarifying the ImportForeignSchema API |
Date: | 2020-08-04 03:07:51 |
Message-ID: | 20200804030750.GG2408@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Folks,
I noticed that the API document for IMPORT FOREIGN SCHEMA states in
part:
It should return a list of C strings, each of which must contain a
CREATE FOREIGN TABLE command. These strings will be parsed and
executed by the core server.
A reasonable reading of the above is that it disallows statements
other than CREATE FOREIGN TABLE, which seems overly restrictive for no
reason I can discern. The list of C strings seems reasonable as a
requirement, but I think it would be better to rephrase this along the
lines of:
It should return a list of C strings, each of which must contain a
DDL command, for example CREATE FOREIGN TABLE. These strings will
be parsed and executed by the core server in order to create the
objects in the schema.
as a foreign schema might need types (the case I ran across) or other
database objects like CREATE EXTERNAL ROUTINE, when we dust off the
implementation of that, to support it.
I was unable to discern from my draft version of the spec whether
statements other than CREATE FOREIGN TABLE are specifically
disallowed, or whether it is intended to (be able to) contain CREATE
ROUTINE MAPPING statements.
Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
From | Date | Subject | |
---|---|---|---|
Next Message | Hao Wu | 2020-08-04 03:55:43 | Rewrite view? |
Previous Message | Kyotaro Horiguchi | 2020-08-04 03:00:33 | SSL TAP test fails due to default client certs. |