Re: pgadmin III query

From: Dinesh Kumar <dinesh(dot)kumar(at)enterprisedb(dot)com>
To: Peter Kroon <plakroon(at)gmail(dot)com>
Cc: Ian Lawrence Barwick <barwick(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pgadmin III query
Date: 2013-12-09 08:42:48
Message-ID: CAKWsr7hRRc4Kb8YE_O6Y37fpG7OXsUSPXKAFO6JJjeW9UVfoqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

On Fri, Dec 6, 2013 at 4:34 PM, Peter Kroon <plakroon(at)gmail(dot)com> wrote:

> Thanks, but i need a non command line option.
>
>
We can do this with a function which is having the sql queries of pgAdmin
raised against the database.

=> Log all the queries by enabling "log_minduration_statement=0".
=> Do SELECT pg_reload_conf();
=> Do a refresh on a table of pgAdmin's browser.
=> Get all the queries what it has performed.
=> Create a custom function with those queries.

Regards,
Dinesh

>
> 2013/12/6 Ian Lawrence Barwick <barwick(at)gmail(dot)com>
>
>> 2013/12/6 Peter Kroon <plakroon(at)gmail(dot)com>:
>> > When you click on a table in the "Object browser" you'll see in the "SQL
>> > pane" the sql that is needed to create that table.
>> >
>> > Which function can I call to get that SQL?
>>
>> You can use the pg_dump command line function for this:
>>
>> pg_dump -s -t name_of_table name_of_database
>>
>> Regards
>>
>> Ian Barwick
>>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joek Hondius 2013-12-09 10:39:06 network protocol and compatibility question
Previous Message Pavel Stehule 2013-12-08 19:56:48 Re: Set returning aggregate?