aboutsummaryrefslogtreecommitdiff
path: root/doc/FAQ
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2000-06-13 08:07:50 +0000
committerBruce Momjian <bruce@momjian.us>2000-06-13 08:07:50 +0000
commit37ce95c4297a1b9ca1bbd61aa153a347c15fc310 (patch)
tree353d6c5d31e0ccf19c54c7f58c41fa46f97b77ba /doc/FAQ
parent9c77f4eff47c1adb3e5bf1f29b8f10a3757d8eba (diff)
downloadpostgresql-37ce95c4297a1b9ca1bbd61aa153a347c15fc310.tar.gz
postgresql-37ce95c4297a1b9ca1bbd61aa153a347c15fc310.zip
Update FAQ.
Diffstat (limited to 'doc/FAQ')
-rw-r--r--doc/FAQ16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/FAQ b/doc/FAQ
index 16db40cc767..cff90e0aaed 100644
--- a/doc/FAQ
+++ b/doc/FAQ
@@ -102,6 +102,7 @@
Why?
4.22) How do I create a column that will default to the current time?
4.23) Why are my subqueries using IN so slow?
+ 4.24) How do I do an outer join?
Extending PostgreSQL
@@ -992,6 +993,21 @@ BYTEA bytea variable-length array of bytes
WHERE EXISTS (SELECT col2 FROM TAB2 WHERE col1 = col2)
We hope to fix this limitation in a future release.
+
+ 4.24) How do I do an outer join?
+
+ PostgreSQL does not support outer joins in the current release. They
+ can be simulated using UNION and NOT IN. For example, when joining
+ tab1 and tab2, the following query does an outer join of the two
+ tables:
+ SELECT tab1.col1, tab2.col2
+ FROM tab1, tab2
+ WHERE tab1.col1 = tab2.col1
+ UNION ALL
+ SELECT tab1.col1, NULL
+ FROM tab1
+ WHERE tab1.col1 NOT IN (SELECT tab2.col1 FROM tab2)
+ ORDER BY tab1.col1
_________________________________________________________________
Extending PostgreSQL