Re: CREATE SYNONYM in PostgreSQL

From: Vinayak <vinpokale(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: CREATE SYNONYM in PostgreSQL
Date: 2014-09-12 05:00:41
Message-ID: 1410498041961-5818755.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-09-12 05:08:05 Re: CREATE SYNONYM in PostgreSQL
Previous Message Craig Ringer 2014-09-12 03:33:55 Re: PostgreSQL Portable