Re: Querying same lookup table with multiple columns based on another view

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: Querying same lookup table with multiple columns based on another view
Дата
Msg-id 564B51D3.4040804@BlueTreble.com
обсуждение исходный текст
Ответ на Re: Querying same lookup table with multiple columns based on another view  (Melvin Davidson <melvin6925@gmail.com>)
Список pgsql-general
On 11/17/15 9:21 AM, Melvin Davidson wrote:
> Your problem is the use of SELECT *

I've often wished for a way to do *, but make changes to the results
that a normal * would give you. The two operations I've wished for are
to either remove some fields from the list, or to rename some fields.

I suspect you could create a function that would do this. You wouldn't
want to just blindly operate on a CREATE VIEW command because of things like

SELECT a.*, b.blah FROM (SELECT 1,2,3) a, b

but I think it might be possible to get the raw data out of the parser
(the grammar certainly provides it). It would probably involve C code
though.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


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

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: Querying same lookup table with multiple columns based on another view
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: referencing other INSERT VALUES columns inside the insert