SHOW, RESET require quotes, SET doesn't

Started by Michael Fuhrover 20 years ago2 messages
#1Michael Fuhr
mike@fuhr.org

SHOW and RESET require quoting in cases where SET doesn't:

test=> SHOW plperl.use_strict;
ERROR: syntax error at or near "." at character 12
LINE 1: SHOW plperl.use_strict;
^
test=> SHOW "plperl.use_strict";
plperl.use_strict
-------------------
on
(1 row)

test=> SET plperl.use_strict TO off;
SET
test=> RESET plperl.use_strict;
ERROR: syntax error at or near "." at character 13
LINE 1: RESET plperl.use_strict;
^
test=> RESET "plperl.use_strict";
RESET

I see in gram.y that SHOW and RESET take a ColId but SET takes a
var_name, which is ColId or var_name.ColId. Is there a reason for
the inconsistency or is it just an oversight?

--
Michael Fuhr

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Fuhr (#1)
Re: SHOW, RESET require quotes, SET doesn't

Michael Fuhr <mike@fuhr.org> writes:

I see in gram.y that SHOW and RESET take a ColId but SET takes a
var_name, which is ColId or var_name.ColId. Is there a reason for
the inconsistency or is it just an oversight?

Offhand it looks like the custom-variable patch missed dealing
with SHOW and RESET ... that patch was a few bricks shy of a load
in other ways too ...

regards, tom lane