pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Márcio Antônio Sepp <marcio@zyontecnologia.com.br>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Table cannot be partiotioned using domain in argument
Date: Tue, 11 Sep 2018 23:20:49 -0400
Message-ID: <1188.1536722449@sss.pgh.pa.us> (raw)
In-Reply-To: <012d01d44a3d$fb7c6100$f2752300$@com.br>
References: <012d01d44a3d$fb7c6100$f2752300$@com.br>

=?iso-8859-1?Q?M=E1rcio_Ant=F4nio_Sepp?= <marcio@zyontecnologia.com.br> writes:
> The follow error occur:
> SQL Error [42804]: ERROR: specified value cannot be cast to type ddate for
> column "d"
>   Detalhe: The cast requires a non-immutable conversion.

> I cannot use domain in this case?

Nope.  The problem is suggested, if not exactly clearly explained,
by the error message: casting a literal to ddate isn't a guaranteed
fixed process.  For example, suppose you created this table and then
did

alter domain ddate add check (value > '2020-01-01');

thereby rendering the partition bound values illegal for the domain.
What would you expect to happen then?

We might at some point work out plausible semantics for this situation,
but it hasn't been done yet.

			regards, tom lane




view thread (3+ messages)  latest in thread

Message-ID: <1188.1536722449@sss.pgh.pa.us>
Permalink:  ../1188.1536722449@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1188.1536722449@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, marcio@zyontecnologia.com.br
  Subject: Re: Table cannot be partiotioned using domain in argument
  In-Reply-To: <1188.1536722449@sss.pgh.pa.us>
  References: <012d01d44a3d$fb7c6100$f2752300$@com.br> <1188.1536722449@sss.pgh.pa.us>

* 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