Re: [GENERAL] (FAQ?) JOIN condition - 'WHERE NULL = NULL'

2008-04-03 Thread Ian Sillitoe
> > We are annotating nodes on a hierarchical structure > > where NULL implied an > > I don't mean to be rude, but yuck. Why provide a > record for data that isn't there? > No offence taken - I'm trying to improve an old (partially inherited) system, hence the original post. I have no idea if th

Re: [GENERAL] (FAQ?) JOIN condition - 'WHERE NULL = NULL'

2008-04-02 Thread Ian Sillitoe
n On Wed, Apr 2, 2008 at 8:08 PM, Richard Broersma <[EMAIL PROTECTED]> wrote: > On Wed, Apr 2, 2008 at 11:43 AM, Ian Sillitoe > <[EMAIL PROTECTED]> wrote: > > I completely take your points - so maybe I should be asking for advice > on > > database design instead

Re: [GENERAL] (FAQ?) JOIN condition - 'WHERE NULL = NULL'

2008-04-02 Thread Ian Sillitoe
I completely take your points - so maybe I should be asking for advice on database design instead. We are annotating nodes on a hierarchical structure where NULL implied an absence of a value in this depth of the hierarchy. As a method of enforcing this view, we use constraints to make sure we onl

Re: [GENERAL] (FAQ?) JOIN condition - 'WHERE NULL = NULL'

2008-04-02 Thread Ian Sillitoe
Ah - thanks and apologies for not finding those previous discussions. Does anyone else feel this might be useful as a point on the NULL section of the FAQ (it certainly would have saved me an afternoon)? Cheers, Ian On Wed, Apr 2, 2008 at 6:24 PM, Craig Ringer <[EMAIL PROTECTED]> wrote:

Re: [GENERAL] (FAQ?) JOIN condition - 'WHERE NULL = NULL'

2008-04-02 Thread Ian Sillitoe
, 2008 at 05:49:37PM +0100, Ian Sillitoe wrote: > > This is probably a stupid question that has a very quick answer, however > it > > would be great if someone could put me out of my misery... > > > > I'm trying to JOIN two tables (well a table and a resultset from a

Re: [GENERAL] (FAQ?) JOIN condition - 'WHERE NULL = NULL'

2008-04-02 Thread Ian Sillitoe
Apologies - just reread my post and I've confused matters with typos during the abtraction of my code. For the purposes of the example given, please read "get_colnames_for_id()" rather than "get_cathcode()"... Cheers, Ian On Wed, Apr 2, 2008 at 5:49 PM, Ian Sillitoe

[GENERAL] (FAQ?) JOIN condition - 'WHERE NULL = NULL'

2008-04-02 Thread Ian Sillitoe
This is probably a stupid question that has a very quick answer, however it would be great if someone could put me out of my misery... I'm trying to JOIN two tables (well a table and a resultset from a PL/pgsql function) where a joining column can be NULL -- for a given id, return a bunch of col