script - Mailing list pgsql-general

From Maik Trömel
Subject script
Date
Msg-id 43730E7E.6020301@maitro.net
Whole thread Raw
Responses Re: script
Re: script
List pgsql-general
Hello!

I want to run a shell script with variables under Postgresql.

An example:
I want to make the following query;

select *  from  tablename where id=1;
select *  from  tablename where id=2;
select *  from  tablename where id=3;
select *  from  tablename where id=4;
.........

Is it possible to do it this way and what is the right syntax. All i've
tried out didn't work.

while i<100 do
    select * from tablename where id=i;
    i=i+1;
done

Thanks for your help.

Greetings
Maik

pgsql-general by date:

Previous
From: Nicolay A Vasiliev
Date:
Subject: Dynamic web sites with PostgreSQL
Next
From: "surabhi.ahuja"
Date:
Subject: Re: Postmaster failing to start on reboot