Getting Table Names in a Particular Database - Mailing list pgsql-general

From Adarsh Sharma
Subject Getting Table Names in a Particular Database
Date
Msg-id 4E5DC61F.7030107@orkash.com
Whole thread Raw
Responses Re: Getting Table Names in a Particular Database  (Scott Marlowe <scott.marlowe@gmail.com>)
Re: Getting Table Names in a Particular Database  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
Dear all,

Today I am researching about fetching all the table names in a particular database.
There is \dt command but I need to fetch it from metadata.
I find some commands as below :

1. SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';

2.
SELECT tablename FROM pg_tables WHERE tablename NOT LIKE ‘pg%’ AND tablename NOT LIKE ‘sql%’.

But I need to specify a particular database & then fetch tables in that.


Thanks

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: heavy swapping, not sure why
Next
From: Scott Marlowe
Date:
Subject: Re: Getting Table Names in a Particular Database