Re: BUG #3648: Server crashes when trying to create a table

Поиск
Список
Период
Сортировка
От Anton A. Patrushev
Тема Re: BUG #3648: Server crashes when trying to create a table
Дата
Msg-id 1191458827.3357.50.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: BUG #3648: Server crashes when trying to create a table  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-bugs
Hi Alvaro,

In the function I'm trying to drop this table if it already exists:

BEGIN

DROP TABLE vertices_tmp;
EXCEPTION
 WHEN UNDEFINED_TABLE THEN
END;

CREATE TABLE vertices_tmp ( id serial );

...

Thanks,
Anton.

> Anton wrote:
>
> >
> > CREATE TABLE vertices_tmp(id serial);
> >
> > It's working fine with PostgreSQL 8.2.4 but crashes with segfault at
> > versions 8.1.9 and 8.2.5.
>
> Works for me:
>
> alvherre=# create function test_anton() returns void language plpgsql  as $$ begin create table anton(a serial); end;
$$;
> CREATE FUNCTION
> alvherre=# select test_anton();
> NOTICE:  CREATE TABLE will create implicit sequence "anton_a_seq" for serial column "anton.a"
> CONTEXT:  SQL statement "create table anton(a serial)"
> PL/pgSQL function "test_anton" line 1 at SQL statement
>  test_anton
> ------------
>
> (1 row)
>
> alvherre=# select version();
>                                                           version
     
>
---------------------------------------------------------------------------------------------------------------------------
>  PostgreSQL 8.2.5 on x86_64-unknown-linux-gnu, compiled by GCC gcc-4.1 (GCC) 4.1.3 20070831 (prerelease) (Debian
4.1.2-16)
> (1 row)
>
> My guess is you are doing something else on the function that you
> aren't showing.  Whatever you do after the CREATE TABLE perhaps.
>

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

Предыдущее
От: "Anton A. Patrushev"
Дата:
Сообщение: Re: BUG #3648: Server crashes when trying to create a table
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #3648: Server crashes when trying to create a table