Monday, May 10, 2010

Postgres- basics

1. login to postgres -
sudo -u postgres psql postgres

2. Create a database
create database is_db;

3. grant permission
grant all on database is_db to postgres;

in above;
postgres is the user who was created at the time PostrSQL was installed.

4. to navigate to the files system from postgres prompt.
\cd c:cc\vv\vv\v\mmmm

5. run a script
\i postgre.sql

6. quit postgres
\q

No comments:

Post a Comment

Day 03 Gala Dinner Highlight Video