Re: Given a view relation OID, how to construct a Query? - Mailing list pgsql-hackers

From Eric Ridge
Subject Re: Given a view relation OID, how to construct a Query?
Date
Msg-id CANcm6wZFBDipRiH2AhxOHa_kaHHBPOmSzaMQPirujpjHYKTB6A@mail.gmail.com
Whole thread Raw
In response to Re: Given a view relation OID, how to construct a Query?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Given a view relation OID, how to construct a Query?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Dec 9, 2015 at 4:04 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Eric Ridge <eebbrr@gmail.com> writes:
> I'm doing some extension development (in C) and have a situation where I
> need to examine the target list of a view, but all I have is the view's oid.

Open the relation and use get_view_query(), perhaps.

I figured there was something simple, but I couldn't find it.  Thanks! Sadly, it's static.

eric

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Speedup twophase transactions
Next
From: Tom Lane
Date:
Subject: Re: [sqlsmith] Failed to generate plan on lateral subqueries