GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — "Export Data Using Query" query is not accepting multiple lines · Issue #8809 · pgadmin-org/pgadmin4

"Export Data Using Query" query is not accepting multiple lines #8809

New issue
Copy link
New issue
Copy link
Closed
Closed
"Export Data Using Query" query is not accepting multiple lines#8809
Copy link
Assignees
RohitBhati8269
Labels
Bug
Milestone
9.5

Description

@cemahseri
cemahseri
opened on May 30, 2025
Issue body actions

Describe the bug
"Export Data Query" is not accepting queries with multiple lines.
Error message retrieved from Processes tab says;

\copy: parse error at end of line

To Reproduce
Steps to reproduce the behavior:

  1. Right click to database
  2. Click on "Export Data Using Query..."
  3. Navigate to "Query" tab
  4. Enter an example query with multiple lines to "Export Data Query" textbox (sample given below)
  5. Click OK
  6. ???
  7. Profit
    Example query;
select name
from tablebaz
limit 31

Expected behavior
¿Export the data?

Error message
\copy: parse error at end of line

Desktop (please complete the following information):

  • OS: Windows 11
  • Version: 24H2, 26100.4061
  • Mode: Desktop

Additional context
Exact same query works if I remove all the new line characters and shrink it down to a single line query.
I've take a look at the source code and I think the new lines aren't handled.
Perhaps the problem can be solved by removing new line characters in the "query" by adding onSave property to the dialogProps and sanitizing the new lines;

pgadmin4/web/pgadmin/tools/import_export/static/js/import_export.js

Line 184 in 3286b4e

{ schema, extraData, urlBase, sqlHelpUrl, helpUrl, actionType: 'select', saveBtnName: gettext('OK'),

Activity

  1. cemahseri
    added
    Bug
    on May 30, 2025
  2. akshay-joshi
    added this to Not Refinedon May 30, 2025
  3. akshay-joshi
    self-assigned this
    on Jun 4, 2025
  4. akshay-joshi
    added
    EDB Sprint 195
    on Jun 4, 2025
  5. akshay-joshi
    added this to Current Sprint (213) and removed this from Not Refinedon Jun 4, 2025
  6. akshay-joshi
    moved this to 🆕 New in Current Sprint (213)on Jun 4, 2025
  7. akshay-joshi
    moved this from 🆕 New to 🏗 In Progress in Current Sprint (213)on Jun 5, 2025
  8. akshay-joshi
    added this to the 9.5 milestone on Jun 5, 2025
  9. akshay-joshi
    added a commit that references this issue on Jun 5, 2025

    Fixed an issue where data export using a query failed when the query …

    4565318
  10. akshay-joshi
    moved this from 🏗 In Progress to In Testing in Current Sprint (213)on Jun 5, 2025
  11. akshay-joshi
    assigned
    RohitBhati8269
    and unassigned
    akshay-joshi
    on Jun 5, 2025
  12. akshay-joshi
    added
    EDB Sprint 196
    and removed
    EDB Sprint 195
    on Jun 17, 2025
  13. RohitBhati8269 commented on Jun 18, 2025

    @RohitBhati8269
    RohitBhati8269
    on Jun 18, 2025
    Contributor
    More actions

    Tested and verified on snapshot build: https://www.postgresql.org/ftp/pgadmin/pgadmin4/snapshots/2025-06-18/
    Package: exe
    Environment: Windows 10

  14. RohitBhati8269
    closed this as completedon Jun 18, 2025
  15. RohitBhati8269
    moved this from In Testing to ✅ Done in Current Sprint (213)on Jun 18, 2025
  16. akshay-joshi
    removed this from Current Sprint (213)on Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @RohitBhati8269
    RohitBhati8269

Labels

Bug

Type

No type

Projects

No projects

    Milestone

    • 9.5

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.