Re: [GENERAL] create temp view from function inside plpgsql function.

2014-04-08 Thread David Johnston
Re-posting, see quote David Johnston wrote > > Pavel Stehule wrote >> 2014-04-04 14:16 GMT+02:00 Tjibbe < >> tjibbe@ >> >: >> >>> Thanks that works! >>> >>> Little bit confusing ERROR. >>> >> >> yes, it could be - but hard to fix it, because it is based on cooperation >> two worlds - plpgsql

Re: [GENERAL] create temp view from function inside plpgsql function.

2014-04-04 Thread Pavel Stehule
2014-04-04 14:16 GMT+02:00 Tjibbe : > Thanks that works! > > Little bit confusing ERROR. > yes, it could be - but hard to fix it, because it is based on cooperation two worlds - plpgsql and SQL - and it is sometimes not simple. When you understand how plpgsql interpret use variables in SQL queri

Re: [GENERAL] create temp view from function inside plpgsql function.

2014-04-04 Thread Tjibbe
Thanks that works! Little bit confusing ERROR. Regards Tjibbe -- +31 6 29401726 tji...@rijpma.org Jacobusstraat 185 3012 JM Rotterdam On 4 April 2014 11:43, Tjibbe wrote: > I have a plpgsql function with: > > > PERFORM * FROM answers(_h);--works fine. > CREATE TEMP VIEW answers AS SELEC

Re: [GENERAL] create temp view from function inside plpgsql function.

2014-04-04 Thread Pavel Stehule
Hello 2014-04-04 11:43 GMT+02:00 Tjibbe : > I have a plpgsql function with: > > > PERFORM * FROM answers(_h);--works fine. > CREATE TEMP VIEW answers AS SELECT * FROM answers(_h); --gives error... > Inside view definition should not be plpgsql variable - this statement has no plan - CREATE

[GENERAL] create temp view from function inside plpgsql function.

2014-04-04 Thread Tjibbe
I have a plpgsql function with: PERFORM * FROM answers(_h);--works fine. CREATE TEMP VIEW answers AS SELECT * FROM answers(_h); --gives error... Why I get this error: ERROR: column \"_h\" does not exist\nLINE 1: ...TEMP VIEW answers AS SELECT * FROM antwoorden_view(_h) -- +31 6 29401726 tj