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

Syntax error when altering column name with HeidiSQL #595

Closed
naoma123 opened this issue Apr 3, 2019 · 3 comments
Closed

Syntax error when altering column name with HeidiSQL #595

naoma123 opened this issue Apr 3, 2019 · 3 comments

Comments

@naoma123
Copy link

naoma123 commented Apr 3, 2019

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.

@naoma123 naoma123 changed the title Syntax error when altering column name Syntax error when altering column name with HeidiSQL Apr 3, 2019
@lambdaupb
Copy link

@ansgarbecker
Copy link
Collaborator

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

@ansgarbecker ansgarbecker pinned this issue Nov 22, 2019
@ansgarbecker
Copy link
Collaborator

Renaming a column should work now on PostgreSQL. Besides changing

  • data type
  • default expression
  • allow/disallow null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants