Looping through string constants - Mailing list pgsql-general

From David Kerr
Subject Looping through string constants
Date
Msg-id 20090812225551.GA51062@mr-paradox.net
Whole thread Raw
Responses Re: Looping through string constants
List 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

pgsql-general by date:

Previous
From: Emanuel Calvo Franco
Date:
Subject: Simulate count result are distinct between 8.3 and 8.4
Next
From: Aleksey Tsalolikhin
Date:
Subject: trouble building pgbench on CentOS 5.3: /usr/bin/ld: cannot find -lpgport