Re: Table cannot be partiotioned using domain in argument

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Márcio Antônio Sepp <marcio(at)zyontecnologia(dot)com(dot)br>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Table cannot be partiotioned using domain in argument
Date: 2018-09-12 03:20:49
Message-ID: 1188.1536722449@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?iso-8859-1?Q?M=E1rcio_Ant=F4nio_Sepp?= <marcio(at)zyontecnologia(dot)com(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Márcio A. Sepp 2018-09-12 03:46:19 Re: Table cannot be partiotioned using domain in argument
Previous Message Márcio Antônio Sepp 2018-09-12 02:11:57 Table cannot be partiotioned using domain in argument