[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-general
Subject: Re: Tempory table is not getting created inside Function in postgres.
From: nikhil raj <nikhilraj474 () gmail ! com>
Date: 2023-02-28 9:55:45
Message-ID: CAG1ps1yu8ZwyoJncDzvjyHmfB_hPVFVHECRJntVuKw47vp6whQ () mail ! gmail ! com
[Download RAW message or body]
HI All,
This for the help plpgsql and rest everything just move under declare and
now everything works fine. Thanks for the help.
On Tue, Feb 28, 2023 at 2:10 AM David G. Johnston <
david.g.johnston@gmail.com> wrote:
> On Mon, Feb 27, 2023 at 1:17 PM nikhil raj <nikhilraj474@gmail.com> wrote:
>
>>
>> The same query is executed outside the function its working properly
>> means just the qurey from drop temp table to insert but when i keep the
>> query inside a function its through me the error an after temp ra how
>> creation only i am using the select statment still its not exectuing the
>> create statment or not storing the temp table.
>>
>>>
>>>
> What Tom said is that in the following change 'sql' to plpgsql and move
> on. Your function is not capable of being executed in an SQL language
> function.
>
> CREATE OR REPLACE FUNCTION api."post_publish_Roster"(
> )
> RETURNS void
> LANGUAGE 'sql'
> COST 100
> VOLATILE PARALLEL UNSAFE
> AS $BODY$
>
> David J.
>
>
[Attachment #3 (text/html)]
<div dir="ltr">HI All,<div><br></div><div>This for the help
<span style="font-family:arial,helvetica,sans-serif">plpgsql </span> and rest \
everything just move under declare and now everything works fine. Thanks for the \
help.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Tue, Feb 28, 2023 at 2:10 AM David G. Johnston <<a \
href="mailto:david.g.johnston@gmail.com">david.g.johnston@gmail.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div \
dir="ltr"><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif"><span \
style="font-family:Arial,Helvetica,sans-serif">On Mon, Feb 27, 2023 at 1:17 PM nikhil \
raj <<a href="mailto:nikhilraj474@gmail.com" \
target="_blank">nikhilraj474@gmail.com</a>> wrote:</span><br></div></div><div \
class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div \
dir="auto"><br></div><div dir="auto">The same query is executed outside the \
function its working properly means just the qurey from drop temp table to insert \
but when i keep the query inside a function its through me the error an after temp ra \
how creation only i am using the select statment still its not exectuing the create \
statment or not storing the temp table.</div></div><div \
class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><br></blockquote></div></blockquote><div><br></div><div><div \
class="gmail_default" style="font-family:arial,helvetica,sans-serif">What Tom said is \
that in the following change 'sql' to plpgsql and move on. Your function is \
not capable of being executed in an SQL language function.</div><br></div><div \
class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span \
style="font-family:Arial,Helvetica,sans-serif">CREATE OR REPLACE FUNCTION \
api."post_publish_Roster"(</span></div> )<br> RETURNS \
void<br> LANGUAGE 'sql'<br> COST 100<br> \
VOLATILE PARALLEL UNSAFE<br> AS $BODY$</div><div \
class="gmail_quote"><br></div><div class="gmail_quote"><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif">David J.</div><br></div></div> \
</blockquote></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic