* Ronan Dunklau (ronan.dunk...@dalibo.com) wrote:
> So, without extending the syntax too much, we could add options:
> 
> IMPORT FOREIGN SCHEMA remote_schema FROM SERVER server_name INTO local_schema
> [ { LIMIT TO | EXCEPT } (table_name [, ...])]
> [ OPTIONS (option_list) ]
> 
> This option list could then contain fdw-specific options, including type 
> mapping.

Yup, that looks reasonable to me.

> Or we could add a specific clause:
> 
> IMPORT FOREIGN SCHEMA remote_schema FROM SERVER server_name INTO local_schema
> [ { LIMIT TO | EXCEPT } (table_name [, ...])]
> [ OPTIONS (option_list) ]
> [ TYPE MAPPING some mapping_definition ]

-1 on this one.

> With mapping_definition being either a tuple, or well-defined jsonb format 
> common accross FDWs.
> 
> A third solution, which I don't like but doesn't modify the SQL grammar, 
> would 
> be to encode the options in the remote_schema name.

Yeah, don't like that one either.

        Thanks,

                Stephen

Attachment: signature.asc
Description: Digital signature

Reply via email to