From: | nunks <nunks(dot)lol(at)gmail(dot)com> |
---|---|
To: | pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Error code for "no partition or relation found for row" |
Date: | 2018-10-31 01:26:57 |
Message-ID: | CACq6szQeSeAFLbu=OdtCYT_Au46KOcbWD8frSaTwqpPeY6qcJQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi again,
I realized I can't mix function partitioning with the new DDL
partitioning. Sorry for the stupid question.
Thanks again,
Nunks
On 10/30/18, nunks <nunks(dot)lol(at)gmail(dot)com> wrote:
> Hi,
>
> What is the error code for capturing "no partition or relation found
> for row" errors on PL/pgSQL? I feel there should be a specific error
> code for that, but I can't find it in the documentation.
>
> In the past, with function partitioning schemes, I used
> "undefined_table" exceptions, but it doesn't work with new Postgres 11
> partitioning.
>
> Judging by the executor code in execPartition.c, the error code seems
> to be ERRCODE_CHECK_VIOLATION, but listening for "check_violation" on
> EXCEPTION blocks doesn't work.
>
> Even if it worked, though, wouldn't it collide with other CHECK
> constraint violations? I'm writing a function to create partitions
> automatically on insert, and this mixed behavior could trigger an
> unwanted "CREATE TABLE ... PARTITION OF ..."
>
>
> Thanks!
> Nunks
>
> ----------
> “Life beats down and crushes the soul and art reminds you that you have
> one.”
>
>
> - Stella Adler
>
--
----------
“Life beats down and crushes the soul and art reminds you that you have one.”
- Stella Adler
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Liesenfeld | 2018-10-31 05:25:34 | Poverty Partitioning, include indexes |
Previous Message | nunks | 2018-10-31 01:03:23 | Error code for "no partition or relation found for row" |