Re: UNION not working... why?

Поиск
Список
Период
Сортировка
Искать
От
Stefan Schwarzer
Тема
Re: UNION not working... why?
Дата
Msg-id
1B2BDD49-E6EC-4D9C-84B9-5AF9519A666A@grid.unep.ch
Ответ на
Список
Дерево обсуждения
UNION not working... why? Stefan Schwarzer <stefan.schwarzer@grid.unep.ch>
Re: UNION not working... why? "Pavel Stehule" <pavel.stehule@gmail.com>
Re: UNION not working... why? Stefan Schwarzer <stefan.schwarzer@grid.unep.ch>
Re: UNION not working... why? Tom Lane <tgl@sss.pgh.pa.us>
Re: UNION not working... why? Stefan Schwarzer <stefan.schwarzer@grid.unep.ch>
Re: UNION not working... why? Richard Huxton <dev@archonet.com>
>> But now, I have another problem in this context. If I use text in the
>> SELECT statement (so, that the final output gives me the name of the
>> selected variables, plus the year and the value) than I get this
>> error message: ERROR:  failed to find conversion function from
>> "unknown" to text
>
> [squint...]  Try casting those literals to text explicitly, ie
> SELECT 'pop_density'::text AS name.  There's some code in there
> that makes this work for simple UNION cases, but maybe not so much
> for select with a left join and order by and limit inside a union :-(

You guys are really great! Yep, it works like that like a charm...

Thanks a lot for your help!
В списке pgsql-general по дате отправления
От: Tom Lane
Дата:
Сообщение: Re: UNION not working... why?
От: Greg Smith
Дата:
FAQ