Re: Confused About pg_* Tables

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Confused About pg_* Tables
Date: 2011-10-14 16:57:20
Message-ID: CAOBaU_YLx4v7BMUZ8yzjfC_d4wq5Bedq9o0tLTGCia=Xz47A3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Oct 14, 2011 at 6:06 PM, Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com>wrote:

> I'm confused about how I'm able to access the following pg_* tables
> regardless of connected database. I thought these tables were hidden
> or stored in the 'postgres' database but I'm still able to access this
> data regardless of which database I'm connected to:
>
> Code:
>
> zoo=# SELECT * FROM pg_user;
> usename | usesysid | usecreatedb | usesuper | usecatupd | userepl |
> passwd | valuntil | useconfig
>
> ----------+----------+-------------+----------+-----------+---------+----------+----------+-----------
> postgres | 10 | t | t | t | t |
> ******** | |
> carlos | 16384 | t | t | t | t |
> ******** | |
> (2 rows)
>
> When I use my tab key in 'psql' after the 'FROM' statement, I'm
> presented with a ton of what I presume to be tables however when I
> check for tables in the 'postgres' database, I get nothing. I'm
> confused...
>
> Code:
>
> psql (9.1.1, server 9.1.1)
> You are now connected to database "postgres".
> postgres=# \d
> No relations found.
>
>
These objects are in the schema pg_catalog not public

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Fetter 2011-10-14 16:58:37 Re: exclusive OR possible within a where clause?
Previous Message Julien Rouhaud 2011-10-14 16:44:09 Re: Postgres Account Inherit Question