pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: nzanella@cs.mun.ca
To: pgsql-sql@postgresql.org
Subject: defining and using constants in postgreSQL
Date: 25 Oct 2003 20:30:25 -0700
Message-ID: <b68d2f19.0310251930.5f691e77@posting.google.com> (raw)

Hello,

I am looking for a way that I can define a constant in PostgreSQL (so that
I end up with a constant similar to one that I could have in Oracle). I have
searched the archives and it seems that the solutions that were suggested in
include creating a table of constants or alternatively creating a function
that returns a constant. However, I would like to have a predefined constant
in the global scope which I can access without the round brackets used to
call a function. That is, I would like to be able to define a constant
named foo that I can then access with the name foo, not foo().

Is this possible at all with PostgreSQL?

I know PostgreSQL has some predefined constants that don't take the round
brackets so in principle it should be possible to define more. Is there a
way to do such thing in PostgreSQL?

Thanks,

Neil



Message-ID: <b68d2f19.0310251930.5f691e77@posting.google.com>
Permalink:  ../b68d2f19.0310251930.5f691e77@posting.google.com/
Also on:    postgresql.org/message-id/b68d2f19.0310251930.5f691e77@posting.google.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: nzanella@cs.mun.ca
  Subject: Re: defining and using constants in postgreSQL
  In-Reply-To: <b68d2f19.0310251930.5f691e77@posting.google.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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