Re: [HACKERS] alter table crashes back end

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Don Baccus <dhogaza(at)pacifier(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] alter table crashes back end
Date: 1999-12-10 02:42:30
Message-ID: 11253.944793750@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Don Baccus <dhogaza(at)pacifier(dot)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,"ALTER TABLE/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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-12-10 03:45:09 Re: [HACKERS] FreeBSD problem under heavy load
Previous Message Tom Lane 1999-12-10 02:22:20 Re: [HACKERS] FOREIGN KEY and shift/reduce