Re: Are globally defined constants possible at all ?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Are globally defined constants possible at all ?
Дата
Msg-id 20020609113917.I59672-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: Are globally defined constants possible at all ?  (Gregory Seidman <gss+pg@cs.brown.edu>)
Список pgsql-general
> 3. create a function for each type and use it in your queries
>
> CREATE FUNCTION EnumTypeSoftware() RETURNS int AS 'SELECT 1' LANGUAGE SQL
> with (isstrict);
>
> CREATE FUNCTION EnumTypeHardware() RETURNS int AS 'SELECT 2' LANGUAGE SQL
> with (isstrict);

As a side note I didn't see mentioned, you might want to define those as
iscachable (and I'm not sure isstrict buys you anything for a function
with no args) to allow index scans to be used when you do col=func()
where clauses.



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

Предыдущее
От: Gunther Schadow
Дата:
Сообщение: Re: Are globally defined constants possible at all ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: sort_mem sizing (Non-linear Performance)