Skip to content

creating table with uri type to uuid_generate #11

Description

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions