IQSS / IQSS/dataverse

CamelCase notation for PostgreSQL function name might cause confusion.

Open
#10,842 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

https://github.com/IQSS/dataverse/blob/fbb215ac69b34fae63e0197e8d9d15b38d8424a9/doc/sphinx-guides/source/_static/util/createsequence.sql#L25

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with doc/sphinx-guides/source/_static/util/createsequence.sql at line 25 and inspect the function declaration and its documented name. Check how the function is referenced, then make the SQL and surrounding documentation consistently identify the callable PostgreSQL name; verify the resulting statement or references use the same name.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, sql
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.