Dokumentationen » Programmierung » postgres
postgres starten
postmaster -i -D /var/lib/postgresql/data/ &
Datenbank anlegen
createdb -E LATIN1 [Datenbankname]
Datenbank löschen
dropdb [Datenbankname]
Datenbankdump
pg_dump [Datenbank] > [Datei]
und damit 'pgadminIII' unter Windows auch was damit anfangen kann, muss der Dump 'compressed' sein:
/usr/bin/pg_dump -i -h [HOST] -p 5432 -U [USER;eg:postgres] -F c -v -f "[PFAD]/[DATEI.backup]" -n public [DATENBANK]
Datenbankdump zurückspielen
psql -d [Datenbank] < [Datei]
psql -f [Datei] [Datenbank]
pg_restore [Optionen] [Datei]
pgadmin3 als Klickibunti-Zugriff auf postgres:
Die Installation stellte sich als garnicht so einfach heraus.
Letztendlich geholfen hat:
http://forums.gentoo.org/viewtopic-t-310319-highlight-pgadmin3.html
![]() |
|||||||||||||||||
|
|||||||||||||||||
I found the install and setup for pgadmin3-1.2, which is needed for postgresql 8.0+, to be quite tricky so I documented the steps I took to get it up and running. Also, the very few post out there don't realy offer too many specific gentoo related answers. What's needed:
postgresql-7.3 or postgresql-8.0 pgadmin3 about 1 1/2 hour of compile time on a 700 mhz laptop Setup / Bugs this solution currently has: I couldn't get it to work correctly with existing gentoo wxGTK-2.4.4 install so you will have to remove wxGTK which will break amule if you use it.
Setup wxGTK: First step Installing wxGTK (for this solution I chose wxGTK): Download the package (I used version 2.5.4): http://www.wxwidgets.org/dl_gtk.htm#dev Extract and make:
Build XRC package
Update the OGL lib and build OGL package
Setup pgadmin3 Now you are ready to get the If you wish to use CVS code:
OR the latest source tarball:
Now build and enjoy no errors hopefully on gentoo
Then you can add the symbolic link to the new executable
* After it is installed it should be easy to reemerge wxGTK-2.4.4 for other programs like amule * Credits * This tutorial extends upon the install instructions included with the CVS copy of pgadmin3 and adds in some important additions for gentoo |