[DOCS] PostgreSQL 8.0.0beta3 Documentation
http://developer.postgresql.org/docs/postgres/index.html third line: Copyright © 1996-2003 suggest change to: Copyright © 1996-2004 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
[DOCS] 7.4.6 docs, chapter 21.2
7.4.6 docs, chapter 21.2 Routine Reindexing has a very limited amount of information. it would be good to know how much of this is taken care of VACUUM and under what circumstances it is needed to do reindex. it would also be good to add some information on how to disable/enable autoamtic reindex on insert/update/delete if such automatic reindexing exists. if it is available somewhere else, please write a note on where to find more info. in chapeter 21.1 i could as well be an idea writing a line or two about what (if any) vacuum does to indecies. ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
[DOCS] type casting reference?
hi. i need to cast from timestamp to seconds (in the form of integer). i have a table with a column: expiretime timestamp i have tried the following, it gives errors as below: SELECT expiretime::float4 AS timeleft FROM table WHERE something='1234'; ERROR: cannot cast type timestamp without time zone to real SELECT expiretime::text::float4 AS timeleft FROM table WHERE something='1234'; ERROR: invalid input syntax for type real: "2005-06-12 21:21:24.368082" postgresql 7.4.1 (i know, old) so, my question is simply, where in the docs can i find how i should perform the cast? it would help a lot if there was a table showing which types can be cased into which, and possibly an example or two for situations like this, casting from timestamp (to timestamp worked right away). /stig ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [DOCS] type casting reference? SOLVED
stig erikson wrote:
hi.
i need to cast from timestamp to seconds (in the form of integer).
i have a table with a column:
expiretime timestamp
i have tried the following, it gives errors as below:
SELECT expiretime::float4 AS timeleft FROM table WHERE something='1234';
ERROR: cannot cast type timestamp without time zone to real
SELECT expiretime::text::float4 AS timeleft FROM table WHERE
something='1234';
ERROR: invalid input syntax for type real: "2005-06-12 21:21:24.368082"
postgresql 7.4.1 (i know, old)
so, my question is simply, where in the docs can i find how i should
perform the cast?
it would help a lot if there was a table showing which types can be
cased into which, and possibly an example or two for situations like
this, casting from timestamp (to timestamp worked right away).
/stig
solved my problem this way:
UPDATE table
SET expiretime= cast( ('now'::text)::timestamp+'30 minutes'::interval AS
timestamp)
WHERE sessionID='0';
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
