pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gordon Clarke <gordonc@cyberbiz.net.au>
To: pgsql-sql@postgreSQL.org
Subject: Probs with int2 in functions
Date: Sun, 27 Dec 1998 16:56:05 +1000 (EST)
Message-ID: <Pine.LNX.3.96.981227143322.599B-100000@localhost> (raw)

I'm using PostgreSQL v6.3.2.

It appears that the function command doesn't like the type "int2" as a
parm in a call. For example,

zedadmin=> \i zz.sql
create table test2(
  trk_id        int2            not null,
  trk_nm        varchar(30)     not null,
  trk_comp      varchar(30));
CREATE

create function insert_test2(int2,varchar,varchar)
returns int4 as
 'insert into test2
  values($1,$2,$3);
select 1 as return_val;'
language 'sql';
CREATE
EOF

The objects are successfully created, but when I come to insert data via
the function there is the following error.

zedadmin=> select insert_test2(1,'My name','My comment');
ERROR:  function insert_test2(int4, unknown, unknown) does not exist

If one changes the int2 to an int4 in the table and function, the function
is happy to insert the data into the table.

Any ideas why this is so, or is it a bug? 

Cheers...Gordon
~~~~~~~~~~~~~~ 4ZzZ Brisbane's First Community FM Station ~~~~~~~~~~~~~~
         The Demo Show - Supporting Australian Unsigned Artists
            Mon nights 6-7pm (0800-0900UTC) on 4ZzZ 102.1 FM
             http://www.4zzzfm.org.au/welcome.html (RA feed)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





view thread (4+ messages)  latest in thread

Message-ID: <Pine.LNX.3.96.981227143322.599B-100000@localhost>
Permalink:  ../Pine.LNX.3.96.981227143322.599B-100000@localhost/
Also on:    postgresql.org/message-id/Pine.LNX.3.96.981227143322.599B-100000@localhost

 · 

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-sql@postgresql.org
  Cc: gordonc@cyberbiz.net.au
  Subject: Re: Probs with int2 in functions
  In-Reply-To: <Pine.LNX.3.96.981227143322.599B-100000@localhost>
  References: <Pine.LNX.3.96.981227143322.599B-100000@localhost>

* 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