Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cemahseri opened this issue May 30, 2025 · 0 comments
Open

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

cemahseri opened this issue May 30, 2025 · 0 comments
Assignees
Milestone

Comments

@cemahseri
Copy link

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;

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

@cemahseri cemahseri added the Bug label May 30, 2025
@akshay-joshi akshay-joshi self-assigned this Jun 4, 2025
@akshay-joshi akshay-joshi moved this to 🆕 New in Current Sprint (195) Jun 4, 2025
@akshay-joshi akshay-joshi moved this from 🆕 New to 🏗 In Progress in Current Sprint (195) Jun 5, 2025
@akshay-joshi akshay-joshi added this to the 9.5 milestone Jun 5, 2025
akshay-joshi added a commit that referenced this issue Jun 5, 2025
@akshay-joshi akshay-joshi moved this from 🏗 In Progress to In Testing in Current Sprint (195) Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Testing
Development

No branches or pull requests

3 participants