Hi,
If db is empty, then the command is unnecessary.
PostgreSQL has equal command:
https://dba.stackexchange.com/questions/62739/how-do-i-validate-all-my-constraints-in-postgresqlMartinaJ
>Thanks. So it doesn't actually create the check constraint, it just runs it to verify the data?
>
>Why I am asking is because I am converting a SQL Server database to PostgreSQL by scripting the SQL Server database out and then adjusting the script to PostgreSQL syntax and it doesn't like that CHECK CONSTRAINT command. As this is a empty database I am creating I guess I don't need to actually check that the constraint is valid.
>
>>Hi,
>>
>> Runs check if data are consistent.
>>
>> MartinaJ
>>>Hi,
>>>What exactly does the CHECK CONSTRAINT command in the following do?
>>>
>>>
>>>ALTER TABLE public.salesdetails ADD CONSTRAINT FK_salesdetails_sales FOREIGN KEY(isaleid)
>>>REFERENCES public.sales (isaleid)
>>>;
>>>ALTER TABLE public.salesdetails CHECK CONSTRAINT FK_salesdetails_sales
>>>;
>>>
>>>This is code generated by SSMS.