Thread: Inheriting text[] field

Inheriting text[] field

From
Kaloyan Iliev Iliev
Date:
Dear Friend,

I have the following problem when I try to inherits one table with 
text[] field into another.
I am useing PostgreSQL 7.2.3.
I suppose that this  is a BUG but I am not sure.
Any ides.
10x in advance.
 Kaloyan

test_libvar=# create table temp_a(
test_libvar(# name text[]
test_libvar(# );
CREATE
test_libvar=# create table temp( name text[] ) inherits (temp_a);
NOTICE:  CREATE TABLE: merging attribute "name" with inherited definition
ERROR:  CREATE TABLE: attribute "name" type conflict (_text and text)

P.S. I know that I can avoid this by scipping the 'name' field into the 
second table but what if I need to set some CONSTRAINTS to it.


Re: Inheriting text[] field

From
Tom Lane
Date:
Kaloyan Iliev Iliev <news1@faith.digsys.bg> writes:
> I am useing PostgreSQL 7.2.3.

> test_libvar=# create table temp_a(
> test_libvar(# name text[]
> test_libvar(# );
> CREATE
> test_libvar=# create table temp( name text[] ) inherits (temp_a);
> NOTICE:  CREATE TABLE: merging attribute "name" with inherited definition
> ERROR:  CREATE TABLE: attribute "name" type conflict (_text and text)

Works fine for me in 7.3 and later.  Time to upgrade ...
        regards, tom lane


Re: Inheriting text[] field

From
Kaloyan Iliev Iliev
Date:
10x

I suppose you are right:)
Regard Kaloyan Iliev

Tom Lane wrote:

>Kaloyan Iliev Iliev <news1@faith.digsys.bg> writes:
>  
>
>>I am useing PostgreSQL 7.2.3.
>>    
>>
>
>  
>
>>test_libvar=# create table temp_a(
>>test_libvar(# name text[]
>>test_libvar(# );
>>CREATE
>>test_libvar=# create table temp( name text[] ) inherits (temp_a);
>>NOTICE:  CREATE TABLE: merging attribute "name" with inherited definition
>>ERROR:  CREATE TABLE: attribute "name" type conflict (_text and text)
>>    
>>
>
>Works fine for me in 7.3 and later.  Time to upgrade ...
>
>            regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 9: the planner will ignore your desire to choose an index scan if your
>      joining column's datatypes do not match
>
>
>  
>