Re: [GENERAL] Text parameter is treated as sql query in postgresql function

2016-01-12 Thread Adrian Klaver
On 01/11/2016 11:47 PM, Yash Gajbhiye wrote: I am using postgres crosstab() function to create a table. My first dynamic query function (dynamic_crosstab) creates a sql select statement containing crosstab(), and then this select statement gives the final result on execution. /*dynamic_crosstab

Re: [GENERAL] Text parameter is treated as sql query in postgresql function

2016-01-12 Thread Yash Gajbhiye
Hello Adrian, Thank you for your response. Sorry about the typos in the previous post. I will try to explain myself more clearly. This is my first function to create a dynamic query and it is as follows: CREATE OR REPLACE FUNCTION dynamic_crosstab( source_sql text, category_sql text,

Re: [GENERAL] Text parameter is treated as sql query in postgresql function

2016-01-12 Thread Raymond O'Donnell
On 12/01/2016 17:07, Yash Gajbhiye wrote: > Hello Adrian, > > Thank you for your response. Sorry about the typos in the previous post. > > I will try to explain myself more clearly. > > This is my first function to create a dynamic query and it is as follows: > > CREATE OR REPLACE FUNCTION

Re: [GENERAL] Text parameter is treated as sql query in postgresql function

2016-01-12 Thread Adrian Klaver
On 01/12/2016 09:07 AM, Yash Gajbhiye wrote: Hello Adrian, Thank you for your response. Sorry about the typos in the previous post. I will try to explain myself more clearly. This is my first function to create a dynamic query and it is as follows: This works fine. It accepts 2 sql