Re: subquery in limit - Mailing list pgsql-hackers

From Tom Lane
Subject Re: subquery in limit
Date
Msg-id 3176.1203090275@sss.pgh.pa.us
Whole thread Raw
In response to Re: subquery in limit  ("Roberts, Jon" <Jon.Roberts@asurion.com>)
Responses Re: subquery in limit
List pgsql-hackers
"Roberts, Jon" <Jon.Roberts@asurion.com> writes:
> I have no idea why you can't do a subquery in the limit

It hasn't seemed worth putting any effort into --- AFAIR this is the
first time anyone's even inquired about it.  As you say, you can always
use a function.

> And I'm sure someone will point out a more efficient way to write my
> function without using pl/pgsql.  :)

Only that it doesn't seem a particularly bright idea to use SECURITY
DEFINER for a function that will execute any arbitrary caller-provided
SQL ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ANALYZE to be ignored by VACUUM
Next
From: "Roberts, Jon"
Date:
Subject: Re: subquery in limit