X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id C27EC9DC84E for ; Mon, 16 Jan 2006 14:54:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13530-02 for ; Mon, 16 Jan 2006 14:54:05 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id BD7AE9DC85A for ; Mon, 16 Jan 2006 14:54:03 -0400 (AST) Received: from nelson.osl.com (216-21-133-120.ip.van.radiant.net [216.21.133.120]) by svr4.postgresql.org (Postfix) with ESMTP id DAC855AF095 for ; Mon, 16 Jan 2006 18:54:03 +0000 (GMT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Subject: Re: best way for constants in the database Date: Mon, 16 Jan 2006 10:53:52 -0800 Message-ID: <144D12D7DD4EC04F99241498BB4EEDCC1C8046@nelson.osl.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SQL] best way for constants in the database Thread-Index: AcYazb32FOqZbCzUR6OvygYUVBQOAgAAEvkw From: "Owen Jacobson" To: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200601/95 X-Sequence-Number: 23884 chester c young wrote: > anybody have a good way to impliment constants in the database? >=20 > 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?