You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE OR REPLACEFUNCTIONgenerateIdentifierFromStoredProcedure()
The actual function created by running this SQL statement is generateidentifierfromstoredprocedure(), without the CamelCase Capitals. If someone would for example manualy create a function with the CamelCase name it will not work, because PostgreSQL will add "" around the function name.
By the way, I used this functionality to get a PID with a random UUID4, by using the function like this:
CREATE OR REPLACE FUNCTION generateidentifierfromstoredprocedure()
RETURNS varchar AS $$
DECLARE
identifier varchar;
BEGIN
identifier := (select gen_random_uuid())::varchar;
RETURN identifier;
END;
$$ LANGUAGE plpgsql IMMUTABLE;
which works nicely :)!
great job on the multiple PID providers!
Stefan
The text was updated successfully, but these errors were encountered:
Interesting. It sounds like small amount of value we get in readability from the camelCase version don't justify the potential confusion you're pointing out. I don't have any objection to making it all lower case.
dataverse/doc/sphinx-guides/source/_static/util/createsequence.sql
Line 25 in fbb215a
The actual function created by running this SQL statement is generateidentifierfromstoredprocedure(), without the CamelCase Capitals. If someone would for example manualy create a function with the CamelCase name it will not work, because PostgreSQL will add "" around the function name.
By the way, I used this functionality to get a PID with a random UUID4, by using the function like this:
CREATE OR REPLACE FUNCTION generateidentifierfromstoredprocedure()
RETURNS varchar AS $$
DECLARE
identifier varchar;
BEGIN
identifier := (select gen_random_uuid())::varchar;
RETURN identifier;
END;
$$ LANGUAGE plpgsql IMMUTABLE;
which works nicely :)!
great job on the multiple PID providers!
Stefan
The text was updated successfully, but these errors were encountered: