Re: List of table names of a DB

Поиск
Список
Период
Сортировка
От Lukas Fittl
Тема Re: List of table names of a DB
Дата
Msg-id CAP53PkyXhBVJOzvs_Z4HKvRuFvfpcG5ZcHaVMozeJvw+Xe1bfA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: List of table names of a DB  (Deepak S <in.live.in@live.in>)
Список pgsql-hackers
On Fri, Jan 9, 2015 at 7:14 AM, Deepak S <in.live.in@live.in> wrote:
Sorry, it's not about querying. I am implementing an invalidation mechanism for Postgres Query Cache as part of my masters project. In order to this, I need to store details(like name) of each table the query uses. In essence, I need to store the table names of the cached queries. 

Initially, I thought of writing a code that could extract the table names but later discovered that it is a gargantuan task as I shall have to include around 600 production rules as was hinted in a Stackoverflow Exchange post. Hence, I thought of getting hold of the data structure used for storing table names of a DB but I couldn't get it. 
 
For prototyping you might also find https://github.com/pganalyze/pg_query useful.

Its a Ruby-based library that makes the Postgres parser easier to access from the outside, getting a list of tables from a query is trivial - but if you need the oids you'll have to do it like pgpool does.

(feel free to ping me off-list about this)

Best,

--
Lukas Fittl

Skype: lfittl
Phone: +43 6991 2770651

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pg_rewind in contrib
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Compression of full-page-writes