Recently noticed documentation issues

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Recently noticed documentation issues
Date: 2012-08-24 01:47:10
Message-ID: 5036DD1E.7080404@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2012-08-24 02:57:41 Re: default_isolation_level='serializable' crashes on Windows
Previous Message Tatsuo Ishii 2012-08-24 01:47:08 Re: Outdated Japanse developers FAQ