Re: [SQL] [GENERAL] lost in system tables

2005-12-06 Thread Luca Pireddu
On Tuesday 06 December 2005 08:47, Emil Rachovsky wrote: > I am trying to find the equivalent of these two > Sybase system columns : > > check_on_commit (Y/N) - Indicates whether INSERT and > UPDATE commands should wait until the next COMMIT > command to check if foreign keys are valid. A foreig

Re: [SQL] argument type problem with plpgsql function

2005-11-22 Thread Luca Pireddu
On November 22, 2005 20:24, Tom Lane wrote: > Luca Pireddu <[EMAIL PROTECTED]> writes: > > I just tried it at home on a postgresql 8.0.3 server (debian package) and > > it worked the way it's supposed to. Puzzling... > > Maybe you have more than one blast_

Re: [SQL] argument type problem with plpgsql function

2005-11-22 Thread Luca Pireddu
On November 22, 2005 17:13, Stephan Szabo wrote: > On Tue, 22 Nov 2005, Luca Pireddu wrote: > [snip] > > I got the same answer (the second) for both calls from my 8.0 and 8.1 > setups, what version were you trying on? > I forgot to mention that. I'm using version 8.0.4

[SQL] argument type problem with plpgsql function

2005-11-22 Thread Luca Pireddu
I wrote a little function that has to work with big numbers CREATE OR REPLACE FUNCTION blast_evalue(seq_len bigint, db_size bigint, bit_score double precision) RETURNS double precision AS $$ BEGIN RETURN 2^(bit_score) * db_size * seq_len; END; $$ LANGUAGE 'plpgsql' IMMUTABLE RETURNS NULL ON N

Re: [SQL] problem (bug?) with "in (subquery)"

2005-07-15 Thread Luca Pireddu
On July 15, 2005 07:34, Michael Fuhr wrote: > On Thu, Jul 14, 2005 at 01:34:21AM -0600, Luca Pireddu wrote: > > I have the following query that isn't behaving like I would expect: Thanks for creating the reduced test case Michael. My apologies for not doing it myself. > >

[SQL] problem (bug?) with "in (subquery)"

2005-07-14 Thread Luca Pireddu
I have the following query that isn't behaving like I would expect: select * from strains s where s.id in (select strain_id from pathway_strains); I would expect each strain record to appear only once. Instead I get output like this, where the same strain id appears many times: id | na

[SQL] select multiple immediate values, but in multiple rows

2005-03-14 Thread Luca Pireddu
Hello all. I'd like to write a query does a set subtraction A - B, but A is is a set of constants that I need to provide in the query as immediate values. I thought of something like select a from (1,2,3.4) except select col_name from table; but I don't know the syntax to specify my set of co