Skip to content
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

Column comments are not visible #62

Closed
halmai opened this issue Jan 1, 2018 · 3 comments

Comments

@halmai
Copy link

commented Jan 1, 2018

Expected behavior

If I add a comment to a table column then the comment is not shown in heidisql.

Current behavior

I want to see all the column comments, even if they are multiline comments.

Failure information (for bugs)

Steps to reproduce

Steps for reproducing the issue:

  1. I create a table:
CREATE TABLE x (v int);

I add a comment to the column:

COMMENT ON COLUMN x.v IS 'blah';
  1. The CREATE code shows empty comment in heidisql:
CREATE TABLE "x" (
	"vs" TEXT NULL DEFAULT NULL
)
;
COMMENT ON COLUMN "x"."vs" IS E'';

Context

Heidi build: 5201
postgres: PostgreSQL 10.1, compiled by Visual C++ build 1800, 64-bit
Win7 Pro SP 1

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Oct 3, 2019

Related change from 2014, not yet touched again: 3d29d13

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Oct 3, 2019

Issue is caused by quoted strings being prepended by an E, see https://www.heidisql.com/forum.php?t=18657 for the reason.

@ansgarbecker ansgarbecker added this to the v10.3 milestone Oct 3, 2019
ansgarbecker added a commit that referenced this issue Oct 3, 2019
…write text with escaped joker chars. So we just escape %, _ and ' now in Postgres mode.
@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Oct 3, 2019

So the next build does not use that E prefix for strings any longer. This was anyway error prone from the beginning, and required several workarounds in the code which I also removed now. Instead, HeidiSQL now escapes less than before, as follows:

  • ' => ''
  • for LIKE strings:
    • % => \%
    • _ => \_

For these 2 backslash usages, PostgreSQL does not seem to require that E prefix.

See it here in action:

grafik

ansgarbecker added a commit that referenced this issue Oct 5, 2019
…TZ (with time zone). And modify GetDatatypeByName() so it deletes the longest detected datatype string PostgreSQLDatatypes.Names . This solves empty/undetected column comments in ParseTableStructure(). See https://www.heidisql.com/forum.php?t=23211#p34709
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.