Re: [HACKERS] alter table crashes back end

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] alter table crashes back end
Дата
Msg-id 11253.944793750@sss.pgh.pa.us
обсуждение исходный текст
Ответ на alter table crashes back end  (Don Baccus <dhogaza@pacifier.com>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY andshift/reduce)
Следующее
От: wieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY andshift/reduce)