Re: Accessing non catalog table in backend

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Accessing non catalog table in backend
Date: 2016-01-04 20:15:11
Message-ID: 568AD2CF.6060603@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/4/16 12:53 PM, Atri Sharma wrote:
Please don't top-post.
> On 5 Jan 2016 12:20 am, "Jim Nasby" <Jim(dot)Nasby(at)bluetreble(dot)com
> <mailto:Jim(dot)Nasby(at)bluetreble(dot)com>> wrote:
>
> On 1/4/16 12:07 PM, Atri Sharma wrote:
>
> Hi All,
>
> I wanted to check if it is possible to query a non catalog table
> in backend.
>
> I understand that cql interface is only for catalog querying
> hence it is
> not usable for this purpose per se.
>
>
> AFAIK it's possible to do it with low level routines, but I think
> unless you have a really good reason to go that route you're much
> better off just using SPI. If it's good enough for plpgsql... :)

> I was wary to use SPI inside the executor for node evaluation functions.
> Does it seem safe?

Oh, inside the executor? Yeah, I doubt attempting SPI there would end
well...

What exactly are you trying to do?
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2016-01-04 20:20:01 Re: 9.5 BLOCKER: regrole and regnamespace and quotes
Previous Message Tom Lane 2016-01-04 20:13:43 Re: Broken lock management in policy.c.