pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Johnston <polobo@yahoo.com>
To: 'tlund79' <thomas.lund@eniro.no>
To: pgsql-sql@postgresql.org
Subject: Re: Issue with a variable in a function
Date: Tue, 8 Nov 2011 12:27:45 -0500
Message-ID: <006801cc9e3b$bb177ec0$31467c40$@yahoo.com> (raw)
In-Reply-To: <1320758213629-4974235.post@n5.nabble.com>
References: <1320758213629-4974235.post@n5.nabble.com>

-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]
On Behalf Of tlund79
Sent: Tuesday, November 08, 2011 8:17 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] Issue with a variable in a function


The issue relates to the variable "prosjektkode" ($4). 

CREATE OR REPLACE FUNCTION ppr_data(aarstall int, frauke int, tiluke int,
prosjektkode int) RETURNS int AS $$ DECLARE antall bigint;

-----------/Original Message----------

Read about "ARRAY"s

Change your function signature to something like:

CREATE OR REPLACE FUNCTION ppr_data(aarstall int, frauke int, tiluke int,
prosjektkode int[] )  -- Note the change to int[] from int for prosjektkode

David J.





view thread (4+ messages)  latest in thread

Message-ID: <006801cc9e3b$bb177ec0$31467c40$@yahoo.com>
Permalink:  ../006801cc9e3b$bb177ec0$31467c40$@yahoo.com/
Also on:    postgresql.org/message-id/006801cc9e3b$bb177ec0$31467c40$@yahoo.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: polobo@yahoo.com, thomas.lund@eniro.no
  Subject: Re: Issue with a variable in a function
  In-Reply-To: <006801cc9e3b$bb177ec0$31467c40$@yahoo.com>

* 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