Re: [SQL] feature request ?

2004-06-23 Thread sad
On Wednesday 23 June 2004 21:12, you wrote: > Sad, > > > since BOOL expression has three possible values: TRUE,FALSE,NULL > > plpgsql IF control structure should have three alternate blocks: > > THEN,ELSE,NULL > > > > shouldn't it ? > > No, why? > > How would you construct a tri-valued IF/THEN?

Re: [SQL] feature request ?

2004-06-23 Thread sad
On Thursday 24 June 2004 09:32, Michael Glaesemann wrote: > On Jun 24, 2004, at 2:12 AM, Josh Berkus wrote: > > Sad, > > > >> since BOOL expression has three possible values: TRUE,FALSE,NULL > >> plpgsql IF control structure should have three alternate blocks: > >> THEN,ELSE,NULL > >> > >> shouldn'

Re: [SQL] feature request ?

2004-06-23 Thread Michael Glaesemann
On Jun 24, 2004, at 2:12 AM, Josh Berkus wrote: Sad, since BOOL expression has three possible values: TRUE,FALSE,NULL plpgsql IF control structure should have three alternate blocks: THEN,ELSE,NULL shouldn't it ? No, why? How would you construct a tri-valued IF/THEN? Doesn't seem too likely to

Re: [SQL] feature request ?

2004-06-23 Thread Josh Berkus
Sad, > since BOOL expression has three possible values: TRUE,FALSE,NULL > plpgsql IF control structure should have three alternate blocks: > THEN,ELSE,NULL > > shouldn't it ? No, why? How would you construct a tri-valued IF/THEN? Doesn't seem too likely to me, as well as being different fro

Re: [SQL] ERROR: Unable to format timestamp; internal coding error

2004-06-23 Thread Tom Lane
Stef <[EMAIL PROTECTED]> writes: > I've narrowed my problem down to the following > Java Timestamp that I managed to insert into > a postgres 7.3.4 database : > Timestamp : '1475666-11-30 02:00:00.0' > My problem is, that when I try and select from the table I inserted > this timestamp into, I g

Re: [SQL] Non-standard function names

2004-06-23 Thread Tom Lane
Clive Page <[EMAIL PROTECTED]> writes: > The problems come with LN and LOG which Postgres uses for logarithms to > base e and 10 respectively: the JDBC standard uses LOG and LOG10 > respectively, so that any fix would mean LOG changed its meaning. I don't > see an easy solution here; maybe both LO

[SQL] ERROR: Unable to format timestamp; internal coding error

2004-06-23 Thread Stef
Hi all, I've narrowed my problem down to the following Java Timestamp that I managed to insert into a postgres 7.3.4 database : Timestamp : '1475666-11-30 02:00:00.0' My problem is, that when I try and select from the table I inserted this timestamp into, I get the following error : ERROR: Una

[SQL] Non-standard function names

2004-06-23 Thread Clive Page
The developers of Postgres over the years are to be commended on their support for SQL Standards, but one thing that has annoyed me for some time is that the names of several mathematical functions are seriously non-standard. Postgres isn't actually flouting an SQL Standard in this area as there i

Re: [SQL] sql

2004-06-23 Thread Richard Huxton
cristi wrote: I mean: I want to select the records wich for co1,n1,l1,m1 value are the same and has the maxim value of the ore field adding to that value the value of the records which are not selected. SELECT co,clo1,nl,l1,m1,SUM(ore) AS tot_ore FROM xxx WHERE GROUP BY co,clo1,nl,l1,m1 ORDER BY c

[SQL] feature request ?

2004-06-23 Thread sad
Hello since BOOL expression has three possible values: TRUE,FALSE,NULL plpgsql IF control structure should have three alternate blocks: THEN,ELSE,NULL shouldn't it ? ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

[SQL] sql

2004-06-23 Thread cristi
I have the following table structure: CREATE TABLE "xxx" ( "co" character varying(7), "co1" character varying(9), "n1" character varying(15), "l1" character varying(5), "m1" smallint, "ore" bigint ); who contains the following date: 22021CC 1044 637 S5G8 407 5 22021CC 1044 637 S5G8 409 47