<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - Zmienna w ścieżce docelowej dla COPY TO]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=1361&amp;type=atom"/>
	<updated>2012-07-16T21:00:33Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=1361</id>
		<entry>
			<title type="html"><![CDATA[Odp: Zmienna w ścieżce docelowej dla COPY TO]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=3668#p3668"/>
			<content type="html"><![CDATA[uzyj execute 'COPY (SELECT * from tabela)
    TO ''/tmp/csv/RAP_uztkowania_z_dnia_' || to_char(CURRENT_DATE,'yyyy-mm-dd') || '.csv''  CSV HEADER;';]]></content>
			<author>
				<name><![CDATA[c_michal]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=627</uri>
			</author>
			<updated>2012-07-16T21:00:33Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=3668#p3668</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Zmienna w ścieżce docelowej dla COPY TO]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=3667#p3667"/>
			<content type="html"><![CDATA[Witam, mam problem, otóż chce dodać zmienną w ścieżce docelowej w zapytaniu:

[code]
COPY (SELECT * from tabela)
    TO '/tmp/csv/RAP_uztkowania_z_dnia' || CURRENT_DATE || '.csv'  CSV HEADER;
[/code]

no i nie wiem jak zdefiniować ścieżkę, by tworzył plik z aktualną datą w nazwie. To co jest powyżej niestety nie działa. Proszę o pomoc.]]></content>
			<author>
				<name><![CDATA[lasoty]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1424</uri>
			</author>
			<updated>2012-07-16T11:05:26Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=3667#p3667</id>
		</entry>
</feed>
