Start a new topic

Alter Table Add Column not null does not correctly work

When I want to add a not-nullable column, the dialog generates this output:

ALTER TABLE

"postgres"."public"."table" ADD COLUMN country CHARACTER VARYING(3);

ALTER TABLE

"postgres"."public"."table" ALTER COLUMN country SET NOT NULL;

ALTER TABLE

"postgres"."public"."table" ALTER COLUMN country SET DEFAULT 'GER'::CHARACTER VARYING


This "splitted statement" leads to an error because existing entries will have null values.

On the other hand. This statement would work:

 

ALTER TABLE

"postgres"."public"."table" ADD COLUMN country CHARACTER VARYING(3) NOT NULL DEFAULT 'GER'::CHARACTER VARYING


Is that already fixed in V12? I'm sStill on V11.


Stephan,


This is now fixed in DbVisualizer 13.0.1. https://www.dbvis.com/download/


Regards


Roger

Thanks for informing me. I already saw it, as we bought a license for 13 last week.

Login or Signup to post a comment