Re: [GENERAL] Duplication to External Server

2003-12-19 Thread Richard Huxton
On Friday 19 December 2003 05:33, Keith C. Perry wrote: > Quoting David Hofmann <[EMAIL PROTECTED]>: > > I'm setting up 2 database servers. The first is on our local network > > which is our staging server. The second is an external server setup at my > > hosting company. On a nightly bases I want

[GENERAL] CASE in where statement. BUG ??

2003-12-19 Thread Marek Lewczuk
I belive that I have found a bug - or maybe it was done on purpose. Have a look at this query: SELECT integer_field FROM bugtable WHERE (CASE WHEN '' <> '' THEN integer_field = '' ELSE integer_field = 0 END); Result: ERROR: invalid input syntax for integer: "" SELECT text_field FROM bugtable W

Re: [GENERAL] CASE in where statement. BUG ??

2003-12-19 Thread Alexander Litvinov
This is normaol behavior. > I belive that I have found a bug - or maybe it was done on purpose. Have > a look at this query: > > > SELECT integer_field FROM bugtable WHERE (CASE WHEN '' <> '' THEN > integer_field = '' ELSE integer_field = 0 END); > Result: ERROR: invalid input syntax for integer:

Re: [GENERAL] CASE in where statement. BUG ??

2003-12-19 Thread Marek Lewczuk
Alexander Litvinov wrote: This is normaol behavior. I belive that I have found a bug - or maybe it was done on purpose. Have a look at this query: SELECT integer_field FROM bugtable WHERE (CASE WHEN '' <> '' THEN integer_field = '' ELSE integer_field = 0 END); Result: ERROR: invalid input syntax

Re: [GENERAL] CASE in where statement. BUG ??

2003-12-19 Thread Richard Huxton
On Friday 19 December 2003 09:02, Marek Lewczuk wrote: > Alexander Litvinov wrote: > > This is normaol behavior. > > > >>I belive that I have found a bug - or maybe it was done on purpose. Have > >>a look at this query: > >> > >> > >>SELECT integer_field FROM bugtable WHERE (CASE WHEN '' <> '' THEN

Re: [GENERAL] CASE in where statement. BUG ??

2003-12-19 Thread Marek Lewczuk
Richard Huxton wrote: On Friday 19 December 2003 09:02, Marek Lewczuk wrote: But until it's evaluated ''<>'' it doesn't know it is false. When building the CASE expression, it's trying to map types to each elements and notes that '' is not an int. Only after this stage will it actually try to ev

Re: [GENERAL] CASE in where statement. BUG ??

2003-12-19 Thread Csaba Nagy
> Well, I must say that it is wird action... Why to check both elements of > CASE expression, if we know for sure that only one will be executed ? Because that's a syntax check, which does NOT evaluate any of the expressions, only the types of them. Even if it will not be executed ever, it is sti

Re: [GENERAL] CASE in where statement. BUG ??

2003-12-19 Thread Marek Lewczuk
Csaba Nagy wrote: Because that's a syntax check, which does NOT evaluate any of the expressions, only the types of them. Even if it will not be executed ever, it is still wrong, and it should generate an error, because it means a mistake on your side which potentially could leave to results you did

Re: [GENERAL] automatic verifications

2003-12-19 Thread Melanie Bergeron
Thanks for your help Melanie ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] How to navigate tree without CONNECT BY?

2003-12-19 Thread D. Dante Lorenso
Joe Conway wrote: D. Dante Lorenso wrote: I have a simple table that I'd like to query to pull out a heirarchy from a tree relationship. What is the best way to do this without a 'CONNECT BY' clause like Oracle has? See connectby() in contrib/tablefunc. Yep. That's what I was looking for.

Re: [GENERAL] CASE in where statement. BUG ??

2003-12-19 Thread Tom Lane
Marek Lewczuk <[EMAIL PROTECTED]> writes: > Well, I must say that it is wird action... Why to check both elements of > CASE expression, if we know for sure that only one will be executed ? It cannot discover that the WHEN clause is constant-false until after it has performed syntactic analysis --

Re: [GENERAL] Any commercial shopping cart packages using postgresql?

2003-12-19 Thread Jeff Cave
> When they did the port, did they also "do the right thing" with foriegn > keys, stored procs, etc? No. The pg port was an unofficial thing and appears to be very much in its infancy. The objective of the individual who wrote it was to "get it working". While I haven't looked too closely at th