BUG #6533: postgre server crashes by create function (create table as)

Поиск
Список
Период
Сортировка
От vozhdb@gmail.com
Тема BUG #6533: postgre server crashes by create function (create table as)
Дата
Msg-id E1S8BkF-0004XZ-Tp@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #6533: postgre server crashes by create function (create table as)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      6533
Logged by:          Alex Sanin
Email address:      vozhdb@gmail.com
PostgreSQL version: 9.0.4
Operating system:   Windows XP sp3
Description:=20=20=20=20=20=20=20=20

Here is the script:

drop table if exists test;
CREATE TABLE test
(
  id serial NOT NULL,
  lastname character varying(255) NOT NULL,
  firstname character varying(255),
  middlename character varying(255),
  birthdate date,
  listid integer,
  CONSTRAINT test_pkey PRIMARY KEY (id)
)
WITH (
  OIDS=3DFALSE
);

insert into test select a, a::character varying, a::character varying,
a::character varying, now()::date + a, a from generate_series(1,10000)
t(a);

CREATE OR REPLACE FUNCTION create_test_child() RETURNS void AS $$
  DROP TABLE IF EXISTS test_child;
  CREATE TABLE test_child AS SELECT test.* FROM test as test;
$$ LANGUAGE sql VOLATILE;

select create_test_child();

-------------------------------------
---------same without aliases--------

drop table if exists test;
CREATE TABLE test
(
  id serial NOT NULL,
  lastname character varying(255) NOT NULL,
  firstname character varying(255),
  middlename character varying(255),
  birthdate date,
  listid integer,
  CONSTRAINT test_pkey PRIMARY KEY (id)
)
WITH (
  OIDS=3DFALSE
);

insert into test select a, a::character varying, a::character varying,
a::character varying, now()::date + a, a from generate_series(1,10000)
t(a);

CREATE OR REPLACE FUNCTION create_test_child() RETURNS void AS $$
  DROP TABLE IF EXISTS test_child;
  CREATE TABLE test_child AS SELECT * FROM test;
$$ LANGUAGE sql VOLATILE;

select create_test_child();

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

Предыдущее
От: barry_bell@harte-hanks.com
Дата:
Сообщение: BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #6532: pg_upgrade fails on Python stored procedures