From: Márcio Antônio Sepp <marcio@zyontecnologia.com.br>
To: pgsql-general@lists.postgresql.org
Subject: Table cannot be partiotioned using domain in argument
Date: Tue, 11 Sep 2018 23:11:57 -0300
Message-ID: <012d01d44a3d$fb7c6100$f2752300$@com.br> (raw)
Hi,
This query works fine:
create table t1
(d date)
PARTITION BY RANGE (d);
CREATE TABLE t1_p1 PARTITION OF t1 FOR VALUES FROM ('2000-01-01') TO
('2019-01-01');
Same query, but now (using domain):
CREATE DOMAIN ddate
AS date;
create table t1
(d ddate)
PARTITION BY RANGE (d);
CREATE TABLE t1_p1 PARTITION OF t1 FOR VALUES FROM ('2000-01-01') TO
('2019-01-01');
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.
Dica: Try putting the literal value in single quotes.
Posição: 55
I cannot use domain in this case?
Thanks in advance!
--
Att
Márcio
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
Subject: Re: Table cannot be partiotioned using domain in argument
In-Reply-To: <012d01d44a3d$fb7c6100$f2752300$@com.br>
References: <012d01d44a3d$fb7c6100$f2752300$@com.br>
* 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