Dies ist nun die Seite, die alles wichtige und interessante zusammenfaßt, wenn man beginnt, das wirklich wichtige und interessante aus den Augen zu verlieren!

postgres

Die andere freie Datenbank

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

PostPosted: Fri Mar 18, 2005 3:38 am    Post subject: pgadmin3 1.2 and 1.3 for postgresql 8.0+  

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:
    wxGTK-2.5.3+ or wxX11-2.5.3+
    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.
Code:
su
unmerge wxGTK



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:
Code:
tar -zxf wxGTK-2.5.4.tar.gz
cd wxGTK-2.5.4
./configure --with-gtk --enable-gtk2 --enable-unicode --disable-shared --enable-debug --enable-mimetype=no --enable-xrc
make
make install
ldconfig


Build XRC package
Code:
# Within the wxGTK directory
cd contrib/src/stc/
make all && make install


Update the OGL lib and build OGL package
Code:

nano contrib/include/wx/ogl/basic.h
# Change line 20 from
#define wxUSE_DEPRECATED 1 to
#define wxUSE_DEPRECATED 0
cd contrib/src/ogl
make all && make install


Setup pgadmin3

Now you are ready to get the If you wish to use CVS code:
Code:
CVSROOT=:pserver:anonymous@cvs.pgadmin.org:/projects export CVSROOT
cvs login
cvs -z9 checkout pgadmin3
cd pgadmin3
sh bootstrap


OR the latest source tarball:

Code:
wget http://www.pgadmin.org/snapshots/pgadmin3-src.tar.gz
tar -zxvf pgadmin3-src.tar.gz
cd pgadmin3pgadmin3 package


Now build and enjoy no errors hopefully on gentoo
Code:
./configure --enable-static --enable-debug
 make all
 make install



Then you can add the symbolic link to the new executable
Code:
ln -sf /usr/local/pgadmin3/bin/pgadmin3 /usr/bin/pgadmin3


* 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
 
Impressum