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
Labels
Milestone

Comments

@naoma123
Copy link

@naoma123 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

This comment has been minimized.

Copy link

@lambdaupb lambdaupb commented Aug 27, 2019

@ansgarbecker ansgarbecker added this to the v10.3 milestone Aug 28, 2019
@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

@ansgarbecker ansgarbecker commented Nov 19, 2019

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

This comment has been minimized.

Copy link
Collaborator

@ansgarbecker ansgarbecker commented Nov 24, 2019

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
3 participants
You can’t perform that action at this time.