Re: Moving from MySQL to PGSQL....some questions

From: Karam Chand <karam_chand03(at)yahoo(dot)com>
To: Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Moving from MySQL to PGSQL....some questions
Date: 2004-02-25 15:45:06
Message-ID: 20040225154506.57160.qmail@web60804.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)frodo(dot)hserus(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message cnliou 2004-02-25 15:49:19 Re: TG_RELNAME problem
Previous Message Dennis Bjorklund 2004-02-25 15:25:37 Re: Moving from MySQL to PGSQL....some questions