CUBRID JIRA Issue Tracker

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • CUBRID Tools
  • TOOLS-140

Cannot set PK name

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: CM8.4.0
  • Fix Version/s: CM8.4.1.201206, CQB8.4.1.201206
  • Component/s: CUBRID Manager
  • Labels:
    • 201206
    • issue
  • Environment:

    Ubuntu

Description

Textbox "PK Name" is not editable when setting a primary key.

Screen:
Set Primary Key

Steps:
1. Right click the table name in "Hosts" tab
2. Click "Edit table"
3. Click "PK" button

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. ctbl.PNG
    80 kB
    11/Apr/12 11:03 PM

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Isaiah Choe added a comment - 03/Oct/11 8:20 AM

If you modify a colum name with a primary key and auto increment attribute on a table, it is not a bug but a specification. Thanks.

Show
Isaiah Choe added a comment - 03/Oct/11 8:20 AM If you modify a colum name with a primary key and auto increment attribute on a table, it is not a bug but a specification. Thanks.
Hide
Permalink
Esen Sagynov added a comment - 06/Oct/11 4:05 AM

The idea is, when you visually choose a column and set it as a PK column, CM automatically assigns this constraint name such as pk_tablename_columnname. This is to avoid duplicate names for constraints, though they are allowed. In other words, CM doesn't want a user to care about the name of the PK.

However, since we can manually add/alter PK names in plain SQL statement, we should likewise be able to set/change the PK name to any desired name in visual editor. It has to be added to TO-DO list for CM. For example, I can set whatever name I want like:

CREATE TABLE "athlete2"(
"code" integer AUTO_INCREMENT(16693,1),
"name" character varying(40) NOT NULL,
CONSTRAINT pk_my_own_name PRIMARY KEY("code")
);

CREATE TABLE "athlete3"(
"code" integer AUTO_INCREMENT(16693,1),
"name" character varying(40) NOT NULL,
CONSTRAINT pk_my_own_name PRIMARY KEY("code")
);

Notice that we can create two tables with the same PK constraint name. Why CM doesn't allow it in visual table editor?

Show
Esen Sagynov added a comment - 06/Oct/11 4:05 AM The idea is, when you visually choose a column and set it as a PK column, CM automatically assigns this constraint name such as pk_tablename_columnname . This is to avoid duplicate names for constraints, though they are allowed. In other words, CM doesn't want a user to care about the name of the PK. However, since we can manually add/alter PK names in plain SQL statement, we should likewise be able to set/change the PK name to any desired name in visual editor. It has to be added to TO-DO list for CM. For example, I can set whatever name I want like: CREATE TABLE "athlete2"( "code" integer AUTO_INCREMENT(16693,1), "name" character varying(40) NOT NULL, CONSTRAINT pk_my_own_name PRIMARY KEY("code") ); CREATE TABLE "athlete3"( "code" integer AUTO_INCREMENT(16693,1), "name" character varying(40) NOT NULL, CONSTRAINT pk_my_own_name PRIMARY KEY("code") ); Notice that we can create two tables with the same PK constraint name. Why CM doesn't allow it in visual table editor?
Hide
Permalink
Isaiah Choe added a comment - 06/Oct/11 5:17 AM

I'll review your issue. Thanks~

Show
Isaiah Choe added a comment - 06/Oct/11 5:17 AM I'll review your issue. Thanks~
Hide
Permalink
Isaiah Choe added a comment - 07/Oct/11 10:18 AM

I think that this issue is not a contstraint name but an AUTO_INCREMENT statement.

The following SQL is with AUTO_INCREMENT statement.

CREATE TABLE "athlete2"(
"code" integer AUTO_INCREMENT(16693,1),
"name" character varying(40) NOT NULL,
CONSTRAINT pk_my_own_name PRIMARY KEY("code")
);

alter table athlete2 rename column code as code2;

We got a error message(UPDATE authorization failure.) when we execute above alter table SQL in Query Editor.

The following SQL is without AUTO_INCREMENT statement.

CREATE TABLE "athlete4"(
"code" integer,
"name" character varying(40) NOT NULL,
CONSTRAINT pk_my_own_name PRIMARY KEY("code")
);

alter table athlete4 rename column code as code2;

But, we got no error message when we also execute above SQL.

Therefore, we thought that this issue is about AUTO_INCREMENT statement.

