-
Notifications
You must be signed in to change notification settings - Fork 933
[Postgresql] Export returns empty when schema name is not added to table name in query #17178
Copy link
Copy link
Closed
Description
Provide the Bytebase version you are using
3.6.0
Describe the bug
When running a query in Bytebase without explicitly including the schema name before the table in PostgreSQL, it will return the query result but the export function returns an empty file. However, if the schema name is included in the query, the export works correctly and returns the expected data.
Steps to reproduce
Without Schema name added to table
- Write a query without adding schema name to the table.
- Run the query
- Returns query result
- Click on Export button to export to CSV. Empty result will be exported.
With Schema name added to table - Write a query adding schema name to the table.
- Run the query
- Returns query result
- Click on Export button to export to CSV. Query result will be exported.
Expected behavior
Export should return the query results even if the schema name is omitted, as long as the query runs successfully in the UI.
Provide the database you are using
Postgresql 16
Additional context
This behavior appears to be PostgreSQL-specific and may be related to how the export function handles default schema resolution.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels