Re: Table cannot be partiotioned using domain in argument

From: Márcio A(dot) Sepp <marcio(at)zyontecnologia(dot)com(dot)br>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Table cannot be partiotioned using domain in argument
Date: 2018-09-12 03:46:19
Message-ID: cdab4bb1-a62a-48be-99ca-edbc92230d20@email.android.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<div dir='auto'><div><div class="gmail_extra"><div class="gmail_quote">Hi and thanks for answer,<br><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">
Nope.&nbsp; The problem is suggested, if not exactly clearly explained,
<br>
by the error message: casting a literal to ddate isn't a guaranteed
<br>
fixed process.&nbsp;</p></blockquote></div></div></div><div dir="auto">Wasn't clear enought to me.</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">For example, suppose you created this table and then
<br>
did
<br>

<br>
alter domain ddate add check (value &gt; '2020-01-01');
<br>

<br>
thereby rendering the partition bound values illegal for the domain.
<br>
What would you expect to happen then?</p></blockquote></div></div></div><div dir="auto">Not sure. Maybe check constraint error when insert/update a row?!?! I think this should happen before new record to be routed to the correct partition (in this case there is no partition created to this interval).</div><div dir="auto"><br></div><div dir="auto"></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">
We might at some point work out plausible semantics for this situation,
<br>
but it hasn't been done yet.
<br>

<br>
regards, tom lane&nbsp;</p></blockquote></div></div></div><div dir="auto">Ok to me. I'll use date instead of domain.</div><div dir="auto"><br></div><div dir="auto"></div><div dir="auto"><div class="gmail_extra">Thank you so much Tom.</div></div></div>

Attachment Content-Type Size
unknown_filename text/html 1.7 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scot Kreienkamp 2018-09-12 13:55:15 PG9.1 migration to PG9.6, dump/restore issues
Previous Message Tom Lane 2018-09-12 03:20:49 Re: Table cannot be partiotioned using domain in argument