| От | Richard Huxton |
|---|---|
| Тема | Re: Tables as function arguments |
| Дата | |
| Msg-id | 200403261612.59850.dev@archonet.com обсуждение исходный текст |
| Ответ на | Tables as function arguments (Jeremy Semeiks <jrs@denny.farviolet.com>) |
| Список | pgsql-general |
On Wednesday 24 March 2004 04:31, Jeremy Semeiks wrote:
> Hello,
>
> I use psql interactively for data exploration, and often I want to do
> the same types of generic set operations on data in many different
> tables. For example, to calculate a similarity metric between 2
> different tables I might type:
[snip]
> ... plpy.execute("select * from "+args[0]+" union select * from "+args[1])
> ...
>
> But calling this function on the results of subselects turns into a
> big syntactic mess. Is there a better way to do this kind of thing?
Not really - you might be able to use some sprintf() equivalent to make the
syntax prettier (or different, anyway) but you'll need to build a dynamic
query.
--
Richard Huxton
Archonet Ltd
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера