Exporting a table that has a TEXT[] column to SQL creates an invalid SQL insert query
See original GitHub issueSystem information:
- Operating system (distribution) and version
- Windows 10
- DBeaver version
- 7.2.0
- Additional extensions
- None
Connection specification:
- Database name and version
- PostgreSQL 12.4
- Driver name
- PostgreSQL standard driver
- Do you use tunnels or proxies (SSH, SOCKS, etc)?
- No
Describe the problem you’re observing:
I tried exporting a table to SQL, and executing the query to insert into another database. The query failed because the array values were malformed.
Steps to reproduce, if exist:
- Create a SQL table that has at least 1 column of type TEXT[].
- Populate the table with data.
- Right click on the table in the Database Navigator, and click Export Data.
- Select SQL.
- Hit Next until getting to the Output page
- Select “Copy to clipboard”
- Paste the copied query into a
psql
prompt
Include any warning/errors/backtraces from the logs
ERROR: malformed array literal: <the array value here>
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
INSERT INTO SELECT statement overview and examples
This article covers the INSERT INTO SELECT statement along with its syntax, examples and use cases.
Read more >Common Issues with the SQL Server Import and Export Wizard
When importing or exporting data using a query, the VARCHAR data type is incorrectly recognised as a '200' data type and the NVARCHAR...
Read more >INSERT (Transact-SQL) - SQL Server - Microsoft Learn
You can use INSERT INTO <target_table> SELECT <columns> FROM <source_table> to efficiently transfer a large number of rows from one table, such ...
Read more >Bulk load data conversion error (type mismatch or invalid ...
Try using a format file since your data file only has 4 columns. Otherwise, try OPENROWSET or use a staging table. myTestFormatFiles.Fmt may...
Read more >MySQL INSERT IGNORE Statement Explained By Examples
When you use the INSERT statement to add multiple rows to a table and if an error occurs during the processing, MySQL terminates...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We must put string literals in double quotes in INSERT queries. Fixed
verified