http://www.mail-archive.com/pgsql-general@postgresql.org/msg111788.htmlprobably
won't match an index, because ASC or DESC ordering depends NOT on
the table's data, but on the function parameter.
Unfortunately the planner does not recognize the following case:
CREATE TABLE "public"."prime" (
"nu
On Fri, Aug 15, 2008 at 9:35 PM, William Garrison <[EMAIL PROTECTED]>wrote:
> Is there an easy way to write one single query that can alternate between
> ASC and DESC orders? Ex:
>
>
Take a look at this link
http://www.mail-archive.com/pgsql-general@postgresql.org/msg111788.html
--
Regards,
Ser
On Aug 15, 2008, at 12:35 PM, William Garrison wrote:
Is there an easy way to write one single query that can alternate
between ASC and DESC orders? Ex:
CREATE OR REPLACE FUNCTION GetSomeStuff(_start integer, _count
integer, _sortDesc boolean)
RETURNS SETOF text AS
$BODY$
SE
Is there an easy way to write one single query that can alternate
between ASC and DESC orders? Ex:
CREATE OR REPLACE FUNCTION GetSomeStuff(_start integer, _count integer,
_sortDesc boolean)
RETURNS SETOF text AS
$BODY$
SELECT
something