Subject | Re: RES: RES: [firebird-support] Null and parameters |
---|---|
Author | Christian Danner |
Post date | 2006-01-08T11:52:21Z |
Hi Adam,
on Sat, 07 Jan 2006 23:44:34 -0000, you wrote:
(:var is null)
or (field = :var)
work great for years.
But why not generally permit the expression 'null is null' as a
comparison, when '1 is null' (e.g. in a 'select case' statement) is
allowed and interpreted as 'false'. Shouldn't 'Unknown is Unknown' be
a legitimate question and answered with 'true'?
feature, translated into the positional XSQLVAR fields in order to do
the api call, and (named) parameters/variables within sps, which might
be wholly different things in further interpretation and processing -
PSQL vs. DSQL.
Christian
on Sat, 07 Jan 2006 23:44:34 -0000, you wrote:
>> Shouldn't either 'execute statement' or a sp be used, but notSure. Nevertheless you don't need both ;-)
>> necessarily both.
>
>You will have a fun time trying to use execute statement without a
>stored procedure (or trigger) considering it is part of the PSQL
>language rather than SQL.
>> Within a sp the originally discussed syntax does work, no problematicFor me - within sps - select statements with where clauses including
>> client side replacement of the variable.
>
>Have you tested this?
(:var is null)
or (field = :var)
work great for years.
But why not generally permit the expression 'null is null' as a
comparison, when '1 is null' (e.g. in a 'select case' statement) is
allowed and interpreted as 'false'. Shouldn't 'Unknown is Unknown' be
a legitimate question and answered with 'true'?
>If so I wouldn't regard it as future proofShouldn't we differentiate between named parameters as a client side
>behaviour because parameters are substitutable values not a random
>string to be inserted at runtime.
feature, translated into the positional XSQLVAR fields in order to do
the api call, and (named) parameters/variables within sps, which might
be wholly different things in further interpretation and processing -
PSQL vs. DSQL.
>You may find a future version breaksNow you rattled me.
>this behaviour.
Christian