Re: Alter or rename enum value

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: Alter or rename enum value
Дата
Msg-id 56F59218.8040103@BlueTreble.com
обсуждение исходный текст
Ответ на Re: Alter or rename enum value  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Список pgsql-hackers
On 3/25/16 2:22 PM, Gavin Flower wrote:
>>
>> I've certainly heard people avoiding ENUMs because of their
>> limitations, so it'd be nice if there was a way to lift them.
> Well, I use Enums extensively in Java.
>
> However, I totally avoid using ENUMs in pg, due to their inflexibility!

Possibly related to this, for a long time I've also wanted a way to 
better integrate FKs, probably via some kind of a pseudotype or maybe a 
special operator. The idea being that instead of manually specifying 
joins, you could treat a FK field in a table as a pointer and do things 
like:

CREATE TABLE invoice(customer int NOT NULL REFERENCES(customer));

SELECT invoice.*, customer->first_name, customer->last_name, ...  FROM invoice;

If we had that capability, there would be less need for ENUMs.
-- 
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-hackers по дате отправления:

Предыдущее
От: David Steele
Дата:
Сообщение: Re: [PATCH] Phrase search ported to 9.6
Следующее
От: Artur Zakirov
Дата:
Сообщение: Re: [PATCH] Phrase search ported to 9.6