On Wed, Dec 9, 2015 at 5:07 PM Tom Lane wrote:
>
> FWIW, it's exposed in 9.4 and up. But in older branches you could
> probably just copy it, it's not that big.
>
That's good to know, thanks. I did copy it and it's almost 3x faster than
going through SPI. Thanks again for the pointer.
eric
Eric Ridge writes:
> On Wed, Dec 9, 2015 at 4:04 PM Tom Lane wrote:
>> 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.
FWIW, it's exposed in 9.4 and up. But in older branches you could
probably
On Wed, Dec 9, 2015 at 4:04 PM Tom Lane wrote:
> Eric Ridge 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
Eric Ridge 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.
regards, tom lane
--
Sent via pgsql-hackers
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.
An approach that works is (pseudocode):
SPI_connect();
"SELECT ev_action FROM pg_catalog.pg_rewrite WHERE rulename = '_RETURN'
and ev_class=?o