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

Automatic key generation on insert in query tool #8341

Open
Covarians opened this issue Jan 8, 2025 · 5 comments
Open

Automatic key generation on insert in query tool #8341

Covarians opened this issue Jan 8, 2025 · 5 comments
Labels

Comments

@Covarians
Copy link

When we use the view/edit data on a table with a primary key, in version 8.13 it was possible to insert a new row with the 'Add row' button and when saving pgadmin would generate the key automatically for that new row.

On version 8.14 this same action leads to an error.

I had to reverse down to 8.13 to be able to use PGAdmin

@Covarians Covarians added the Bug label Jan 8, 2025
@adityatoshniwal
Copy link
Contributor

@Covarians What is the error? Please share screenshots/screen recording.

@Covarians
Copy link
Author

cannot insert a non-DEFAULT value into column "station_id"
Column "station_id" is an identity column defined as GENERATED ALWAYS.
HINT: Use OVERRIDING SYSTEM VALUE to override.

@adityatoshniwal
Copy link
Contributor

cannot insert a non-DEFAULT value into column "station_id" Column "station_id" is an identity column defined as GENERATED ALWAYS. HINT: Use OVERRIDING SYSTEM VALUE to override.

Please share the table DDL.

@Covarians
Copy link
Author

-- Table:station

-- DROP TABLE IF EXISTS station;

CREATE TABLE IF NOT EXISTS station
(
station_id integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
serial_nr smallint NOT NULL,
config jsonb,
description text COLLATE pg_catalog."default",
name_short character(6)[] COLLATE pg_catalog."default",
config_name name COLLATE pg_catalog."C",
CONSTRAINT station_pkey PRIMARY KEY (station_id)
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS station
OWNER to postgres;

@adityatoshniwal
Copy link
Contributor

I'm able to reproduce this, looks like a special case.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants