Postico icon indicating copy to clipboard operation
Postico copied to clipboard

Export using SQL insert

Open xarg opened this issue 10 years ago • 55 comments
trafficstars

Would be great to be able to export a table using SQL inserts. Right now only CSV seems to be available. Copy Special is great, but works only for the selected rows, not for whole tables.

Or if SQL inserts are hard to implement, perhaps just importing CSV would be nice. How I do it now: COPY table FROM 'xxxx.csv' DELIMITER ',' CSV;

xarg avatar Jul 24 '15 07:07 xarg

~~+1 preventing me from buying the full version~~

eightyfive avatar Aug 27 '15 15:08 eightyfive

+1

adi- avatar Sep 02 '15 09:09 adi-

+1

trapias avatar Sep 22 '15 21:09 trapias

pg_dump -U username -d databasename > outputfile.sql

eightyfive avatar Sep 23 '15 03:09 eightyfive

+1 @jakob you should consider using https://www.bountysource.com/ for crowd funding feature requests like these.

astewart-twist avatar Dec 03 '15 21:12 astewart-twist

@astewart-twist: This is not an OS project so I don't think @jakob can use bountysource (maybe other similar platforms exist?) (https://github.com/bountysource/core/wiki/Frequently-Asked-Questions).

I hope I'm not going too off-topic but, I would say the best way to support the development is to buy the app or recommending it. Since I bought the app already I'm just gonna recommend it: https://twitter.com/humanfromearth/status/672559977446416385

I encourage you to do the same!

xarg avatar Dec 03 '15 23:12 xarg

I also purchased the product and wanted to add that I also would like to see an SQL export feature. There are certain instances where I do not have access to pgdump and therefore the ability to do some from Postico would be great. I would pay extra to have had this feature had I known it was not native in the app. Love the product, just wish it was more complete.

ncolyer avatar Dec 04 '15 18:12 ncolyer

I have a short question for everyone: would it be useful if I implemented a feature to just export the data as INSERT statements (like the copy special command), rather than creating a full SQL dump like pg_dump does? Exporting just the data would be much easier to implement than creating a full SQL dump.

jakob avatar Dec 04 '15 19:12 jakob

For me INSERT statements are more than enough.

xarg avatar Dec 04 '15 19:12 xarg

I concur.

Nicholas Colyer

On Dec 4, 2015, at 2:12 PM, Alex Plugaru [email protected] wrote:

For me INSERT statements are more than enough.

— Reply to this email directly or view it on GitHub.

ncolyer avatar Dec 04 '15 19:12 ncolyer

I also agree INSERTs are enough. I mean definitely much better than nothing!

On Sat, Dec 5, 2015 at 2:16 AM, Nicholas Colyer [email protected] wrote:

I concur. Nicholas Colyer

On Dec 4, 2015, at 2:12 PM, Alex Plugaru [email protected] wrote:

For me INSERT statements are more than enough.

— Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub: https://github.com/jakob/Postico/issues/36#issuecomment-162057103

eightyfive avatar Dec 05 '15 02:12 eightyfive

+1 for this feature. I also purchased the product and wanted to add SQL export feature into it.

g3d avatar Jan 16 '16 13:01 g3d

+1 for import / export of sql.

jacobbullock avatar Apr 23 '16 23:04 jacobbullock

+1

Pankraz76 avatar Jun 02 '16 14:06 Pankraz76

+1, really hope this feature can be implemented.

cupnoodle avatar Sep 11 '16 15:09 cupnoodle

+1 for import / export of sql.

rexzhang avatar Oct 16 '16 04:10 rexzhang

+1

jbreuer95 avatar Jan 11 '17 11:01 jbreuer95

+1

francoisbruneau avatar Jan 19 '17 09:01 francoisbruneau

While having MacBook Pro Touchbar support #311 is cool, I'm really disappointed seeing it done while an issue like the current one or more importantly #82 have almost 2 years since are reported and nothing was done about it so far. @jakob can you give us an update on this? What's happening?

xarg avatar Jan 20 '17 22:01 xarg

@xarg I'm sorry to hear you're not happy with the pace of development.

I try to prioritise features according to the impact they have versus the amount of effort required. Touch Bar is high impact & low effort, so it was a great first task for Chris, who is just getting started with Postico development.

Adding SQL export is a bit more effort, even though most of the parts are already there. Considering how many people support this issue, it was probably a mistake to delay this so long, and I should have started sooner. I'll see what I can do.

Currently I'm finalising the graphical index editor (#19) and trying to get the 1.1 update with lots of bug fixes out the door, but that release is blocked by an issue with Core Graphics on macOS 10.10 that I still need to work around. Meanwhile, Chris has started to work on CSV import (#68).

jakob avatar Jan 21 '17 11:01 jakob

Thanks for your detailed reply @jakob. I appreciate it.

xarg avatar Jan 23 '17 16:01 xarg

+1

atMari avatar Feb 03 '17 00:02 atMari

+ 1

rensverschuren avatar Apr 11 '17 14:04 rensverschuren

+1

billyshena avatar May 23 '17 16:05 billyshena

+1

schuon avatar Jul 14 '17 10:07 schuon

