[Kea-users] insert into dhcp4_subnet
Matt Zagrabelny
mzagrabe at d.umn.edu
Fri Dec 22 22:05:49 UTC 2023
Ping?
Thanks for any help!
-m
On Fri, Sep 29, 2023 at 3:08 PM Matt Zagrabelny <mzagrabe at d.umn.edu> wrote:
> Greeting Kea Users,
>
> I'm attempting to insert a record into the dhcp4_subnet table, but am
> hitting an error:
>
> INSERT INTO dhcp4_subnet (
> subnet_id,
> subnet_prefix
> )
> VALUES (
> 10123,
> '10.168.255.0/24'
> );
> ERROR: insert or update on table "dhcp4_audit" violates foreign key
> constraint "fk_dhcp4_audit_revision"
> DETAIL: Key (revision_id)=(0) is not present in table
> "dhcp4_audit_revision".
> CONTEXT: SQL statement "INSERT INTO dhcp4_audit (object_type, object_id,
> modification_type, revision_id)
> VALUES (object_type_val, object_id_val,
> (SELECT id FROM modification WHERE modification_type =
> modification_type_val),
> audit_revision_id)"
> PL/pgSQL function createauditentrydhcp4(character varying,bigint,character
> varying) line 12 at SQL statement
> SQL statement "SELECT createAuditEntryDHCP4('dhcp4_subnet', NEW.subnet_id,
> 'create')"
> PL/pgSQL function func_dhcp4_subnet_ains() line 3 at PERFORM
>
> Looking at the schema of the dhcp4_audit table makes me think I shouldn't
> be manually manipulating the dhcp4_audit table.
>
> Does anyone have an idea of what I'm doing wrong? or a successfully
> working example of inserting a subnet into the dhcp4_subnet table?
>
> Thanks for the help!
>
> -m
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20231222/53cc583e/attachment.htm>
More information about the Kea-users
mailing list