Re: Are globally defined constants possible at all ? - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Are globally defined constants possible at all ?
Date
Msg-id 20020609113917.I59672-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Are globally defined constants possible at all ?  (Gregory Seidman <gss+pg@cs.brown.edu>)
List 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 by date:

Previous
From: Gunther Schadow
Date:
Subject: Re: Are globally defined constants possible at all ?
Next
From: Tom Lane
Date:
Subject: Re: sort_mem sizing (Non-linear Performance)