Re: views and null bothering - Mailing list pgsql-sql

From Josh Berkus
Subject Re: views and null bothering
Date
Msg-id web-97725@davinci.ethosmedia.com
Whole thread Raw
In response to views and null bothering  (Martín Marqués <martin@bugs.unl.edu.ar>)
Responses Re: views and null bothering  (Martín Marqués <martin@bugs.unl.edu.ar>)
List pgsql-sql
Martin,

> I have a bunch of tables which I give access through a view. The
> problem is 
> that in the main table there are columns, that are referenced to
> another 
> tables column, that have NULLs.
> In the SELECT inside the view's definition I put the join equality,
> but have 
> lots of trouble makeing it put correctly the columns that have NULL
> values.

You need to use LEFT OUTER JOIN, supported in Postgres 7.1.x.

See the current postgresql docs, or your favorite ANSI-SQL handbook, for
guidance.

-Josh Berkus


______AGLIO DATABASE SOLUTIONS___________________________                                      Josh Berkus Complete
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


pgsql-sql by date:

Previous
From: Martín Marqués
Date:
Subject: views and null bothering
Next
From: Gonzo Rock
Date:
Subject: Simple Insert Problem