Thanks.

Show
Isaiah Choe added a comment - 07/Oct/11 10:18 AM I think that this issue is not a contstraint name but an AUTO_INCREMENT statement. The following SQL is with AUTO_INCREMENT statement. CREATE TABLE "athlete2"( "code" integer AUTO_INCREMENT(16693,1), "name" character varying(40) NOT NULL, CONSTRAINT pk_my_own_name PRIMARY KEY("code") ); alter table athlete2 rename column code as code2; We got a error message(UPDATE authorization failure.) when we execute above alter table SQL in Query Editor. The following SQL is without AUTO_INCREMENT statement. CREATE TABLE "athlete4"( "code" integer, "name" character varying(40) NOT NULL, CONSTRAINT pk_my_own_name PRIMARY KEY("code") ); alter table athlete4 rename column code as code2; But, we got no error message when we also execute above SQL. Therefore, we thought that this issue is about AUTO_INCREMENT statement. Thanks.
Hide
Permalink
Esen Sagynov added a comment - 09/Oct/11 9:06 PM

This issue is not about being able to change the column name, but PK name. CM does not allow to set or change the PK CONSTRAINT name. We don't need to deal with AUTO INCREMENT column, just need to be able to set our own name for PK constraint. Please consider this.

Show
Esen Sagynov added a comment - 09/Oct/11 9:06 PM This issue is not about being able to change the column name, but PK name. CM does not allow to set or change the PK CONSTRAINT name. We don't need to deal with AUTO INCREMENT column, just need to be able to set our own name for PK constraint. Please consider this.
Hide
Permalink
Isaiah Choe added a comment - 09/Oct/11 9:21 PM

I got mixed up.
I finally know that this issue is about changing with PK name.
I'll review this issue.
Thanks.

Show
Isaiah Choe added a comment - 09/Oct/11 9:21 PM I got mixed up. I finally know that this issue is about changing with PK name. I'll review this issue. Thanks.
Hide
Permalink
Isaiah Choe added a comment - 11/Apr/12 11:05 PM

1.
테이블 생성시 PK name을 입력할 수 없는데,
유저가 입력할 수 있도록 하고,
입력하지 않고 OK를 누르면,
현재와 동일하게 자동으로 중복되지 않는 이름으로 생성해준다.

2.
테이블 생성을 하지 않은 상태에서
다시 PK를 수정할 경우 이름을 직접 변경할 수 있도록 해야 한다.

Show
Isaiah Choe added a comment - 11/Apr/12 11:05 PM 1. 테이블 생성시 PK name을 입력할 수 없는데, 유저가 입력할 수 있도록 하고, 입력하지 않고 OK를 누르면, 현재와 동일하게 자동으로 중복되지 않는 이름으로 생성해준다. 2. 테이블 생성을 하지 않은 상태에서 다시 PK를 수정할 경우 이름을 직접 변경할 수 있도록 해야 한다.
Hide
Permalink
Li Ling added a comment - 26/Jun/12 11:18 PM

1.
生成table时 无法输入PK name,
请改成用户能够输入的形式
若不输入名称直接点击OK,
则与现在一样用一个不重复的名称生成。

2.
在未生成table的状态下
重新修改PK时 要可以对名称进行修改。

Show
Li Ling added a comment - 26/Jun/12 11:18 PM 1. 生成table时 无法输入PK name, 请改成用户能够输入的形式 若不输入名称直接点击OK, 则与现在一样用一个不重复的名称生成。 2. 在未生成table的状态下 重新修改PK时 要可以对名称进行修改。
Hide
Permalink
高艳铭 added a comment - 03/Jul/12 8:01 AM

Fixed in CM8.4.1.2201 and CQB8.4.1.2201

Show
高艳铭 added a comment - 03/Jul/12 8:01 AM Fixed in CM8.4.1.2201 and CQB8.4.1.2201

People

  • Assignee:
    高艳铭
    Reporter:
    Claudia Dumitrascu
Vote (0)
Watch (4)

Dates

  • Created:
    09/Sep/11 6:12 PM
    Updated:
    03/Jul/12 8:01 AM
    Resolved:
    27/Jun/12 11:27 PM
  • Atlassian JIRA (v5.1.3#782-sha1:4389c89)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for CUBRID. Try JIRA - bug tracking software for your team.