Thread: No tables in postgres and template db

No tables in postgres and template db

From
Marco Battelapesca
Date:
Hi all, i'm a newby in postgresql. Now i'm learning ddl and sql. In the future i'dd like to learn db management.
Yesterday  i installed  Windows 7 64 bit into one partition and ubuntu 6.10 64 bit into the other (i've decided to learn linux as well). I installed the last version of potgresql and the installation worked fine on both the operative system.
I can access to postgres server and create my db and my tables. However i've noticed that postgres,template0 and template1 contain no tables. I've checked that by console and pgadmin.

(By linux console)

marco@marco-outis:~$ sudo -u postgres psql
[sudo] password for marco:
psql (8.4.2)
Digita "help" per aiuto.

postgres=# \l 

                                  Lista dei database
   Nome    | Proprietario | Codifica | collazione  |    Ctype    | Privilegi di accesso 
-----------+--------------+----------+-------------+-------------+-----------------------
 postgres  | postgres     | UTF8     | it_IT.UTF-8 | it_IT.UTF-8 |
 prova     | postgres     | UTF8     | it_IT.UTF-8 | it_IT.UTF-8 |
 template0 | postgres     | UTF8     | it_IT.UTF-8 | it_IT.UTF-8 | =c/postgres
                                                                 : postgres=CTc/postgres
 template1 | postgres     | UTF8     | it_IT.UTF-8 | it_IT.UTF-8 | =c/postgres
                                                                 : postgres=CTc/postgres
(4 righe)

postgres=# \c postgres
psql (8.4.2)
Sei collegato al database "postgres".   (you're connected to database "postgres)
postgres=# \d
Nessuna relazione trovata.           (no relations found)
postgres=#select* from pg_user;

 usename  | usesysid | usecreatedb | usesuper | usecatupd |  passwd  | valuntil | useconfig
----------+----------+-------------+----------+-----------+----------+----------+-----------
 postgres |       10 | t           | t        | t         | ******** |          |
(1 riga)

(END)               
A little strange thing. as you can read, the console desn't give me again "postgres=#" but "END". Only typing "q" i have again "postgres=#" wirh cursor but the selected table with rows and columns disappears
It seems that tables are simply hidden. In pgadminIII i've the same question.

Is all that normal or not?
Sorry for my english and thanks in advance.

Marco

Re: No tables in postgres and template db

From
"Daniel Verite"
Date:
    Marco Battelapesca wrote:

> A little strange thing. as you can read, the console desn't give me again
> "postgres=#" but "END". Only typing "q" i have again "postgres=#" wirh
> cursor but the selected table with rows and columns disappears

It's a pager issue. A simple way to avoid it is to have the LESS environment
variable set to -X
More info at http://www.shallowsky.com/linux/noaltscreen.html

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org