The postgresql table column has no comments

wukon's profile image wukon posted 3 years ago in Installation Permalink

i create table with comment,but i can't see comment in heidisql

Revision 9.4.0.5146

fleduc's profile image fleduc posted 2 years ago Permalink

Yes, I have the same problem on rev 9.4.0.5173(64bit). When you look in Create code tab I see:

... COMMENT ON COLUMN "res_country_state"."code" IS E''; ...

In this example, [E''] is supposed to be ['State Code']

If I open this table with pgAdminIII, I can see the comment

Thanks

mavar's profile image mavar posted 2 weeks ago Permalink

The problem unfortunately persist in rev 10.2.0.5678 also. Do you plan to fix it? Thanks for your job

ansgar's profile image ansgar posted 2 weeks ago Permalink

This is issue #62. I am going to check the cause of it.

ansgar's profile image ansgar posted 2 weeks ago Permalink

I just refactored the string escaping logic for Postgres mode, so this should be fixed.

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 in action here:

Description

And please shout if the above logic is wrong for some reason.

mavar's profile image mavar posted 2 weeks ago Permalink

Thank you very much for so fast reaction. Now the result looks much better. But some comments are still invisible. The problem can be connected with datatype timestamp. All comments on these lines (timestamp datatype) are still invisible. I tested this theory in this example:

Description

Result:

Description

ansgar's profile image ansgar posted 2 weeks ago Permalink

Could it be that TIMESTAMP data type was silently converted by the server to "TIMESTAMP WITHOUT TIMEZONE"? At least this was the case for me here. In that case I have to add such data types with spaces in their names.

ansgar's profile image ansgar posted 2 weeks ago Permalink

See the documentation for date/time types: https://www.postgresql.org/docs/current/datatype-datetime.html

mavar's profile image mavar posted 2 weeks ago Permalink

yeap, It can by a reason. I created this table:

Description

Next I checked datatypes directly in database:

Description

So datatype "timestamp without time zone" is used internaly, when I create table/column with only timestamp option....

ansgar's profile image ansgar posted 2 weeks ago Permalink

Should also be fixed in the next build.

Please post in ticket #62 for further stuff.

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