Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

[Bug] PostgreSQL - SHOW CREATE TABLE

manyou07's profile image manyou07 posted 6 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 6 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.
manyou07's profile image manyou07 posted 6 years ago Permalink
Cool, thanks!
irabkina's profile image irabkina posted 6 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?
mlntn's profile image mlntn posted 6 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.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.