<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - funkcja zwracająca tabelę]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=2255&amp;type=atom"/>
	<updated>2015-02-02T06:02:42Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=2255</id>
		<entry>
			<title type="html"><![CDATA[Odp: funkcja zwracająca tabelę]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=5430#p5430"/>
			<content type="html"><![CDATA[Mała podpowiedź

[url]http://pl.wikibooks.org/wiki/Procedury_sk%C5%82adowane_w_PostgreSQL/Zwracanie_wynik%C3%B3w[/url]

[url]http://www.postgresql.org/docs/9.3/static/sql-createfunction.html[/url]]]></content>
			<author>
				<name><![CDATA[adamleon]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=873</uri>
			</author>
			<updated>2015-02-02T06:02:42Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=5430#p5430</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[funkcja zwracająca tabelę]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=5428#p5428"/>
			<content type="html"><![CDATA[Czy można napisać funkcję tak, żeby zwracała tabelę?
Funkcja jako argument ma przyjmować liczbę całkowitą, a zwracać zapytanie SELECT w zależności od tej liczby.
[code]CREATE OR REPLACE FUNCTION test(ile INTEGER) RETURNS VOID AS $$
BEGIN
 EXECUTE
 'SELECT nazwa, ilosc
  FROM tabela
  WHERE ilosc < ' || ile || ';';
END;
$$ LANGUAGE 'plpgsql';[/code]]]></content>
			<author>
				<name><![CDATA[maro]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=2222</uri>
			</author>
			<updated>2015-02-01T11:43:49Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=5428#p5428</id>
		</entry>
</feed>
