A couple other minor fixes.
-ERROR: insert or update on "weather" violates foreign key constraint "$1"
-DETAIL: Key (city)=(Berkeley) is not present in "cities".
+ERROR: insert or update on table "weather" violates foreign key constraint "$1"
+DETAIL: Key (city)=(Berkeley) is not present in table "cities".
-coalesce(value , ...)
+COALESCE(value , ...)
Fortunately, there is a simple workaround for
min() and max(). The
query shown below is equivalent to the query above, except that it
- can take advantage of a B+-Tree index if there is one present on
+ can take advantage of a B-tree index if there is one present on
the column in question.
SELECT col FROM sometable ORDER BY col ASC LIMIT 1;
-
+
Indexes
Although indexes in
PostgreSQL> do not need
maintenance and tuning, it is still important to check
which indexes are actually used by the real-life query workload.
- Examining index usage is done with the EXPLAIN> command;
- its application for this purpose is illustrated in
- linkend="using-explain">.
+ Examining index usage for an individual query is done with the
+ EXPLAIN> command; its application for this purpose is
+ illustrated in .
+ It is also possible to gather overall statistics about index usage
+ in a running server, as described in .
SELECT @ '-4.5e500' AS "abs";
-ERROR: "-4.5e500" is out of range for float8
+ERROR: "-4.5e500" is out of range for type double precision
ERROR: operator is not unique: "unknown" !
HINT: Could not choose a best candidate operator. You may need to add explicit
-typecasts.
+type casts.
This happens because the system can't decide which of the several
possible !> operators should be preferred. We can help