sosedoff / pgweb

Cross-platform client for PostgreSQL databases
https://sosedoff.github.io/pgweb
MIT License
8.53k stars 724 forks source link

Added copy as insert and copy as update #658

Closed jonaz closed 5 months ago

jonaz commented 1 year ago

Fixes #649

jonaz commented 1 year ago

@sosedoff updated the commit with requested changes. Also make error when table is not selected. Could not find another way to figure out the table name.

jonaz commented 1 year ago

Ping @sosedoff ?

sosedoff commented 1 year ago

This looks good so far. One thing that may need to be addressed -- context menu does not work correctly when in query editor. Steps to reproduce:

  1. Refresh pgweb page
  2. Go to sql editor and run a query that returns some results
  3. Right click on one of the rows - select copy as insert (will complain about table, thats expected)
  4. Click on any table in the sidebar, it should render its contents
  5. Navigate back to the sql editor, run the existing query again.
  6. Right click on one of the rows - it will incorrectly copy insert statement using previously selected tables.

Id suggest we disable the context menu options on sql query results page.

a-patos commented 8 months ago

Hello, is there any hope that MR will be successful one day or do we move on?

sosedoff commented 5 months ago

Closing for the time being. Im happy to revisit if OP is interested in continuing the work.

jonaz commented 5 months ago

Yes im interested @sosedoff

jonaz commented 4 months ago

New PR here https://github.com/sosedoff/pgweb/pull/730