Re: CREATE SYNONYM in PostgreSQL - Mailing list pgsql-general

From Vinayak
Subject Re: CREATE SYNONYM in PostgreSQL
Date
Msg-id 1410498041961-5818755.post@n5.nabble.com
Whole thread Raw
In response to Re: CREATE SYNONYM in PostgreSQL  (Stephen Frost <sfrost@snowman.net>)
Responses Re: CREATE SYNONYM in PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Craig Ringer
Date:
Subject: Re: PostgreSQL Portable
Next
From: Tom Lane
Date:
Subject: Re: CREATE SYNONYM in PostgreSQL