\h open

Lists: pgsql-hackers
From: Oleg Bartunov <obartunov(at)gmail(dot)com>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: \h open
Date: 2013-09-16 04:43:11
Message-ID: CAF4Au4y8nU6jBhpvjRj3asjPNGAhyYf1T9sk-tHqW1mEANeQbw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I noticed there is nothing available in built-in psql help about OPEN
command. Does it intentional ?

postgres=# \h open
No help available for "open".
Try \h with no arguments to see available help.

Oleg


From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: obartunov(at)gmail(dot)com
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: \h open
Date: 2013-09-16 06:20:44
Message-ID: 5236A33C.30004@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 16.09.2013 07:43, Oleg Bartunov wrote:
> I noticed there is nothing available in built-in psql help about OPEN
> command. Does it intentional ?

That's because there is no OPEN command. PL/pgSQL does have an OPEN
statement, but that's just PL/pgSQL. And ecpg too, but again that's
handled by ecpg, not the backend.

- Heikki


From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: "obartunov(at)gmail(dot)com" <obartunov(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: \h open
Date: 2013-09-16 17:32:16
Message-ID: 1379352736.19468.YahooMailNeo@web162903.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Oleg Bartunov <obartunov(at)gmail(dot)com> wrote:

> I noticed there is nothing available in built-in psql help about
> OPEN command. Does it intentional ?
>
> postgres=# \h open
> No help available for "open".
> Try \h with no arguments to see available help.

PostgreSQL does not include OPEN as a SQL command:

http://www.postgresql.org/docs/current/interactive/sql-commands.html

DECLARE CURSOR opens the cursor immediately.

Some PLs include an OPEN statement, but psql does not have help for all the PLs.

As an example, plpgsql supports OPEN:

http://www.postgresql.org/docs/current/interactive/plpgsql-cursors.html#PLPGSQL-CURSOR-OPENING

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company