Re: [INTERFACES] limiting the rows selected in postgresql

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Sergio <ser(at)perio(dot)unlp(dot)edu(dot)ar>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] limiting the rows selected in postgresql
Date: 1998-11-09 20:27:49
Message-ID: Pine.GSO.3.96.SK.981109232202.28480A-100000@ra
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

On Sat, 7 Nov 1998, Sergio wrote:

> Date: Sat, 7 Nov 1998 13:39:27 -0300
> From: Sergio <ser(at)perio(dot)unlp(dot)edu(dot)ar>
> To: pgsql-interfaces(at)postgreSQL(dot)org
> Subject: Re: [INTERFACES] limiting the rows selected in postgresql
>
> Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it> el dМa Mon, 9 Nov 1998 14:33:06
> +0100, escribiС:
>
> >Hello Radhakrishnan,
> >
> >lunedЛ, 9 novembre 98, you wrote:
> >
> >
> >RCV> how can i limit the number of rows obtained from a select statement
> >RCV> in postgreSQL to say, 10 rows while the select condition actually
> >RCV> matches more than that. in oracle we can use the ROW_NUM variable
> >RCV> for this purpose but now i met such an issue with postgreSQL
> >
> >On v6.4 you can specify a limit for queries as:
> >
> >set QUERY_LIMIT TO '10';
> >To have only the first 10 rows from a select;
>
> this will limit _all_ the querys, right ?
> wich is not very flexible.
>
> I can't do something like
>
> select * from news order by news_date limit 10
>
> ?

Sergio,

be patient. Jan Wieck is working on patch for support LIMIT in select query.
I'm using his patch (trial 2) with 6.4 and it works great for me.
With this patch you can limit output using LIMIT offset,count statement.
Hope, this patch will come to 6.4.1.

Regards,

Oleg

PS. Browse hackers mailing list for last month to read discussion on
this subject.
>
> Sergio
>
>

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message D'Arcy J.M. Cain 1998-11-09 21:53:47 Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/backend/lib stringinfo.c'
Previous Message Jan Wieck 1998-11-09 19:01:43 Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/backend/lib stringinfo.c'

Browse pgsql-interfaces by date

  From Date Subject
Next Message A James Lewis 1998-11-09 22:06:11 Re: [INTERFACES] limiting the rows selected in postgresql
Previous Message Byron Nikolaidis 1998-11-09 17:57:11 Re: [INTERFACES] Vis Data ODBC