Thread: Tables view?

Tables view?

From
"Walker, Jed S"
Date:

I have a need to select out all tables that are not temporary. Currently I'm pulling this from pg_class but I can't find a way to identify temporary tables. I found the "tables" view listed in the documentation but when I do "select * from tables" as the user that owns the tables I'm interested in, I get "relation "tables" does not exist". I also get this when logged in as postgres.

What do I need to do to see this table, or select only permanent tables from pg_class?

Thanks,

Jed.

Re: Tables view?

From
Tom Lane
Date:
"Walker, Jed S" <IMCEAEX-_O=COMCAST_OU=WEST+20DIVISION_CN=RECIPIENTS_CN=JWALKE1078E@cable.comcast.com> writes:
> I have a need to select out all tables that are not temporary.

Basically, you ignore the ones that are in schemas named "pg_temp_NNN".

            regards, tom lane