From: Markus Wagner <wagner@imsd.uni-mainz.de>
To: pgsql-sql@postgresql.org
Subject: using SQL to evaluate arbitrary expressions?
Date: Tue, 2 Oct 2001 06:32:15 +0200
Message-ID: <01100206321504.01063@magnus> (raw)
Hi,
we need to process user-defined integrity conditions, which are stored as
strings at application level, e. g. "person.age - 2 > 18". We would like to
substitute the variable names within these expressions by their values at
trigger time. So we have expressions containing constants only, e. g. "29 - 2
> 18". We are glad to have found out that we can evaluate such expressions
simply by calling them with SELECT, e. g. "SELECT 29 - 2 > 18" returns true.
We think that it would be very nice to benefit from the pg database system
parser. But can we rely on this functionality in the future? Is this standard
SQL?
Thank you,
Markus
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: wagner@imsd.uni-mainz.de
Subject: Re: using SQL to evaluate arbitrary expressions?
In-Reply-To: <01100206321504.01063@magnus>
* 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