[SQL] Equality operators on NULL values

2003-08-24 Thread Bertrand Petit
(in)Equality operators evaluates to NULL when any of their arguments are NULL as summarized bellow. NULL=NULL ==> NULL 1=NULL==> NULL 1=1 ==> t 1=2 ==> f I have a case where I need to delete rows from table A for records that are designated

Re: [SQL] Equality operators on NULL values

2003-08-24 Thread Peter Eisentraut
Bertrand Petit writes: > NULL=NULL ==> t > 1=NULL==> NULL (or anything else as long as it is not t) > 1=1 ==> t > 1=2 ==> f > Is there a stock replacement operator that would behave like > the second truth table? No, but why not write (a = b

Re: [SQL] Auto-update a field when record is changed

2003-08-24 Thread Jamie Lawrence
> On Fri, 22 Aug 2003, Stuart wrote: > > > Folks, > > > > I was wandering if there was a feasible way to automatically update a field > > in a table, say 'revision_date' in a record whenever any other field in the > > record is changed. My attempts to use a trigger caused repeating loops and

Re: [SQL] Porting from PL/SQL to PLPGSQL

2003-08-24 Thread denis
Hi.. In postgres, you have two options.. >From PSQL prompt, you can use " \i filename " to process the file.. OR from PSQL prompt, you can directly instruct to execute that file like.. psql ... --filename <> Basically, when "&&" is specified in PL/SQL scripts, it prompts the user to enter its v

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-24 Thread Tom Lane
Mike Winter <[EMAIL PROTECTED]> writes: > Basically, queries of the form SELECT FROM WHERE IN > () take forever for high numbers of rows in the IN clause. > We've done timing on 7.3 and 7.4b and there is no speed improvement on > these queries. > Does anyone know what the status of this bug is?