Re: Accessing SQL that has been executed behind the interface

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Wizz <mastuh8(at)gmail(dot)com>
Cc: pgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Accessing SQL that has been executed behind the interface
Date: 2015-12-01 12:53:18
Message-ID: CA+OCxoxEcr63rT7x0JPBLiVUvsvRc5rWy3ULFcfD_FeHYMBS_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi

On Tue, Dec 1, 2015 at 12:41 PM, Wizz <mastuh8(at)gmail(dot)com> wrote:
> How can I access the SQL that executes when I alter my tables with the
> pgAdmin interface.
> For instance, if I add a column, without a doubt, there was a "ALTER TABLE
> tablename ADD COLUMN column name int;" executed in the background. How do I
> get to it?
> I need to make a bunch of changes to a database and then have those changes
> in the form of SQL so I can pass it on to a colleague, who will execute it
> on an identical database.
> Thank you!

You can either:

- Turn up the log level to include SQL, and extract the statements
from the log (though that can be a pain as there's a lot of additional
stuff there), or;

- Click on the SQL tab on each dialogue you make changes in, before
you hit OK. That'll show you the SQL that will be executed by the
changes you've made in the dialogue.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Wizz 2015-12-01 12:57:31 Re: Accessing SQL that has been executed behind the interface
Previous Message Wizz 2015-12-01 12:41:27 Accessing SQL that has been executed behind the interface