Re: Backend crash (long)

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paesold <mpaesold(at)gmx(dot)at>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Backend crash (long)
Date: 2002-09-18 15:11:00
Message-ID: 1032361861.44246.37.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2002-09-18 at 11:03, Tom Lane wrote:
> "Michael Paesold" <mpaesold(at)gmx(dot)at> writes:
> > I have written a test function, that will create a sequence and a table,
> > than insert one million rows into the table, analyze the table and create an
> > index on one of the columns.
>
> You can't run ANALYZE inside a function. In CVS tip there's a check to
> prevent the VACUUM variant of this problem, but I'm not sure if it
> handles the ANALYZE variant (yet).

ANALYZE in 7.3 works fine in a transaction, so it shouldn't it be able
to work in a function as well?

rbt=# begin;
BEGIN
rbt=# analyze;
ANALYZE
rbt=# commit;
COMMIT
rbt=# create function test() returns bool as 'analyze; select true;'
language 'sql';
CREATE FUNCTION
rbt=# select test();
test
------
t
(1 row)

--
Rod Taylor

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-09-18 15:12:19 Re: The notorious to_char bug
Previous Message Tom Lane 2002-09-18 15:06:10 Re: [GENERAL] Still big problems with pg_dump!