<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - wydawanie poleceń z shell-a]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=206&amp;type=atom"/>
	<updated>2009-05-18T14:53:19Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=206</id>
		<entry>
			<title type="html"><![CDATA[Odp: wydawanie poleceń z shell-a]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=896#p896"/>
			<content type="html"><![CDATA[stwórz skryptem plik z poleceniem COPY i potem go wczytaj w psql 
\i, ewentualnie cat na psql.]]></content>
			<author>
				<name><![CDATA[orcus]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=761</uri>
			</author>
			<updated>2009-05-18T14:53:19Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=896#p896</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: wydawanie poleceń z shell-a]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=875#p875"/>
			<content type="html"><![CDATA[No niestety, nie pisałeś że nie masz superusera. Ale czy tylko COPY z pliku nie jest zarezerowane dla superusera. Z stdin chyba można.]]></content>
			<author>
				<name><![CDATA[rski]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=26</uri>
			</author>
			<updated>2009-05-15T15:49:48Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=875#p875</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: wydawanie poleceń z shell-a]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=874#p874"/>
			<content type="html"><![CDATA[[quote=rski]Stwórz sobie plik np csv z danymi i wciągnij z poziomu bazy pleceniem COPY 
[url]http://www.postgresql.org/docs/current/static/sql-copy.html[/url][/quote]

próbowałem, ale "COPY" jest zablokowana tylko dla superuser-a]]></content>
			<author>
				<name><![CDATA[wariat(chyba)]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=895</uri>
			</author>
			<updated>2009-05-15T12:51:26Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=874#p874</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: wydawanie poleceń z shell-a]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=870#p870"/>
			<content type="html"><![CDATA[Stwórz sobie plik np csv z danymi i wciągnij z poziomu bazy pleceniem COPY 
[url]http://www.postgresql.org/docs/current/static/sql-copy.html[/url]]]></content>
			<author>
				<name><![CDATA[rski]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=26</uri>
			</author>
			<updated>2009-05-14T15:56:45Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=870#p870</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: wydawanie poleceń z shell-a]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=869#p869"/>
			<content type="html"><![CDATA[Potrzebuję jeszcze raz pomocy. W ramach zajęć mam wpisać do bazy 1,000,000 wierszy. Pierwszą moją myślą było stworzyć skrypt, w który zapętlony wrzuci mi ten milion wierszy do bazy, wyglądał on tak:
[code]
echo off
i=1
export PGPASSWORD=****
while [ $i -le 1000000 ]
do
psql -c "INSERT INTO dupa VALUES ($i, 'dwa', 'trzy');" karol
i=$[i + 1]
done
[/code]
Niestety szybko się zorientowałem, że ten program wykonywałby się coś około 30 godzin, a ma w okolicach minuty. Możecie mi podsunąć lepszy pomysł?
Dzięki]]></content>
			<author>
				<name><![CDATA[wariat(chyba)]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=895</uri>
			</author>
			<updated>2009-05-14T15:46:49Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=869#p869</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: wydawanie poleceń z shell-a]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=867#p867"/>
			<content type="html"><![CDATA[Albo utworzyć plik .pgpass]]></content>
			<author>
				<name><![CDATA[rski]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=26</uri>
			</author>
			<updated>2009-05-14T13:52:12Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=867#p867</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: wydawanie poleceń z shell-a]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=864#p864"/>
			<content type="html"><![CDATA[musisz wyexportować do enva odpowiednie rzeczy, ewentualnie po idencie się logować
[code]
export PGPASSWORD=asdasdasda
export PGHOST=adasdasd
export PGUSER=adsada
itd..
[/code]]]></content>
			<author>
				<name><![CDATA[orcus]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=761</uri>
			</author>
			<updated>2009-05-14T11:58:07Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=864#p864</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: wydawanie poleceń z shell-a]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=863#p863"/>
			<content type="html"><![CDATA[dzięki :)
to jeszcze ciągnąc ten temat, w jaki sposób można dodać do wiersza poleceń hasło, tak żeby nie trzeba go wpisywać?]]></content>
			<author>
				<name><![CDATA[wariat(chyba)]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=895</uri>
			</author>
			<updated>2009-05-14T11:22:15Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=863#p863</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: wydawanie poleceń z shell-a]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=827#p827"/>
			<content type="html"><![CDATA[[code]
psql -c "zapytanie" baza
[/code]]]></content>
			<author>
				<name><![CDATA[rski]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=26</uri>
			</author>
			<updated>2009-05-07T16:07:17Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=827#p827</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[wydawanie poleceń z shell-a]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=826#p826"/>
			<content type="html"><![CDATA[Witam!
Mam taki problem, a mianowicie jak można zadać zapytanie z bash-a?
Dokładnie to chciałbym dodać wiersz do tabeli (by później to oprogramować w pętle, ale to już mam :))

Z góry dziękuję  za pomoc]]></content>
			<author>
				<name><![CDATA[wariat(chyba)]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=895</uri>
			</author>
			<updated>2009-05-07T15:45:43Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=826#p826</id>
		</entry>
</feed>
