Re: CREATE SYNONYM in PostgreSQL

Поиск
Список
Период
Сортировка
От Vinayak
Тема Re: CREATE SYNONYM in PostgreSQL
Дата
Msg-id 1410498041961-5818755.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: CREATE SYNONYM in PostgreSQL  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: CREATE SYNONYM in PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello,

>There are pros and cons to this approach.  In general, I'd recommend
>using a simple view instead of trying to use the search_path- for
>example, prepared queries will look up the OID based on the current
>search_path.  If you prepare a query, then change your search_path, and
>run that prepared query, it's going to use the table which was resolved
>using the search_path when the query was initially planned.
I agreed to use view instead of search_path.

>> Is there any way to automate the oracle's CREATE SYNONYM in PostgreSQL or
>> can we use hook like post_parse_analyze_hook to implement this?

>You could try but that doesn't seem likely to work out too well..
I want to convert Oracle CREATE SYNONYM statement into PostgreSQL CREATE
VIEW statement in my own extension not in the PostgreSQL core.
Is it possible to parse the CREATE SYNONYM statement and convert into CREATE
VIEW statement using post_parse_analyze_hook? or is there any other idea to
automate this process?





-----
Regards,
Vinayak,

--
View this message in context:
http://postgresql.1045698.n5.nabble.com/CREATE-SYNONYM-in-PostgreSQL-tp5818446p5818755.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: PostgreSQL Portable
Следующее
От: Tom Lane
Дата:
Сообщение: Re: CREATE SYNONYM in PostgreSQL