When do we lose column names?

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема When do we lose column names?
Дата
Msg-id 12858.208.226.76.25.1321477111.squirrel@dunslane.net
обсуждение исходный текст
Ответы Re: When do we lose column names?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Consider the following query:

select (x).key as k, (x).value as v
from (select each(hstore(q)) as x     from (select oid, c.*           from pg_class c           where oid =
'parent'::regclass)q) t;
 

This gives results like this:
k  |   v
-----+--------f1  | 16410f2  | parentf3  | 2200f4  | 16412f5  | 0f6  | 10
....

Now add a limit clause to the innermost query:

select (x).key as k, (x).value as v
from (select each(hstore(q)) as x     from (select oid, c.*           from pg_class c           where oid =
'parent'::regclass          limit 99999999) q) t;
 

Now the result looks like this:
      k        |   v
----------------+--------oid            | 16410relam          | 0relacl         |relkind        | rrelname        |
parentreltype       | 16412
 


What I'm having difficulty understanding is why the limit clause should
make any difference.

Is this a bug? If not, is it documented.

cheers

andrew



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Minor optimisation of XLogInsert()
Следующее
От: Scott Mead
Дата:
Сообщение: Re: IDLE in transaction introspection