Re: \crosstabview fixes
От | Daniel Verite |
---|---|
Тема | Re: \crosstabview fixes |
Дата | |
Msg-id | 5514314e-d7ed-42d4-b94f-283d129cf8e2@mm обсуждение исходный текст |
Ответ на | Re: \crosstabview fixes (Christoph Berg <myon@debian.org>) |
Список | pgsql-hackers |
Christoph Berg wrote: > > I don't quite see how to work around that, short of simply > > removing the possibility of addressing columns by their > > numbers. [...] > That would be bad news, given that \crosstabview is meant for > interactive use where these number shortcuts are much more likely to > be used than in proper production SQL code. Be it only for ease of > typing, or for the case where the columns are just called ?column?. Ah, that reminds me that there's another corner case. In a resultset, two columns can share the exact same name. I think the only way to distinguish them in that case is to refer to them by position, so that's another argument to not discard that possibility. =# select 'X' as "a", 'Y' as "a", 'Z' \crosstabview a a Ambiguous column name: a versus =# select 'X' as "a", 'Y' as "a", 'x' \crosstabview 1 2a | Y ---+---X | x Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite
В списке pgsql-hackers по дате отправления: