Search Postgresql Archives

Table cannot be partiotioned using domain in argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

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

 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux