Heidisql: Syntax error when altering column name with HeidiSQL

Created on 3 Apr 2019  ·  3Comments  ·  Source: HeidiSQL/HeidiSQL

Steps to reproduce this issue

  1. Edit column name in HeidiSQL table view
  2. Press Save

Current behavior

Hello,

I am trying to alter the name of a column in a table in my PostgreSQL database by editing it in the HeidiSQL table tab. However when I press 'Save' a Syntax Error pops up. I am trying to alter the column name from "Capacity derating (%)" to "Capacity derating 0.5 - 1C (%)"

The automatic ALTER CODE made by my editing the column name is:

ALTER TABLE "Data"
ALTER COLUMN "Capacity derating 0.5-1C (%)" REAL NULL DEFAULT NULL;
COMMENT ON COLUMN "Half-cell extracted data"."Capacity derating 0.5-1C (;
;

This is the syntax error:

Screenshot (44)

Expected behavior

I thought this would be the SQL code needed to alter a column name:

ALTER TABLE "Data"
RENAME COLUMN "Capacity derating (%)" TO "Capacity derating 0.5 - 1C (%)";

Possible solution

I don't know if my column name is not allowed?

Environment

I'm using HeidiSQL version 10.1.0.5510 with PostgreSQL 11.

bug nettype-postgresql

Most helpful comment

Renaming a column should work now on PostgreSQL. Besides changing

  • data type
  • default expression
  • allow/disallow null

All 3 comments

This requires changes in a code area which did not touch for a long time. Have to make some spring-cleaning in November here :)

Renaming a column should work now on PostgreSQL. Besides changing

  • data type
  • default expression
  • allow/disallow null
Was this page helpful?
0 / 5 - 0 ratings