Implementation of external data management #1158#8759
Implementation of external data management #1158#8759paradox1307 wants to merge 8 commits intoFirebirdSQL:masterfrom
Conversation
|
This is a draft implementation of external data management (SQL:MED). It will be improved after the metacache #7954 is merged. |
|
Are there any restrictions for users/roles on using foreign servers? I think there should be. That is, we should have something like: This is important, especially if the foreign server stores authentication data. Not every authenticated user should be able to use it in an |
doc/sql.extensions/README.MED.md
Outdated
| | RDB$FOREIGN_SERVER_NAME | CHAR \(63\) | The foreign server name | | ||
| | RDB$FOREIGN_OPTION_NAME | CHAR \(63\) | Option name | | ||
| | RDB$FOREIGN_OPTION_VALUE | VARCHAR \(32765\) | Option value | | ||
| | RDB$OWNER_NAME | SHORT | Option type | |
There was a problem hiding this comment.
May be RDB$FOREIGN_OPTION_TYPE ?
There was a problem hiding this comment.
Yes, corrected.
| continue; | ||
|
|
||
| buffer.append(option.first.c_str()); | ||
| buffer.append(";"); |
There was a problem hiding this comment.
Why is there a semicolon ; here? I would have expected an equals symbol =.
There was a problem hiding this comment.
The idea was that option names and option values follow each other and there is no sense in adding a special character to separate them, i.e. option_1_name;option_1_value;option_2_name;option_2_value;.... If this is confusing, it can be changed to something else.
There was a problem hiding this comment.
In principle, this approach will work, provided that each option requires a value. In this case, we eliminate the possibility of passing only the option name as a flag.
GRANT USAGE ON FOREIGN SERVER <server_name>
TO <grantee_list> [WITH GRANT OPTION]
[{GRANTED BY | AS} [USER] <grantor>];
REVOKE [GRANT OPTION FOR]
USAGE ON FOREIGN SERVER <server_name>
FROM <grantee_list>
[{GRANTED BY | AS} [USER] <grantor>];
Yes, there should be restrictions on using foreign servers. The MED standard requires |
doc/sql.extensions/README.MED.md
Outdated
| [[DROP] FOREIGN DATA WRAPPER | [DROP] USING PLUGIN <provider(plugin)>] [OPTIONS(<option> [, <option> ...] )] | ||
| <option> ::= { | ||
| [DROP] <option name> [= 'value'] | ||
| | [DROP] <option name> [{FILE | ENV}] ['value'] } |
There was a problem hiding this comment.
This description confuses people because it's unclear what's required and what's optional. A better explanation would be:
ALTER SERVER <foreign server name>
[[DROP] {FOREIGN DATA WRAPPER | USING PLUGIN} <provider(plugin)>]
[OPTIONS (<option> [, <option> ...] )]
<option> ::= {
<option name> = 'value'
| <option name> [{FILE | ENV}] 'value'
| DROP <option name>
}
There was a problem hiding this comment.
Corrected, thanks.
This should be described in the |
Added description |
Link to RFC - Distributed queries (Management of External Data) proposal