script

From: Maik Trömel <maik(dot)troemel(at)maitro(dot)net>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: script
Date: 2005-11-10 09:10:22
Message-ID: 43730E7E.6020301@maitro.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

  • Re: script at 2005-11-10 08:31:26 from A. Kretschmer
  • Re: script at 2005-11-10 09:07:43 from Nicolay A Vasiliev

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-11-10 09:10:42 Re: Postmaster failing to start on reboot
Previous Message Nicolay A Vasiliev 2005-11-10 09:07:43 Re: script