1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

Update FAQ.

This commit is contained in:
Bruce Momjian
2000-12-09 04:29:38 +00:00
parent cfe26c0fb1
commit 5eced96f2c
2 changed files with 1224 additions and 1160 deletions

View File

@ -229,14 +229,12 @@
The bugs mailing list is available. To subscribe to this list, send The bugs mailing list is available. To subscribe to this list, send
email to pgsql-bugs-request@PostgreSQL.org with a body of: email to pgsql-bugs-request@PostgreSQL.org with a body of:
subscribe subscribe
end end
There is also a developers discussion mailing list available. To There is also a developers discussion mailing list available. To
subscribe to this list, send email to subscribe to this list, send email to
pgsql-hackers-request@PostgreSQL.org with a body of: pgsql-hackers-request@PostgreSQL.org with a body of:
subscribe subscribe
end end
@ -964,19 +962,19 @@ BYTEA bytea variable-length byte array (null-safe)
4.22) How do I create a column that will default to the current time? 4.22) How do I create a column that will default to the current time?
Use now(): Use now():
CREATE TABLE test (x int, modtime timestamp DEFAULT now() ); CREATE TABLE test (x int, modtime timestamp DEFAULT now() );
4.23) Why are my subqueries using IN so slow? 4.23) Why are my subqueries using IN so slow?
Currently, we join subqueries to outer queries by sequentially Currently, we join subqueries to outer queries by sequentially
scanning the result of the subquery for each row of the outer query. A scanning the result of the subquery for each row of the outer query. A
workaround is to replace IN with EXISTS: workaround is to replace IN with EXISTS:
SELECT * SELECT *
FROM tab FROM tab
WHERE col1 IN (SELECT col2 FROM TAB2) WHERE col1 IN (SELECT col2 FROM TAB2)
to: to:
SELECT * SELECT *
FROM tab FROM tab
WHERE EXISTS (SELECT col2 FROM TAB2 WHERE col1 = col2) WHERE EXISTS (SELECT col2 FROM TAB2 WHERE col1 = col2)

File diff suppressed because it is too large Load Diff