Don Baccus <dhogaza@pacifier.com> writes:
> alter table foo add();
> crashes the backend.
> I'd say it's really low priority, but should be fixed.
A crash is never a good thing. If you feel like patching your
copy, the problem is in backend/parser/gram.y:
***************
*** 759,769 **** } | ADD '(' OptTableElementList ')' {
- Node *lp = lfirst($3);
- if (length($3) != 1) elog(ERROR,"ALTER TABLE/ADD() allows one column
only");
! $$ = lp; } | DROP opt_column ColId {
elog(ERROR,"ALTERTABLE/DROP COLUMN not yet implemented"); }
--- 759,767 ---- } | ADD '(' OptTableElementList ')' {
if(length($3) != 1) elog(ERROR,"ALTER TABLE/ADD() allows one column only");
! $$ = (Node *) lfirst($3); } | DROP opt_column ColId {
elog(ERROR,"ALTER TABLE/DROP COLUMN not yet implemented"); }
***************
Line numbers certainly not right for 6.5 ...
regards, tom lane