From: | "Dan Black" <dchernyshov(at)yandex(dot)ru> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #1553: Function arguments and table fields |
Date: | 2005-03-20 21:39:15 |
Message-ID: | 20050320213915.2FA91F0B1F@svr2.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 1553
Logged by: Dan Black
Email address: dchernyshov(at)yandex(dot)ru
PostgreSQL version: 8.0.1
Operating system: MS Windows 2000 sp4
Description: Function arguments and table fields
Details:
1) Here is simple function
CREATE OR REPLACE FUNCTION img_update(img_name int4, img_name "varchar")
RETURNS int4 AS
$BODY$DECLARE
_imgId ALIAS FOR $1;
_imgName ALIAS FOR $2;
BEGIN
UPDATE images SET img_name = _imgName WHERE img_id = _imgId;
RETURN 0;
END$BODY$
LANGUAGE 'plpgsql' VOLATILE SECURITY DEFINER;
2) Here is simple table
CREATE TABLE images
(
img_id int4 NOT NULL DEFAULT nextval('public.images_id_seq'::text),
img_name varchar(34)
)
PROBLEM:
Function does not work
PROBLEM-SOLVING:
Need to rename function parameters, so that their names and table fields
names are unmatched.
It's not probably bug, but it's difficult-to-locate error
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2005-03-21 04:17:04 | Re: pl/pgsql doesn't load |
Previous Message | Tom Lane | 2005-03-20 17:53:33 | Re: BUG #1517: SQL interval syntax is accepted by the parser, |