Re: [BUGS] BUG #4629: PL/pgSQL issue

2009-02-02 Thread Pavel Stehule
2009/2/2 Tom Lane : > Pavel Stehule writes: >> We should ignore INTO keyword when statement starts with CREATE >> keyword. This patch have to simple. I'll prepare it. > > I'm already on it... > >regards, tom lane ok Regards Pavel Stehule > > Index: gram.y > ==

Re: [BUGS] BUG #4629: PL/pgSQL issue

2009-02-02 Thread Tom Lane
Pavel Stehule writes: > We should ignore INTO keyword when statement starts with CREATE > keyword. This patch have to simple. I'll prepare it. I'm already on it... regards, tom lane Index: gram.y === RCS fil

Re: [BUGS] BUG #4629: PL/pgSQL issue

2009-02-02 Thread Pavel Stehule
Hello 2009/2/2 Tom Lane : > "Martin Blazek" writes: >> CREATE FUNCTION test() RETURNS integer AS $$ >> BEGIN >> CREATE RULE "rule" AS ON INSERT TO "test" DO INSTEAD INSERT INTO "test" >> VALUES (1); >> END;$$ LANGUAGE plpgsql; > > Hm, I guess nobody ever tried to do that in plpgsql before. It's

Re: [BUGS] BUG #4629: PL/pgSQL issue

2009-02-02 Thread Tom Lane
"Martin Blazek" writes: > CREATE FUNCTION test() RETURNS integer AS $$ > BEGIN > CREATE RULE "rule" AS ON INSERT TO "test" DO INSTEAD INSERT INTO "test" > VALUES (1); > END;$$ LANGUAGE plpgsql; Hm, I guess nobody ever tried to do that in plpgsql before. It's taking the INTO as starting a clause

[BUGS] BUG #4629: PL/pgSQL issue

2009-01-30 Thread Martin Blazek
The following bug has been logged online: Bug reference: 4629 Logged by: Martin Blazek Email address: mbla...@8bc.com PostgreSQL version: 8.3.5 Operating system: Windows XP Description:PL/pgSQL issue Details: I try to create the following rule. It doesn't make much