estou migrando do mysql para o postgres...
porem estou com erro ao criar uma relacao
tenho a tabela
"pc_codigo character (9) not null PRIMARY KEY,"
"pc_grau int2 not null,"
"pc_apel int8 not null," criado como index pc_apel1
"pc_nome character (40) not null,"
"pc_posic int2 not null,"
"pc_set character (1) not null,"
"pc_cond int2 not null,"
"pc_pend character (1) not null,"
"pc_receita character (20) not null,"
"pc_tipo integer not null,"
"pc_gpo_sped integer not null"
create index pc_apel1 on fcontab.cadcta (pc_apel) where pc_apel > 0
porque alguns registros desta tabela vai ter como conteudo 0(zero)..
cria de boa...
quando vou cria a outra tabela
"lt_num int8 not null,"
"lt_deb int8 reference fcontab.cadcta (pc_apel) not null,"
"lt_cre int8 reference fcontab.cadcta (pc_apel) not null,"
"lt_hp character (220) not null,"
"lt_cooper character (40) not null,"
"lt_vlr decimal (11,2) not null,"
"lt_data date,"
"lt_cor character (1) not null,"
"lt_saldo decimal (11, 2) not null,"
"lt_sd character (1) not null,"
"lt_doc character (20) not null,"
"lt_venc date ,"
acusa o erro 42830 erro: there is no unique constraint matching given key for referenced table "cadcta".
alguém pode me dar uma ajuda ?
brigaduuuuuuuuuuuu