public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Sbob <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: ERROR Inserting into partition
Date: Tue, 22 Oct 2024 07:53:34 -0700
Message-ID: <CAKFQuwZxzmLvTZcgUkaiN2rrJuZ6LmyOVPMVRCEMKYWujyZCxQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On Tue, Oct 22, 2024 at 7:36 AM Sbob <[email protected]> wrote:

>
> INSERT INTO part_schema.cust_info_5
> ( cust_last_name)
> SELECT l_name from public.global_addr WHERE l_name = 'NELL';
> ERROR:  new row for relation "cust_info_5" violates partition constraint
> DETAIL:  Failing row containd (null, null, null, null, null, 'NELL',
> null, null, null, null, null,null).
>
>
Also, I am unable to reproduce this in development:

CREATE TABLE cust_part (
            cust_int_id     bigint,
           cust_ext_id    bigint,
           cust_tax_id   varchar(20),
           cust_dob        date,
           cust_dob_str   varchar(20),
          cust_last_name  varchar(100),
         cust_first_name   varchar(100),
          cust_middle_name  varchar(100),
         cust_addr1                text,
        cust_city                     text,
        cust_state                  text,
        cust_zip                     varchar(5)
) PARTITION BY LIST (cust_last_name);

CREATE TABLE cust_info_5
PARTITION OF cust_part
FOR VALUES IN ('NELL');

create table global_addr (l_name text);

insert into global_addr values ('NELL');

INSERT INTO cust_info_5
( cust_last_name)
SELECT l_name from global_addr WHERE l_name = 'NELL';

David J.


view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: ERROR Inserting into partition
  In-Reply-To: <CAKFQuwZxzmLvTZcgUkaiN2rrJuZ6LmyOVPMVRCEMKYWujyZCxQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox