<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - polecenie copy]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=353&amp;type=atom"/>
	<updated>2010-10-19T18:59:05Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=353</id>
		<entry>
			<title type="html"><![CDATA[Odp: polecenie copy]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=2225#p2225"/>
			<content type="html"><![CDATA[[quote]
Baza jest na innym kompie z systemem Linux.
[/quote]

Jeśli baza jest na innej maszynie to raczej takie kopiowanie się nie uda bo zgodnie z dokumentacją

[quote]
COPY with a file name instructs the PostgreSQL server to directly read from or write to a file. The file must be accessible to the server and the name must be specified from the viewpoint of the server. When STDIN or STDOUT is specified, data is transmitted via the connection between the client and the server. 
[/quote]

serwer bazodanowy musi mieć dostęp do pliku. Musisz przekopiować plik na serwer z bazą i wtedy wykonac kopiowanie.]]></content>
			<author>
				<name><![CDATA[rski]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=26</uri>
			</author>
			<updated>2010-10-19T18:59:05Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=2225#p2225</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: polecenie copy]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=2224#p2224"/>
			<content type="html"><![CDATA[Również mam problem z dostępem do pliku. Polecenie:

copy slupy from E'd:\\slupy.txt';

zwraca błąd: Nie ma takiego katalogu lub pliku.

Polecenie wykonuję z komputera z systemem Windows, z PGAdmina z okienka zapytań SQL lub konsoli PSQL. Zawsze z tym samym efektem. Plik jest na dysku komputera, z którego wywołuję polecenie.
Baza jest na innym kompie z systemem Linux.

Próbowałem plik umieścić na dysku C, D, jak również z w podkatalogach. Nic nie pomogło.]]></content>
			<author>
				<name><![CDATA[Rayo]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1158</uri>
			</author>
			<updated>2010-10-19T16:11:17Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=2224#p2224</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: polecenie copy]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=1596#p1596"/>
			<content type="html"><![CDATA[Faktycznie jeśli jest zapis do katalogu np. c:\a\p.txt (a nie bezpośrednio na dysk czyli c:\p.txt) to eksport idzie poprawnie.
Dzięki za pomoc.]]></content>
			<author>
				<name><![CDATA[bm]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1021</uri>
			</author>
			<updated>2009-11-30T12:13:38Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=1596#p1596</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: polecenie copy]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=1595#p1595"/>
			<content type="html"><![CDATA[Powiedz moze z jakiego użytkownka wykonujesz to polecenie copy? i jakie sa uprawnienia do pliku. Jesli jeszcze plik nie istnieje sprobuj zapisywac do jakiegos katalogu (nie na d:) i sprawdz uprawnienia do katalogu.]]></content>
			<author>
				<name><![CDATA[rski]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=26</uri>
			</author>
			<updated>2009-11-30T10:06:49Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=1595#p1595</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[polecenie copy]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=1594#p1594"/>
			<content type="html"><![CDATA[Mam problem ze skopiowaniem danych z tabeli do pliku.
Chcę wyeksportować kolumnę pesel z tabeli pac_new na dysk d do pliku p.txt (posgres 8.1 na Windzie)
Stosuję polecenie 
copy pac_new(pesel) to E'd:\\p.txt';
W efekcie otrzymuję komunikat "could not open file "d:\p.txt" for writing: Permission denied

W czym tkwi problem że nie można otworzyć pliku do zapisu??]]></content>
			<author>
				<name><![CDATA[bm]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1021</uri>
			</author>
			<updated>2009-11-30T09:29:57Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=1594#p1594</id>
		</entry>
</feed>
