On 08/23/2010 08:33 PM, David E. Wheeler wrote: > I've been trying to come up with a simpler way to iterate over a > series of values in pgTAP tests than by creating a table, inserting > rows, and then selecting from the table. The best I've come up with > so far is:
<snip> > Aside from that, might there be another way to do this without an > explicit composite type? Maybe with VALUES() or something? Maybe something like this? select cmp_ok(a,b,c) from ( values('1.2.2'::varchar, '='::text, '1.2.2'::varchar), ('1.2.23', '=', '1.2.23'), ('1.2.42', '=', '1.2.32') ) as ss(a, b, c); cmp_ok -------- t t f (3 rows) HTH, Joe -- Joe Conway credativ LLC: http://www.credativ.us Linux, PostgreSQL, and general Open Source Training, Service, Consulting, & 24x7 Support
signature.asc
Description: OpenPGP digital signature