Error calling stored procedure with named parameter notation
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
Línea de trabajo
The issue shows a CALL with named arguments (p_name => ...) failing with a syntax error at >, while positional arguments succeed. The payload names no source files, so start by reproducing the failing call against a local doltgresql server with the add_organization procedure from the issue. Then find where the CALL statement is parsed and how named-argument notation is handled there. Done means the named-argument call returns CALL and inserts the row, and the positional form still works.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I have a stored procedure. When I call it using named parameters the call fails. When I call is using positional parameters it succeeds.
pi5@pi5:~ $ psql -h pi5.local -p 5432 -U sarzone_rw_user sarzone
Password for user sarzone_rw_user:
psql (17.12 (Debian 17.12-0+deb13u1), server 15.17)
Type "help" for help.
sarzone=> CALL add_organization(
p_name => 'Mid-Minnesota K9 Inc',
p_subdivision_codes => ARRAY['US-MN'],
p_url => 'https://www.midmnk9.com',
p_type => 'team'
);
ERROR: at or near ">": syntax error
sarzone=> CALL add_organization('team', 'Mid-Minnesota K9 Inc.', 'https://www.midmnk9.com', ARRAY['US-MN']);
CALL
sarzone=>
Stored procedure is
CREATE PROCEDURE add_organization(
p_type varchar,
p_name varchar,
p_url varchar,
p_subdivision_codes varchar[]
)
LANGUAGE plpgsql
AS $$
DECLARE
v_org_id uuid;
BEGIN
IF p_type IS NULL THEN
-- table default ('team') applies
INSERT INTO organizations (name, url)
VALUES (p_name, p_url)
RETURNING id INTO v_org_id;
ELSIF p_type = 'organization' THEN
INSERT INTO organizations (name, url, type)
VALUES (p_name, p_url, 'organization')
RETURNING id INTO v_org_id;
ELSIF p_type = 'team' THEN
INSERT INTO organizations (name, url, type)
VALUES (p_name, p_url, 'team')
RETURNING id INTO v_org_id;
ELSE
RAISE EXCEPTION 'Invalid organization type: %', p_type;
END IF;
INSERT INTO organization_locations (organization_id, subdivision_code)
SELECT v_org_id, code
FROM (
SELECT DISTINCT unnest(p_subdivision_codes) AS code
) AS s
WHERE code IS NOT NULL;
END;
$$;
- Lenguaje dominante
- Go
- Estrellas
- 2.2k
- Forks
- 93
- Merge medio
- 19 h 38 min
- PR fusionados (30 d)
- 132
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dolthub/doltgresql
-
customer issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
dolthub/doltgresql#3969 ·
Los mantenedores suelen responder en 1 día
-
`CREATE TABLE ... TABLESPACE pg_default` fails: TABLESPACE is not yet supportedPosiblemente ocupada @draarivpatel-ui la tomó hace 1 día. Abiertocustomer issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dolthub/doltgresql#3818 ·
Los mantenedores suelen responder en 1 día
-
customer issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
dolthub/doltgresql#3817 ·
Los mantenedores suelen responder en 1 día
-
Server crash (nil pointer in collationCompare) when filtering dolt_diff by a text primary keyAbiertocustomer issue
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
dolthub/doltgresql#3980 ·
Los mantenedores suelen responder en 1 día
-
customer issue
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
dolthub/doltgresql#3979 ·
Los mantenedores suelen responder en 1 día
Todos los issues de dolthub/doltgresql
Issues similares
-
good first issue spec
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Go - Inconsistent Logs StabilityAbiertodocs
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
open-telemetry/opentelemetry.io#12846 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
hivecommons/hive#19912 ·
Los mantenedores suelen responder en 1 día
-
kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día