Thread: How not to display system tables?

How not to display system tables?

From
Ennio-Sr
Date:
Hi all!
Reading from man psql I see that the \d used without a pattern argument
is equivalent to \dtvs which will display all pga_* tables along with
the 'pure' data tables.
Is there a way to change this behaviour (apart than using a SELECT
relname from pg_class WHERE relkind = ...).
I tried \d !~pga* to no avail ;(
Regards,
      Ennio.

--
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo.   \\?//
 Fa' qualche cosa di cui non sei capace!"  (diceva Henry Miller) ]    (°|°)
[Why use Win$ozz (I say) if ... "even a fool can do that.              )=(
 Do something you aren't good at!" (as Henry Miller used to say) ]

Re: How not to display system tables?

From
Tom Lane
Date:
Ennio-Sr <nasr.laili@tin.it> writes:
> Reading from man psql I see that the \d used without a pattern argument
> is equivalent to \dtvs which will display all pga_* tables along with
> the 'pure' data tables.
> Is there a way to change this behaviour (apart than using a SELECT
> relname from pg_class WHERE relkind = ...).

The pga_ tables are not system tables as far as Postgres is concerned.
IIRC they are created by some old versions of pgAdmin (or was it another
tool?)  If you move up to a more recent version you should be able to
get rid of them.

            regards, tom lane

Re: How not to display system tables?

From
Ennio-Sr
Date:
* Tom Lane <tgl@sss.pgh.pa.us> [090605, 16:33]:
> Ennio-Sr <nasr.laili@tin.it> writes:
> > ...
> The pga_ tables are not system tables as far as Postgres is concerned.
> IIRC they are created by some old versions of pgAdmin (or was it another
> tool?)  If you move up to a more recent version you should be able to
> get rid of them.
>
>             regards, tom lane

Hi Tom,
thanks for the quick answer. AAMOF I did try pgAdmin months ago (when I
was running pg 7.2). Now I'm using 7.4.7-6sarge1 version and
occasionally pgAccess. Might this one be responsible for that also?
Can I simply cancel those pga*'s?
Regards,
      Ennio.

--
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo.   \\?//
 Fa' qualche cosa di cui non sei capace!"  (diceva Henry Miller) ]    (°|°)
[Why use Win$ozz (I say) if ... "even a fool can do that.              )=(
 Do something you aren't good at!" (as Henry Miller used to say) ]

Re: How not to display system tables?

From
Tom Lane
Date:
Ennio-Sr <nasr.laili@tin.it> writes:
> thanks for the quick answer. AAMOF I did try pgAdmin months ago (when I
> was running pg 7.2). Now I'm using 7.4.7-6sarge1 version and
> occasionally pgAccess. Might this one be responsible for that also?
> Can I simply cancel those pga*'s?

Very possibly it's pgAccess that made them.  You could drop those tables
from psql and then see which tool recreates them when you start it ...

            regards, tom lane

Re: How not to display system tables?

From
Ennio-Sr
Date:
* Tom Lane <tgl@sss.pgh.pa.us> [090605, 18:03]:
> Ennio-Sr <nasr.laili@tin.it> writes:
> > thanks for the quick answer. AAMOF I did try pgAdmin months ago (when I
> > was running pg 7.2). Now I'm using 7.4.7-6sarge1 version and
> > occasionally pgAccess. Might this one be responsible for that also?
> > Can I simply cancel those pga*'s?
>
> Very possibly it's pgAccess that made them.  You could drop those tables
> from psql and then see which tool recreates them when you start it ...
>
>             regards, tom lane

I dropped the pga_* tables as suggested, started pgAccess, viewed some
tables on the various databases, closed pgAccess, went to psql mydb and
could see that no pga_* table had been created (for the time being :-)
); so the 'culprit' must have been pgAdmin. May be pgAccess is
responsible for creating some sql_* tables, however these are not listed
by the \d command.
Should I find out something differewnt in the future I'll advise the
list.
Thanks again, Tom.
Regards,
    Ennio.

--
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo.   \\?//
 Fa' qualche cosa di cui non sei capace!"  (diceva Henry Miller) ]    (°|°)
[Why use Win$ozz (I say) if ... "even a fool can do that.              )=(
 Do something you aren't good at!" (as Henry Miller used to say) ]