Hello,
I am trying to create a PG table such that:
CREATE TABLE websites (
id serial primary key,
site_link uri,
site_sha1 uuid NOT NULL DEFAULT uuid_generate_v5(uuid_ns_url(), site_link),
site_md5 uuid NOT NULL DEFAULT uuid_generate_v3(uuid_ns_url(), site_link)
);
but I think that I need to be able to send the site_link as a text input to the "uuid_generate_5/3()"
How can I cast the URI as text?
Thanks,
Hello,
I am trying to create a PG table such that:
CREATE TABLE websites (
id serial primary key,
site_link uri,
site_sha1 uuid NOT NULL DEFAULT uuid_generate_v5(uuid_ns_url(), site_link),
site_md5 uuid NOT NULL DEFAULT uuid_generate_v3(uuid_ns_url(), site_link)
);
but I think that I need to be able to send the site_link as a text input to the "uuid_generate_5/3()"
How can I cast the URI as text?
Thanks,