Re: [SQL] Foreign Key Non-Null Problem in 8.0

2004-10-30 Thread Stephan Szabo
On Wed, 27 Oct 2004, Jon Uhal wrote: > I'm having trouble trying to get my databases setup so that when I > delete a row from the base table, all related information is removed as > well. I've been testing this with PostgreSQL version (postmaster > (PostgreSQL) 8.0.0beta1) on a Windows 2000 Pro m

Re: [SQL] ORDER BY and NULLs

2004-10-30 Thread Murphy Pope
>> You should just cross out that whole section. It's just flatly wrong. >> >> I had always assumed it was just people bringing assumptions over from >> Oracle where it is true. Perhaps this book is to blame for some of the >> confusion. Which book is it? >> >> Postgres indexes NULLs. It can use

Re: [SQL] ORDER BY and NULLs

2004-10-30 Thread Murphy Pope
>> I just dug out the PostgreSQL book again because I thought I might've >> garbled it: >> >> Quote: "PostgreSQL will not index NULL values. Because an index will >> never include NULL values, it cannot be used to satisfy the ORDER BY >> clause of a query that returns all rows in a table." > > Yo

[SQL] Foreign Key Non-Null Problem in 8.0

2004-10-30 Thread Jon Uhal
I'm having trouble trying to get my databases setup so that when I delete a row from the base table, all related information is removed as well.  I've been testing this with PostgreSQL version (postmaster (PostgreSQL) 8.0.0beta1) on a Windows 2000 Pro machine.  I have been unsuccessful in tr

[SQL] JOIN not being calculated correctly

2004-10-30 Thread Scott Pederick
Hi all! I'm having a problem with Postgresql 8.0.0-beta4 on a Win2K machine and a particular join. I've got two tables - a list of customers and jobs they've had. A customer can have multiple jobs. The query always scans the entire jobs table for each customer - I need it the other way around so

Re: [SQL] ORDER BY and NULLs

2004-10-30 Thread Murphy Pope
> You should just cross out that whole section. It's just flatly wrong. > > I had always assumed it was just people bringing assumptions over from > Oracle where it is true. Perhaps this book is to blame for some of the > confusion. Which book is it? > > Postgres indexes NULLs. It can use them fo