<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Forum PostgreSQL - problem z parametrem OUT]]></title>
		<link>https://forum.postgresql.org.pl/viewtopic.php?id=291</link>
		<description><![CDATA[Najświeższe odpowiedzi w problem z parametrem OUT.]]></description>
		<lastBuildDate>Thu, 10 Sep 2009 10:20:18 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Odp: problem z parametrem OUT]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1296#p1296</link>
			<description><![CDATA[No nieźle 8.0, trochę to stare. No i niestety w 8.0 nie bylo parametrów out 
[url]http://www.postgresql.org/docs/8.0/interactive/sql-createfunction.html[/url]]]></description>
			<author><![CDATA[dummy@example.com (rski)]]></author>
			<pubDate>Thu, 10 Sep 2009 10:20:18 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1296#p1296</guid>
		</item>
		<item>
			<title><![CDATA[Odp: problem z parametrem OUT]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1295#p1295</link>
			<description><![CDATA[napiszę całą funkcję:
CREATE OR REPLACE FUNCTION searchObjectCLOB(pattern varchar, OUT result varchar)  AS $BODY$declare
  object record;
	
  begin

    for object in (select Id, Tag from p_objects order by id) loop
      if dbms_lob.instr(object.Tag, pattern) > 0 then
       result := result || object.Id || '|';
      end if;
    end loop;
  end;  $BODY$ LANGUAGE 'plpgsql' VOLATILE;


cały czas ten sam błąd:
ERROR:  CREATE FUNCTION / OUT parameters are not implemented


wersja:
PostgreSQL 8.0.0beta2 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.2.3 (mingw special 20030504-1)]]></description>
			<author><![CDATA[dummy@example.com (andyw)]]></author>
			<pubDate>Thu, 10 Sep 2009 10:17:36 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1295#p1295</guid>
		</item>
		<item>
			<title><![CDATA[Odp: problem z parametrem OUT]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1294#p1294</link>
			<description><![CDATA[[code]
select version(); 
[/code]
albo
[code]
select version; 
[/code]

Ale zakładam że jakąś nowszą, wiec usuń po prostu returns.]]></description>
			<author><![CDATA[dummy@example.com (rski)]]></author>
			<pubDate>Thu, 10 Sep 2009 10:14:47 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1294#p1294</guid>
		</item>
		<item>
			<title><![CDATA[Odp: problem z parametrem OUT]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1293#p1293</link>
			<description><![CDATA[Wersja:
"PostgreSQL 8.0.0beta2 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.2.3 (mingw special 20030504-1)"]]></description>
			<author><![CDATA[dummy@example.com (andyw)]]></author>
			<pubDate>Thu, 10 Sep 2009 10:12:54 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1293#p1293</guid>
		</item>
		<item>
			<title><![CDATA[Odp: problem z parametrem OUT]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1292#p1292</link>
			<description><![CDATA[Jaką masz wersję postgresa?
I po co ten 'returns void' skoro funkcja zwraca wartość typu varchar?]]></description>
			<author><![CDATA[dummy@example.com (rski)]]></author>
			<pubDate>Thu, 10 Sep 2009 10:08:30 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1292#p1292</guid>
		</item>
		<item>
			<title><![CDATA[problem z parametrem OUT]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=1291#p1291</link>
			<description><![CDATA[Witam!
Mam taki problem. Tworzę funkcję:
CREATE OR REPLACE FUNCTION "nazwa_funkcji"(in pattern varchar, out result varchar) RETURNS void AS ...itd...
i wyrzuca mi błąd:
ERROR:  CREATE FUNCTION / OUT parameters are not implemented
Totalnie nie rozumiem o co chodzi. Wydaje mi się, że deklaracja jest zgodna z dokumentacją.

Korzystając z możliwości chciałbym się jeszcze zapytać jak nadać wartość domyślną w funkcji. Gdy próbuję wywołać taką funkcję:
CREATE OR REPLACE FUNCTION add_state(process_id_ numeric, state_name_ varchar default 'new state' , state_nr_ numeric default null) returns numeric AS
dostaje błąd:
ERROR:  syntax error at or near "default" at character 191
Przyznam się, że trochę głupieje bo w ogóle nie rozumiem dlaczego tak się dzieje. Byłbym wdzięczny za wszelką pomoc. Z góry dziękuje.
Pozdrawiam]]></description>
			<author><![CDATA[dummy@example.com (andyw)]]></author>
			<pubDate>Thu, 10 Sep 2009 09:57:59 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=1291#p1291</guid>
		</item>
	</channel>
</rss>
