UNION ALL - Var attno

Поиск
Список
Период
Сортировка
От sri harsha
Тема UNION ALL - Var attno
Дата
Msg-id CAP6OGLEO34adJ9sdN9bLn6vtyrSDJO6f5k2=2MSsBpXvCvTOfg@mail.gmail.com
обсуждение исходный текст
Ответы Re: UNION ALL - Var attno  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers


Hi,

   Assume the following query ,

(SELECT a * 1 , b FROM TABLE_1) UNION ALL (SELECT a *1 , b FROM TABLE_2);

In this query , attribute number of the VARs are 141 and 2 respectively !! What is the reason for this ??

I am trying to implement a FDW , so i need attribute numbers to fetch the respective columns from my data store . Due to this change in attribute numbers in the case of UNION ALL , this query doesn't provide the necessary output .

But in the plan its given as 1 and 2 respectively . So is there a mapping which PG maintains to convert from 141 to the original attribute number ??


Thanks,
Harsha

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: pg_xlog -> pg_xjournal?
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: VS 2015 support in src/tools/msvc