Skip to content

Commit 97f41da

Browse files
committed
Update FAQ.
1 parent 55742d4 commit 97f41da

File tree

1 file changed

+27
-12
lines changed

1 file changed

+27
-12
lines changed

doc/FAQ

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
Why?
103103
4.22) How do I create a column that will default to the current time?
104104
4.23) Why are my subqueries using IN so slow?
105+
4.24) How do I do an outer join?
105106

106107
Extending PostgreSQL
107108

@@ -334,11 +335,11 @@
334335

335336
Features
336337
PostgreSQL has most features present in large commercial
337-
DBMS's, like transactions, subselects, triggers, views, and
338-
sophisticated locking. We have some features they don't have,
339-
like user-defined types, inheritance, rules, and multi-version
340-
concurrency control to reduce lock contention. We don't have
341-
foreign key referential integrity or outer joins, but are
338+
DBMS's, like transactions, subselects, triggers, views, foreign
339+
key referential integrity, and sophisticated locking. We have
340+
some features they don't have, like user-defined types,
341+
inheritance, rules, and multi-version concurrency control to
342+
reduce lock contention. We don't have outer joins, but are
342343
working on them for our next release.
343344

344345
Performance
@@ -395,10 +396,10 @@
395396

396397
2.1) Are there ODBC drivers for PostgreSQL?
397398

398-
There are two ODBC drivers available, PostODBC and OpenLink ODBC.
399+
There are two ODBC drivers available, PsqlODBC and OpenLink ODBC.
399400

400-
PostODBC is included in the distribution. More information about it
401-
can be gotten from: http://www.insightdist.com/psqlodbc
401+
PsqlODBC is included in the distribution. More information about it
402+
can be gotten from: ftp://ftp.postgresql.org/pub/odbc/index.html
402403

403404
OpenLink ODBC can be gotten from http://www.openlinksw.com. It works
404405
with their standard ODBC client software so you'll have PostgreSQL
@@ -409,6 +410,8 @@
409410
commercial-quality support, but a freeware version will always be
410411
available. Questions to postgres95@openlink.co.uk.
411412

413+
See also the ODBC chapter of the Programmer's Guide.
414+
412415
2.2) What tools are available for hooking PostgreSQL to Web pages?
413416

414417
A nice introduction to Database-backed Web pages can be seen at:
@@ -971,12 +974,9 @@ BYTEA bytea variable-length array of bytes
971974

972975
4.22) How do I create a column that will default to the current time?
973976

974-
This way always works:
977+
Use now():
975978
CREATE TABLE test (x int, modtime timestamp default now() );
976979

977-
In releases 7.0 and later, you may use:
978-
create table test (x int, modtime timestamp default 'now');
979-
980980
4.23) Why are my subqueries using IN so slow?
981981

982982
Currently, we join subqueries to outer queries by sequential scanning
@@ -992,6 +992,21 @@ BYTEA bytea variable-length array of bytes
992992
WHERE EXISTS (SELECT col2 FROM TAB2 WHERE col1 = col2)
993993

994994
We hope to fix this limitation in a future release.
995+
996+
4.24) How do I do an outer join?
997+
998+
PostgreSQL does not support outer joins in the current release. They
999+
can be simulated using UNION and NOT IN. For example, when joining
1000+
tab1 and tab2, the following query does an outer join of the two
1001+
tables:
1002+
SELECT tab1.col1, tab2.col2
1003+
FROM tab1, tab2
1004+
WHERE tab1.col1 = tab2.col1
1005+
UNION ALL
1006+
SELECT tab1.col1, NULL
1007+
FROM tab1
1008+
WHERE tab1.col1 NOT IN (SELECT tab2.col1 FROM tab2)
1009+
ORDER BY tab1.col1
9951010
_________________________________________________________________
9961011

9971012
Extending PostgreSQL

0 commit comments

Comments
 (0)