Re: Generating TRUNCATE orders

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Generating TRUNCATE orders
Дата
Msg-id 4703CD33.2010907@archonet.com
обсуждение исходный текст
Ответ на Generating TRUNCATE orders  (Laurent ROCHE <laurent_roche@yahoo.com>)
Список pgsql-general
Laurent ROCHE wrote:
>
> So I wrote:
> SELECT 'TRUNCATE TABLE '
> UNION
...
> ORDER BY relname
>
> And this fails with the following message:
> ERROR: column "relname" does not exist

> But I don't understand why this does not work: the 2 SELECTs produce a single char column so from what I understand
thatshould work ! ? ! 
> If some body can explain I will be grateful.

The "ORDER BY" is attached to the "UNION" not the second subquery.
Catches everyone out from time to time.

--
   Richard Huxton
   Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: Laurent ROCHE
Дата:
Сообщение: Generating TRUNCATE orders
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Generating TRUNCATE orders