Pavel Stehule <pavel.steh...@gmail.com> writes:
>> SELECT * from top5();

  $ TABLE top5;  -- add a view on top of the SRF

> you cannot use parameters - then I have to have prepared files like
> top10, top20, ... what is not too friendly

The SRF could be using custom GUCs so that you can parametrize it, or
just even classic parametersā€¦

  $ TABLE top(5);  -- needs a patch to accept SRF hereā€¦
  $ TABLE top LIMIT 5;

  $ SET top.limit = 5;
  $ TABLE top;

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to