Re: best way for constants in the database

From: "Owen Jacobson" <ojacobson(at)osl(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: best way for constants in the database
Date: 2006-01-16 18:53:52
Message-ID: 144D12D7DD4EC04F99241498BB4EEDCC1C8046@nelson.osl.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

chester c young wrote:

> anybody have a good way to impliment constants in the database?
>
> using an immutable pgpgsql function, constant_name() - works, but not
> necessarily very efficient.

A function declared IMMUTABLE should be efficient enough; it'll usually be evaluated once per query at most. The real answer is, as usual, "it depends." What're you trying to accomplish with a constant?

Browse pgsql-sql by date

  From Date Subject
Next Message Ottó Havasvölgyi 2006-01-16 21:33:08 Re: For update
Previous Message chester c young 2006-01-16 18:49:44 best way for constants in the database