Re: Moving from MySQL to PGSQL....some questions - Mailing list pgsql-general

From Karam Chand
Subject Re: Moving from MySQL to PGSQL....some questions
Date
Msg-id 20040225154506.57160.qmail@web60804.mail.yahoo.com
Whole thread Raw
In response to Re: Moving from MySQL to PGSQL....some questions  (Shridhar Daithankar <shridhar@frodo.hserus.net>)
Responses Re: Moving from MySQL to PGSQL....some questions
List pgsql-general
Thanks. That was very helpful

One more thing (it might be slightly off topic):

I have two computers on network, one is running RH
Linux and one running WInXP. My PostgreSQL is running
in Linux box.

I downloaded PgAdmin III for both OS. When I am
connecting from the Linux box I am able to view the
three system schemas :

pg_catalog
pg_temp_1
pg_toast

When I am accessing it using PgAdmin III on Windows I
can only see the 'public' schema and its tables? Why
is it so?

Regards
Karam

-- Shridhar Daithankar <shridhar@frodo.hserus.net>
wrote:
> Karam Chand wrote:
> > 1.) What is template1 and template0? I assume
> these
> > are system databases. Am I right?
>
> Yes. whenever a new database is created, these
> databases are copied there. So
> these are like initial master copies.
>
> > 2.) When I create a database using CREATE DATABASE
> > stmt. a new DB is created where it has 4 schemas
> and
> > around 100 tables. These are the system tables
> keeping
> > information about everything in the database? I
> hope I
> > am correct :)
>
> Yes.
>
> > 3.) To get all the database is the server we use
> query
> > like -
> >
> > select datname from pg_database
> >
> > I means that there exists a table pg_database in
> all
> > the database and all the pg_database table(s) are
> > updated whenever a user issues CREATE DATABASE
> stmt.
> >
> > Why I am saying so coz in PgAdmin III i can see
> these
> > tables in all the databases?
>
> Some tables such as users/passwords/groups and
> databases are shared across all
> the databases. You are looking at same data.
> >
> > 4.) I couldnot find any query to change the
> context of
> > database like in MySQL :
> >
> > use database;
> >
> > or am i missing something?
>
> Any postgresql session has to connect to a database.
> To connect to different
> database, you need to initiate a new connection or
> drop existing one and create
> new one.
>
> You can not switch the database-connected-to on the
> fly.
>
> > 5.) In MySQL, there are many command like show
> tables,
> > show databases etc. to get object details. I cant
> see
> > anything similar in PGSQL. After searching the net
> i
> > find that i have to execute certain queries to
> fetch
> > those queries. Is this the only way?
>
> No. Simplest would be issuing \? on psql prompt. It
> will tell you plethora of
> options/commands using which you can accomplish many
> task. Just remember that
> these are not SQL command provided by server. It is
> the psql application which
> provide these commands. So you cannot use them in
> say php.
>
> > Any help would be appreciated.
>
> HTH
>
>   Shridhar


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

pgsql-general by date:

Previous
From: Dennis Bjorklund
Date:
Subject: Re: Moving from MySQL to PGSQL....some questions
Next
From: "cnliou"
Date:
Subject: Re: TG_RELNAME problem