Re: Function to set up variable inside it

2018-05-16 Thread Łukasz Jarych
Klaver; pgsql-gene...@postgresql.org >> PG-General Mailing List Subject: Re: Function to set up variable inside it Hi 2018-05-16 6:52 GMT+02:00 Łukasz Jarych mailto:jarys...@gmail.com>>: Hi Guys, thank you for your help ! Hmm yes something like this. I was wondering if is possible to

Re: Function to set up variable inside it

2018-05-16 Thread Pavel Stehule
Hi 2018-05-16 6:52 GMT+02:00 Łukasz Jarych : > Hi Guys, > > thank you for your help ! > > Hmm yes something like this. > > I was wondering if is possible to pass variable into function: > > CREATE FUNCTION change_trigger() RETURNS trigger AS $$ > > BEGIN > > IF TG_OP

Re: Function to set up variable inside it

2018-05-15 Thread Łukasz Jarych
Hi Guys, thank you for your help ! Hmm yes something like this. I was wondering if is possible to pass variable into function: CREATE FUNCTION change_trigger() RETURNS trigger AS $$ BEGIN IF TG_OP = 'INSERT' THEN INSERT IN

Re: Function to set up variable inside it

2018-05-15 Thread Adrian Klaver
On 05/15/2018 05:28 AM, Łukasz Jarych wrote: Hi Guys, I am using postgres 10.3 (or 4?). IT is possible to set up variable inside function? Like this?: https://www.postgresql.org/docs/10/static/plpgsql-declarations.html Best, Jacek -- Adrian Klaver adrian.kla...@aklaver.com

Re: Function to set up variable inside it

2018-05-15 Thread Pavel Stehule
2018-05-15 14:28 GMT+02:00 Łukasz Jarych : > Hi Guys, > > I am using postgres 10.3 (or 4?). > IT is possible to set up variable inside function? > I don't understand to the question. What do you think? Regards Pavel > > Best, > Jacek >

Function to set up variable inside it

2018-05-15 Thread Łukasz Jarych
Hi Guys, I am using postgres 10.3 (or 4?). IT is possible to set up variable inside function? Best, Jacek