Re: CREATE TYPE in Postgres 7.3.4

Поиск
Список
Период
Сортировка
От Alex Page
Тема Re: CREATE TYPE in Postgres 7.3.4
Дата
Msg-id 20031202171547.GU22296@halcyon.ox.icnet.uk
обсуждение исходный текст
Ответ на Re: CREATE TYPE in Postgres 7.3.4  (Oliver Elphick <olly@lfix.co.uk>)
Список pgsql-general
On Sun, Nov 30, 2003 at 09:01:01PM +0000, Oliver Elphick wrote:
> On Thu, 2003-11-27 at 12:43, Alex Page wrote:
> > This is probably really basic, but I can't seem to get it to work. I'm
> > trying to create an enumerated type, using the following code:

> >   CREATE FUNCTION enum_gender_in (cstring) RETURNS enum_gender IMMUTABLE AS
> ...
>
> Why not just use a CHECK constraint?

I'm fairly sure that a CHECK constraint will be a lot slower (even with
an index) than my own TYPE with an internal integer representation. I'd
like to check this, but of course I can't do any benchmarks until I've
got the CREATE TYPE working :)

Alex
--
Mail: Alex Page <alex.page@cancer.org.uk>
Real: Systems/Network Assistant, Epidemiology Unit, Oxford
Tel:  01865 302 223 (external) / 223 (internal)
PGP:  8868 21D7 3D35 DD77 9D06  BF0A 0746 2DE6 55EA 367E

Вложения

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: how many quotes?
Следующее
От: Alex Page
Дата:
Сообщение: Re: CREATE TYPE in Postgres 7.3.4