pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Márcio A. Sepp <marcio@zyontecnologia.com.br>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Table cannot be partiotioned using domain in argument
Date: Wed, 12 Sep 2018 00:46:19 -0300
Message-ID: <cdab4bb1-a62a-48be-99ca-edbc92230d20@email.android.com> (raw)
In-Reply-To: <1188.1536722449@sss.pgh.pa.us>

<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>

view thread (3+ messages)

Message-ID: <cdab4bb1-a62a-48be-99ca-edbc92230d20@email.android.com>
Permalink:  ../cdab4bb1-a62a-48be-99ca-edbc92230d20@email.android.com/
Also on:    postgresql.org/message-id/cdab4bb1-a62a-48be-99ca-edbc92230d20@email.android.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: marcio@zyontecnologia.com.br, tgl@sss.pgh.pa.us
  Subject: Re: Table cannot be partiotioned using domain in argument
  In-Reply-To: <cdab4bb1-a62a-48be-99ca-edbc92230d20@email.android.com>
  References: <1188.1536722449@sss.pgh.pa.us> <cdab4bb1-a62a-48be-99ca-edbc92230d20@email.android.com>

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

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