I'm using UUID for the primary key column in a table like this:
Code: Select all
CREATE TABLE csk.ckind
(
ckind_id uuid NOT NULL DEFAULT uuid_generate_v4(),
name text NOT NULL,
CONSTRAINT pk_ckind PRIMARY KEY (ckind_id)
)
The problem is that the function is in the "default" schema whereas the table is in the "coating_specs_kunden" schema.
When I try to add a row using TPgTable / TPgQuery it does not work.
With default settings the database complains that the "ckind_id" field must have a value.
With "Options.DefaultValues := True" the TPgTable complains with "function uuid_generate_v4() does not exist.".
Furthermore this also leads to an assertion failure later: "Exception EAssertionFailed in Modul Project1.exe bei 0017CA63.
TCompressedBlob.Free RefCount = 0 (D:\Projects\Delphi\Dac\Common\Source\MemData.pas, Zeile 8512)."
Any ideas?