Recently noticed documentation issues - Mailing list pgsql-hackers

From Craig Ringer
Subject Recently noticed documentation issues
Date
Msg-id 5036DD1E.7080404@ringerc.id.au
Whole thread Raw
Responses Re: Recently noticed documentation issues
List pgsql-hackers
Hi all

I've recently noticed two oversights in the docs that I'd like to fix.


First, in sql-fetch, there's no hint that the cursor name can be the 
quoted value of a refcursor, eg:
    FETCH ALL FROM "<unnamed portal 1>";

This *is* shown in an example in plpgsql-cursors, but only in some 
sample code. If you set out with the question "how do I fetch the 
contents of a refcursor returned from a function" it's a lot harder to 
find the results than it could be.

I'd like to add a short discussion of refcursors and an example to 
sql-fetch, and refer to that from plpgsql-cursors to make it clearer how 
you work with plpgsql cursors from SQL.



Second, in functions-datetime, I wasn't able to find any mention of the 
behaviour of CASTing a DATE to a TIMESTAMP or to a TIMESTAMPTZ. I'd like 
to explicitly state that casting date to timestamp or timestamptz 
produces a date in local time, and show that if you want to cast a date 
to another time zone you can use:
    thedate::timestamp AT TIME ZONE 'UTC'

to produce a timestamptz containing that date at midnight UTC.

Opinions?

--
Criaig Ringer



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: TODO
Next
From: Tatsuo Ishii
Date:
Subject: Re: Outdated Japanse developers FAQ