Error calling stored procedure with named parameter notation
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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;
$$;
- Ngôn ngữ chính
- Go
- Star
- 2.2k
- Fork
- 93
- Merge trung bình
- 19 giờ 38 phút
- Pull request đã merge (30 ngày)
- 132
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dolthub/doltgresql
-
customer issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
dolthub/doltgresql#3969 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`CREATE TABLE ... TABLESPACE pg_default` fails: TABLESPACE is not yet supportedCó thể đã có người làm @draarivpatel-ui đã nhận 1 ngày trước. Đang mởcustomer issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
dolthub/doltgresql#3818 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
customer issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
dolthub/doltgresql#3817 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Server crash (nil pointer in collationCompare) when filtering dolt_diff by a text primary keyĐang mởcustomer issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
dolthub/doltgresql#3980 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
customer issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
dolthub/doltgresql#3979 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của dolthub/doltgresql
Issue tương tự
-
good first issue spec
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Go - Inconsistent Logs StabilityĐang mởdocs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
open-telemetry/opentelemetry.io#12846 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
hivecommons/hive#19912 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày