Em qua., 27 de dez. de 2023 às 14:11, Wilson, Maria Louise
(LARC-E301)[RSES] <m.l.wil...@nasa.gov> escreveu:

> Thanks for the reply!!  Having some issues due to nulls….  Any other
> thoughts?
>
>
>
> i=# ALTER TABLE granule_file ADD PRIMARY KEY (granule_uuid, file_id);
>
> ERROR:  column "granule_uuid" contains null values
>
Well, uuid is a bad datatype for primary keys.
If possible in the long run, consider replacing them with bigint.

Can you try a index:
CREATE INDEX granule_file_file_id_key ON granule_file USING btree(file_id);

Although granule_file has an index as a foreign key, it seems to me that it
is not being considered.

My 2cents.

Best regards,
Ranier Vilela

Reply via email to