Re: New to Postgres

From: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
To: Darkcamel <dascamel2000(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: New to Postgres
Date: 2004-08-06 13:55:03
Message-ID: 20040806135503.31889.qmail@web20825.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

--- Darkcamel <dascamel2000(at)yahoo(dot)com> wrote:

> Hello all,
>
> I am new to postgres and don't really understand
> how the database is
> set-up. I am very fluent with mysql and sql2000,
> but postgres is new to
> me. If anyone can point me to some good links I
> would appreciate it very
> much.

This is worth a book, and there are several written
for that purpose. I will try a summary.

First, you need a working PostgreSQL installation. If
you do not have this now, I suggest looking for a
package for your platform, rather than attempting to
compile source yourself (unless you are feeling
adventurous).

Make sure you have some user(s) and database(s) set up
to play with. Example (assuming that the database
setup was initialized by user "postgres", which is
usually the case):

su postgres #you probably need to su to root first
createuser myuser
createdb mydb

Next, look over the documentation (easiest just to go
to http://www.postgresql.org for that). Don't spend
too much time reading the content at first; instead,
spend some time familiarizing yourself with the layout
of the contents. Once you become a little familiar
with the layout of the docs, you will find that you
will be easily able in most cases to drill down and
find answers to your questions.

Then, just jump in and start playing. Connect to the
server, and log into the database using "psql
[databasename]". Psql is something like Oracle's
sql*plus; "man psql" will tell you more. From the
psql prompt, you can issue SQL commands. There are
many psql-specific commands, which you can list by
typing "\?" at the psql prompt. Some examples:
\dt list all tables
\d tablename List structure (fields, datatypes etc.)
for "tablename".
\h command Show syntax for SQL command "command"

If you have been using another RDBMS, you can learn a
lot by attempting to import a dump from that system
into PostgreSQL. Depending on how many
vendor-specific extensions are in use, you may find
that you can do it with little (or possibly no)
editing of the dump file. To import a dump file, just
do (from the OS command line):
psql databasename < dump.file

This, plus a little research, should be enough to get
you started. The docs are the definitive source for
information. You will also find lots of useful stuff
at http://techdocs.postgresql.org. If you have
specific questions that you are having trouble finding
answers to, post them to the list.

Good luck.

>
> Thanks,
>
> Darkcamel
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

In response to

Browse pgsql-general by date

  From Date Subject
Next Message N. David 2004-08-06 14:00:57 New PHP + PostgreSQL group at Google Groups 2
Previous Message Markus Bertheau 2004-08-06 13:35:45 PostgreSQL 7.4.2 allows foreign key violation