LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   postgres data (https://www.linuxquestions.org/questions/linux-newbie-8/postgres-data-167214/)

jamna17 04-07-2004 04:27 AM

postgres data
 
hi,

i installed a system that comes packaged with redhat 8.

i know that my data is stored in postgresql but i cant seem to locate the database/data.

any ideas?

thanx

iluvatar 04-07-2004 04:40 AM

hi there,

you must start the postgres shell, psql. this is by default located in /usr/local/pgsql/bin/psql. this is postgres default, don't know if redhat stores it here but with slocate you should be able to locate this if it isn't there. check the postgres documentation on how to create / manage databases etc, they have real good docs in pdf :) if you don't want to work with the command shell, there's a grafics interface called pgadmin (somewhere on the postgres.com website) wich is really good :)

succes,
-= iluvatar =-

jamna17 04-07-2004 05:00 AM

hey there,

located psql in user\bin using slocate :-)

going thru the pdfs

thanks for the info!

jamna17 04-07-2004 05:40 AM

hi

found my database found my tables
how on earth do i view the data in the tables without making any alterations?

iluvatar 04-07-2004 05:45 AM

when entering the postgres shell, you can use normal SQL commands (there's a good SQL reference included in the postgres documentation)

use this to view data:
select * from <table>;

or with criteria:
select * from <table> where <field>="<value>";

I don't use pgadmin but i thought it had a function to view the data... not sure...

and so on and so forth... you should really dive into the SQL language and syntax ;)

greetz,
-= iluvatar =-

ps: dont forget the ';' dot-comma at the end of a line, this will make postgres execute the line :)


All times are GMT -5. The time now is 03:00 AM.