<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Forum PostgreSQL - Funkcja z OUT i RETURN]]></title>
		<link>https://forum.postgresql.org.pl/viewtopic.php?id=354</link>
		<description><![CDATA[Najświeższe odpowiedzi w Funkcja z OUT i RETURN.]]></description>
		<lastBuildDate>Mon, 30 Nov 2009 13:09:38 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Odp: Funkcja z OUT i RETURN]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1598#p1598</link>
			<description><![CDATA[oto zapis z dokumentacji

[code]
When there are OUT or INOUT parameters, the RETURNS clause can be omitted. If present, it must agree with the result type implied by the output parameters: RECORD if there are multiple output parameters, or the same type as the single output parameter. 
[/code]
Typy z OUT i RETURN muszą się zgadzać]]></description>
			<author><![CDATA[dummy@example.com (rski)]]></author>
			<pubDate>Mon, 30 Nov 2009 13:09:38 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1598#p1598</guid>
		</item>
		<item>
			<title><![CDATA[Funkcja z OUT i RETURN]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1597#p1597</link>
			<description><![CDATA[Czy taka konstrukcja funkcji w pgsql jest poprawna

FUNCTION get(p_param_id IN  smallint,
                            p_table_id   IN  bigint,
                            o_exists      OUT boolean) RETURN table_name%rowtype;

Czy można jednocześnie stosować parametr OUT z RETURN?

Wywołując funkcję
Declare
v_rekord  table_name%rowtype;
v_exist   boolean;
begin
v_rekord := get(1,’aaa’,v_exist);
end;

W debug widzę ze parametr o_exists   ustawia się poprawnie true lub false. Również v_rekord jest uzupełniany poprawnie.

[b]Ale v_exist zawsze jest null [/b]

pracuje na wersji 8,3]]></description>
			<author><![CDATA[dummy@example.com (mborkk)]]></author>
			<pubDate>Mon, 30 Nov 2009 12:49:05 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1597#p1597</guid>
		</item>
	</channel>
</rss>
