Re: SQL/MED - core functionality

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: SQL/MED - core functionality
Дата
Msg-id 1292190474.15408.2.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: SQL/MED - core functionality  (Hitoshi Harada <umi.tanuki@gmail.com>)
Ответы Re: SQL/MED - core functionality  (Shigeru HANADA <hanada@metrosystems.co.jp>)
Список pgsql-hackers
On ons, 2010-12-01 at 12:30 +0900, Hitoshi Harada wrote:
> I've tried SQL/MED with postgresql_fdw last night, and found myself
> confusing the long setup procedure. A simplest way to use it AFAIK is:
> 
> 1.CREATE FOREIGN DATA WRAPPER ... (or run install sql script)
> 2.CREATE SERVER ... FOREIGN DATA WRAPPER ...
> 3.CREATE USER MAPPING FOR ...
> 4.CREATE FOREIGN TALBE( ... )
> 
> From a user's view, this is very long way to see a simplest foreign
> table. I know it is based on the standard, but I really want a
> shortcut. Especially, I don't understand why CREATE USER MAPPING FOR
> current_user SERVER <server> is needed for default use case. If you
> forget CREATE USER MAPPING and do CREATE FOREIGN TABLE, it raises an
> error. User mapping is useful if the local user and remote user should
> be mapped but I imagine in most cases they are the same.
> postgresql_fdw can tell the remote user by conninfo string, in
> addition.

I reviewed the standard about this, and a lot of things are
implementation-defined.  I think user mappings could be made optional.

> This is another topic, but it would be useful if CREATE FOREIGN TABLE
> can omit column definitions since fdw usually knows what should be
> there in the definitions. I some times mistyped the column names
> between remote and local and resulted in fail on execution.

Also, according to the standard, the column list in CREATE FOREIGN TABLE
is optional (if you can get it in some automatic way, of course).




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Wildcard search support for pg_trgm
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Extensions, patch v17