Thread: Exporting sql scripts in pgAdmin

Exporting sql scripts in pgAdmin

From
Lukasz Brodziak
Date:
Hi,

Following Dave Page's advice I'd like raise an idea for a feature that would allow users to export table rows as INSERT statements. The idea behind this feature is that we are not always able to use COPY TO/COPY FROM to move data between databases and generating and insert statement based on SELECT result is the answer. It could be an option in 'Execute to file' menu option something like "Export as INSERT script" that after checking would add INSERT INTO <table from select> (columns which we already export) VALUES(values we already export). As a future feature thare can be an option added to input the specific table name if the destination db has the same table defined under different name.
The feature is implemented in EMS SQL Manager for PostgreSQL but buying it just for this option is madness. Besides it's better to put new features into our favourite program than to support the competition :)

--
Łukasz Brodziak

Re: Exporting sql scripts in pgAdmin

From
Guillaume Lelarge
Date:
On Thu, 2013-01-24 at 11:45 +0100, Lukasz Brodziak wrote:
> Hi,
>
> Following Dave Page's advice I'd like raise an idea for a feature that
> would allow users to export table rows as INSERT statements. The idea
> behind this feature is that we are not always able to use COPY TO/COPY FROM
> to move data between databases and generating and insert statement based on
> SELECT result is the answer. It could be an option in 'Execute to file'
> menu option something like "Export as INSERT script" that after checking
> would add INSERT INTO <table from select> (columns which we already export)
> VALUES(values we already export). As a future feature thare can be an
> option added to input the specific table name if the destination db has the
> same table defined under different name.
> The feature is implemented in EMS SQL Manager for PostgreSQL but buying it
> just for this option is madness. Besides it's better to put new features
> into our favourite program than to support the competition :)
>

OK. I'm not sure you mean you want to work on this, or that you want us
to put this in our TODO list?


--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com