Re: IMPORT FOREIGN SCHEMA statement

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: IMPORT FOREIGN SCHEMA statement
Дата
Msg-id 20140527142944.GK2556@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: IMPORT FOREIGN SCHEMA statement  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: IMPORT FOREIGN SCHEMA statement
Список pgsql-hackers
* Alvaro Herrera (alvherre@2ndquadrant.com) wrote:
> Stephen Frost wrote:
> > > It seems like it would often be desirable for the Oracle FDW to smash
> > > all-upper-case names to all-lower-case while importing, so that no quoting
> > > is needed on either side.  I doubt though that this is so desirable that
> > > it should happen unconditionally.
> >
> > The oracle FDW would simply need a foreign-server level option which
> > says "smash everything to lowercase on import".
>
> That's not the same thing though -- consider what happens to the quoting
> needs for names with mixed case.  If you change mixed case to
> all-lowercase, references to such objects using quotes in the
> application code would fail because the name is now all-lowercase in
> Postgres.  A tri-valued enum could do the trick:
> lowercase_names={wholly_uppercase_only, all, none}
> with the first one being the most sensible and default.

Sure, I was being a bit over-simplistic.  As was mentioned up-thread,
the option would rather be "flip all-uppercase to lowercase and all-
lowercase to uppercase, quote any which are mixed", or something along
those lines.  What I was trying to get at is that it's up to the FDW
what options it wants to support in this regard and we already have a
way for the admin to pass in useful information to the FDW by way of the
FOREIGN SERVER FDW options.

This, plus the generic ability to pass an OPTIONS clause to the IMPORT
(allowing you to have different defaults for different IMPORT
statements) and having it be transactional, as you mention, appears to
be covering all the relevant bases.
Thanks,
    stephen

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: IMPORT FOREIGN SCHEMA statement
Следующее
От: Matteo Beccati
Дата:
Сообщение: Re: [PATCH] Replacement for OSSP-UUID for Linux and BSD