+1

lloydh avatar Aug 18 '17 14:08 lloydh

+1

tobyhinloopen avatar Aug 23 '17 09:08 tobyhinloopen

+1 - very disappointed that this feature is not available. I bought Postico, thinking about using an alternative package. Other than that, great tool!

cokron avatar Nov 02 '17 16:11 cokron

+1

terehov avatar Jan 03 '18 04:01 terehov

+1

ctoLarsson avatar Jan 03 '18 11:01 ctoLarsson

+1

bingimar avatar Feb 05 '18 11:02 bingimar

+1

jidesakin avatar Mar 05 '18 13:03 jidesakin

+1 It is more than 2 years already.

andrewjaanuu avatar Mar 06 '18 00:03 andrewjaanuu

+1 just want sql inserts, nothing fancy.

thorntonjohn avatar Mar 21 '18 16:03 thorntonjohn

+1

kidbrax avatar May 03 '18 17:05 kidbrax

+1

rouralberto avatar Jul 05 '18 04:07 rouralberto

+1

pyrat avatar Aug 08 '18 08:08 pyrat

+1

jjhesk avatar Aug 17 '18 13:08 jjhesk

+1 :)

bed42 avatar Nov 02 '18 07:11 bed42

👍

Jaspur avatar Mar 15 '19 09:03 Jaspur

+1

FedeGens avatar Apr 16 '19 10:04 FedeGens

+1

pwm avatar May 31 '19 09:05 pwm

+1

aazcast avatar Aug 02 '19 17:08 aazcast

+1

stevenleeg avatar Sep 06 '19 22:09 stevenleeg

Oh how nice would it be to be able to dump the entire database into a file!

striveforbest avatar Sep 26 '19 18:09 striveforbest

+1 for sql inserts

karam-nus avatar Oct 15 '19 09:10 karam-nus

  • 1

andresilvagomez avatar Nov 07 '19 16:11 andresilvagomez

+1

leobenkel avatar Jul 30 '20 04:07 leobenkel

+1

devglrd avatar Aug 16 '20 17:08 devglrd

+1

juliofalbo avatar Sep 24 '20 13:09 juliofalbo

+1 :) That is the last thing preventing me from buying it :)

barttenbrinke avatar Oct 20 '20 07:10 barttenbrinke

+1

isavita avatar Apr 09 '21 08:04 isavita

Since we keep getting requests for this feature, I would like to ask for some feedback.

  1. Do you really want to just export INSERT statements to a file, or do you want full dumps (including CREATE TABLE statements etc)
  2. Can you explain how you would use this feature in a few sentences?
  3. Is using CSV Export / Import a possible alternative?

Background: Most people who contact us via email with similar feature requests want a way to create full dumps (like pg_dump creates). These full dumps would contain both CREATE TABLE statements and INSERT statements. Implementing this feature would be a major undertaking and something that we just do not have the capacity for. Also, there's already pg_dump which does exactly what people want, so I don't see a strong argument for adding this feature to Postico. It would be convenient to have it built in, but it wouldn't really allow new workflows that currently aren't possible.

For us this feature currently doesn't have a high priority, but maybe we are missing some important scenarios how this feature would be useful, so please let us know how you would use this feature!

jakob avatar Apr 09 '21 09:04 jakob

Maybe you can take a look at Sequal Pro; there is a Export > As SQL dump option which works good. This makes it more easy to transfer database with a GUI like Postico.

Gr., Jasper On 9 Apr 2021, 11:53 +0200, Jakob Egger @.***>, wrote:

Since we keep getting requests for this feature, I would like to ask for some feedback.

  1. Do you really want to just export INSERT statements to a file, or do you want full dumps (including CREATE TABLE statements etc)
  2. Can you explain how you would use this feature in a few sentences?
  3. Is using CSV Export / Import a possible alternative?

Background: Most people who contact us via email with similar feature requests want a way to create full dumps (like pg_dump creates). These full dumps would contain both CREATE TABLE statements and INSERT statements. Implementing this feature would be a major undertaking and something that we just do not have the capacity for. Also, there's already pg_dump which does exactly what people want, so I don't see a strong argument for adding this feature to Postico. It would be convenient to have it built in, but it wouldn't really allow new workflows that currently aren't possible. For us this feature currently doesn't have a high priority, but maybe we are missing some important scenarios how this feature would be useful, so please let us know how you would use this feature! — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Jaspur avatar Apr 09 '21 09:04 Jaspur

  1. Do you really want to just export INSERT statements to a file, or do you want full dumps (including CREATE TABLE statements etc)

Basically I'd want both:

  • CREATE TABLE + INSERTS (full copy)
  • only INSERTs (data dump) (--data-only)
  • only CREATE TABLEs (structure dump) (--schema-only)
  1. Can you explain how you would use this feature in a few sentences?

I would use it to:

  • copy and sync database schemas and data between databases
  • import SQL dumps i've received elsewhere
  • share SQL dumps with other people
  1. Is using CSV Export / Import a possible alternative?

Also a nice feature, but for me it wouldn't.

tobyhinloopen avatar Apr 09 '21 10:04 tobyhinloopen