pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: knoch@ipa.fraunhofer.de
To: pgsql-bugs@postgresql.org
Subject: BUG #6400: function arguments not accepted
Date: Wed, 18 Jan 2012 13:38:25 +0000
Message-ID: <E1RnVib-0007dJ-Pl@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      6400
Logged by:          Sandra Knoch
Email address:      knoch@ipa.fraunhofer.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!





view thread (3+ messages)  latest in thread

Message-ID: <E1RnVib-0007dJ-Pl@wrigleys.postgresql.org>
Permalink:  ../E1RnVib-0007dJ-Pl@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/E1RnVib-0007dJ-Pl@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: knoch@ipa.fraunhofer.de
  Subject: Re: BUG #6400: function arguments not accepted
  In-Reply-To: <E1RnVib-0007dJ-Pl@wrigleys.postgresql.org>
  References: <E1RnVib-0007dJ-Pl@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox