could you please help me to convert this expression in the PostgreSQL syntax to the Redshift syntax:
(('x'::text || lpad(md5('0036f392-c2bc-46d5-b413-cd7772bcd4a1'), 16, '0'::text)))::bit(64)::bigint
The result equals -5735530232431975337
in PostgreSQL.
Redshift throws an error: "cannot cast type text to bit".
UPD It seems like similar question was asked here Hex string to integer conversion in Amazon Redshift