Subscribe to this thread
Home - General / All posts - M9 and Postgres: updating not null columns
mlinth
445 post(s)
#11-Mar-21 09:50

Good morning,

I ran into this issue with a linked Postgres table. The table is quite simple, it has a primary key and a boolean column with a not-null constraint (and a default value).

If I try to update this column in Manifold 9.0.193, either through the GUI or with an update statement, I get this error in the database log:

ERROR: null value in column "mycolumn" of relation "mytable" violates not-null constraint

DETAIL: Failing row contains (1, null).

STATEMENT: UPDATE "public"."mytable" SET "mycolumn"=$1 WHERE "id"=$2

This happens whether I connect as superuser, or a different account.

It looks like Manifold is attempting to set the column to null first, which fails.

Am I doing something wrong? Can I do this differently?

I know I can write a native SQL query, but sometimes it's nice just to edit a field interactively.

Thanks,

Martin

Dimitri


6,560 post(s)
#11-Mar-21 12:50

I know I can write a native SQL query, but sometimes it's nice just to edit a field interactively.

You should be able to do that, of course. I'd report it to tech support.

mlinth
445 post(s)
#11-Mar-21 19:47

Thanks Dimitri,

I sent a report in.

Regards,

M

adamw


9,588 post(s)
#29-Mar-21 15:22

Just in case, this is a bug in our code. We will fix it.

Thanks for reporting the issue!

Manifold User Community Use Agreement Copyright (C) 2007-2019 Manifold Software Limited. All rights reserved.