[Bug] PostgreSQL - SHOW CREATE TABLE

[expired user #9074]'s profile image [expired user #9074] posted 9 years ago in Import/Export Permalink
Hello. I noticed an error in the logs as I was attempting to import a CSV file (which also had errors that I'll submit in a separate ticket.) The log shows that every time I open the Import CSV dialog, Heidi runs the following command, which throws the following error:

SHOW CREATE DATABASE "public";
/* ERROR:  syntax error at or near "CREATE"
LINE 1: SHOW CREATE DATABASE "public"
^ */


"Public", btw, is the name of the schema I'm working in.

Looks like this command works for MySQL but not Postgres, and from some quick Google searching, not sure an equivalent command works for Postgres. I'm also not sure what its purpose is here for the Import dialog.

Let me know if you have any followups.
ansgar's profile image ansgar posted 9 years ago Permalink
This error should not appear any more since r4977. The purpose of the SHOW CREATE DATABASE query was to find the default character set of the selected database, so the "Server parses file contents" puts that into the resulting LOAD DATA command. That server method is not selectable any longer with PostgreSQL.
[expired user #9074]'s profile image [expired user #9074] posted 9 years ago Permalink
Cool, thanks!
[expired user #9145]'s profile image [expired user #9145] posted 9 years ago Permalink
Hello. I am seeing this error when attempting to export a Postgres database. Should/can this fix be applied there as well?
[expired user #9479]'s profile image [expired user #9479] posted 8 years ago Permalink

I'm having this same issue when exporting. I'm using version r5025. I am trying to export from PostgreSQL 9.4.4. Any suggestions?

Please login to leave a reply, or register at first.