pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
best way for constants in the database
2+ messages / 2 participants
[nested] [flat]

* best way for constants in the database
@ 2006-01-16 18:49 chester c young <chestercyoung@yahoo.com>
  0 siblings, 0 replies; 2+ messages in thread

From: chester c young @ 2006-01-16 18:49 UTC (permalink / raw)
  To: pgsql-sql

anybody have a good way to impliment constants in the database?

using an immutable pgpgsql function, constant_name() - works, but not
necessarily very efficient.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: best way for constants in the database
@ 2006-01-16 18:53 Owen Jacobson <ojacobson@osl.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Owen Jacobson @ 2006-01-16 18:53 UTC (permalink / raw)
  To: 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?



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-01-16 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-16 18:49 best way for constants in the database chester c young <chestercyoung@yahoo.com>
2006-01-16 18:53 Re: best way for constants in the database Owen Jacobson <ojacobson@osl.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox