Looping through string constants

From: David Kerr <dmk(at)mr-paradox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Looping through string constants
Date: 2009-08-12 22:55:51
Message-ID: 20090812225551.GA51062@mr-paradox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'd like to loop through a group of constant string values using plpgsql

The best analog i can think of would be in a shell script
#!/usr/bin/ksh

for a in a b c d e; do
echo $a
done

./a.ksh
a
b
c
d
e

Is there some tricky way I can make that happen in postgres?

(I don't want to put the values in a table =) that would be too easy!)

Thanks

Dave

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aleksey Tsalolikhin 2009-08-12 23:05:34 trouble building pgbench on CentOS 5.3: /usr/bin/ld: cannot find -lpgport
Previous Message Emanuel Calvo Franco 2009-08-12 21:46:02 Simulate count result are distinct between 8.3 and 8.4