We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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,
The text was updated successfully, but these errors were encountered:
this isn't a bug... By now I guess you have found how to cast...
But in case here is an example
CREATE TABLE websites ( id serial primary key, site_link uri, site_sha1 uuid NOT NULL DEFAULT uuid_generate_v5(uuid_ns_url(), site_link::text), site_md5 uuid NOT NULL DEFAULT uuid_generate_v3(uuid_ns_url(), site_link::text) );
Sorry, something went wrong.
No branches or pull requests
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,
The text was updated successfully, but these errors were encountered: