From: Postgres DBA <postgres@nest.bistbn.com>
To: Remigiusz Sokolowski <rems@gdansk.sprint.pl>
Cc: Frank Morton <fmorton@base2inc.com>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Newbie questions
Date: Mon, 14 Dec 1998 13:28:55 +0200 (IST)
Message-ID: <Pine.BSF.4.02.9812141326580.5103-100000@nest.bistbn.com> (raw)
In-Reply-To: <Pine.GS4.4.02A.9812140916340.14291-100000@netra.gdansk.sprint.pl>
About LIMIT:
it is implemented as feature add-on to 6.4 release and could be downloaded
from patch directory on Postgres FTP site.
Al.
On Mon, 14 Dec 1998, Remigiusz Sokolowski wrote:
> > Question #1
> >
> > If a select might match MANY rows, how can I limit it to say 50?
> >
> > I thought you could do:
> >
> > select * from table limit 50;
>
> look at description of cursor in man - there are also examples
> begin work;
> declare cursor bookmark for
> your select statement;
> fetch 50 in bookmark;
> close bookmark;
> commit;B
>
> >
> > Question #2
> >
> > In doing a select, is there a way to ignore if the case of the key?
> >
> > For example, if I have a table called animals with an id column and
> > it might contain "dog" or "DOG" or "Dog" and I want to match all
> > of them, how do I do it, with or without the "like" operator?
> >
> > I'd like to say:
> >
> > select * from animals where id='dogs' ignore case;
>
> look at operators in docs
> ~~ - LIKE operator
> ~* - match(regex), case insensitive operator
> I have no idea which is better
> Rem
> p.s. I could make some mistakes in this examples - check in amnual or docs
> --------------------------------------------------------------------------------
> Remigiusz Sokolowski e-mail: rems@gdansk.sprint.pl
> --------------------------------------------------------------------------------
>
>
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: postgres@nest.bistbn.com, rems@gdansk.sprint.pl, fmorton@base2inc.com
Subject: Re: [SQL] Newbie questions
In-Reply-To: <Pine.BSF.4.02.9812141326580.5103-100000@nest.bistbn.com>
References: <Pine.GS4.4.02A.9812140916340.14291-100000@netra.gdansk.sprint.pl> <Pine.BSF.4.02.9812141326580.5103-100000@nest.bistbn.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox