Re: Typing Records
От | Joe Conway |
---|---|
Тема | Re: Typing Records |
Дата | |
Msg-id | 4C7365A9.6030200@joeconway.com обсуждение исходный текст |
Ответ на | Typing Records ("David E. Wheeler" <david@kineticode.com>) |
Ответы |
Re: Typing Records
|
Список | pgsql-hackers |
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 --------ttf (3 rows) HTH, Joe -- Joe Conway credativ LLC: http://www.credativ.us Linux, PostgreSQL, and general Open Source Training, Service, Consulting, & 24x7 Support
В списке pgsql-hackers по дате отправления: