CLOSE command tag

Поиск
Список
Период
Сортировка
Искать

CLOSE command tag

От:
Neil Conway <neilc@samurai.com>
Дата:
Is there a reason for this behavior?

nconway=# begin;
BEGIN
nconway=# declare foo cursor for select 1;
DECLARE CURSOR
nconway=# close foo;
CLOSE CURSOR
nconway=# close cursor foo;
ERROR:  parser: parse error at or near "foo" at character 14

(i.e. the CLOSE command tag is "CLOSE CURSOR", which doesn't even appear
to be a command)

Cheers,

Neil


Re: CLOSE command tag

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Neil Conway  writes:
> (i.e. the CLOSE command tag is "CLOSE CURSOR", which doesn't even appear
> to be a command)

Seems bogus to me too --- it should just say CLOSE.  I suppose someone
made it that way by analogy with DECLARE CURSOR, but I don't think the
command tag should include keywords that don't actually appear in the
statement ...
		regards, tom lane


Re: CLOSE command tag

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Neil Conway writes:

> (i.e. the CLOSE command tag is "CLOSE CURSOR", which doesn't even appear
> to be a command)

The command tags are aligned with the SQL standard (see under ), which doesn't appear to make much sense in this
case, but it doesn't hurt anyone.

-- 
Peter Eisentraut   peter_e@gmx.net


Re: CLOSE command tag

От:
Neil Conway <neilc@samurai.com>
Дата:
On Tue, 2003-04-22 at 09:11, Peter Eisentraut wrote:
> The command tags are aligned with the SQL standard (see under  diagnostics statement>), which doesn't appear to make much sense in this
> case, but it doesn't hurt anyone.

Fair enough.

If we're going to SQL-compliant here, there are a couple other command
tags that should be corrected: COMMIT -> COMMIT WORK, ROLLBACK ->
ROLLBACK WORK, UPDATE -> UPDATE WHERE, DELETE -> DELETE WHERE, etc.

Cheers,

Neil


Re: CLOSE command tag

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Neil Conway writes:

> If we're going to SQL-compliant here, there are a couple other command
> tags that should be corrected: COMMIT -> COMMIT WORK, ROLLBACK ->
> ROLLBACK WORK, UPDATE -> UPDATE WHERE, DELETE -> DELETE WHERE, etc.

We decided not to do these particular ones, mostly for compatibility
reasons.  See past discussions.

-- 
Peter Eisentraut   peter_e@gmx.net


FAQ