Skip site navigation (1) Skip section navigation (2)

BUG #6400: function arguments not accepted

From: knoch(at)ipa(dot)fraunhofer(dot)de
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6400: function arguments not accepted
Date: 2012-01-18 13:38:25
Message-ID: E1RnVib-0007dJ-Pl@wrigleys.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      6400
Logged by:          Sandra Knoch
Email address:      knoch(at)ipa(dot)fraunhofer(dot)de
PostgreSQL version: 9.0.6
Operating system:   Windows Server 2007 SP2
Description:        

I have a strange problem regarding functions with parameters. The parameters
are not accepted and I always get the error column "user" does not exist,
where user is the parameter name and not a column. The function looks like
this:

CREATE OR REPLACE FUNCTION tissue.insert_biopsy_data
(
  "user"          integer,
  in_date         date,
  in_description  varchar,
  in_weight       numeric,
  in_size         numeric
)
RETURNS integer AS
$$
declare
result integer;
begin
  INSERT INTO tissue.biopsy (id_biopsy, f_user,introduction_date,
description, weight, size)
  VALUES
  (
  DEFAULT,
  user,
  in_date,
  in_description,
  in_weight,
  in_size
  );
  SELECT id_biopsy FROM tissue.biopsy INTO result;
  Return result;
end
$$
LANGUAGE 'plpgsql'
VOLATILE
CALLED ON NULL INPUT
SECURITY INVOKER
COST 100;

It works with my old PostgreSQL 8.4 version, but not with the new one. What
is the problem here? Why is the argument not recognized as argument but as a
column name? Thank you for any help!



Responses

pgsql-bugs by date

Next:From: Heikki LinnakangasDate: 2012-01-18 14:37:51
Subject: Re: BUG #6399: knngist sometimes returns tuples in incorrect order
Previous:From: Heikki LinnakangasDate: 2012-01-18 12:07:50
Subject: Re: BUG #6399: knngist sometimes returns tuples in incorrect order

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group