Re: can function arguments have the type tablename.columnname%TYPE? - Mailing list pgsql-general

From Sergey Konoplev
Subject Re: can function arguments have the type tablename.columnname%TYPE?
Date
Msg-id AANLkTilLMdFsp5KlX66RGjM5K4u9hC6QVqF_qgWXzjqS@mail.gmail.com
Whole thread Raw
In response to can function arguments have the type tablename.columnname%TYPE?  (Dino Vliet <dino_vliet@yahoo.com>)
List pgsql-general
Hi,

What is the main goal? Aren't you looking for a solution to simplify
arguments declaration?

If so then what about using this one:

CREATE OR REPLACE FUNCTION totnrchange(t table1)
RETURNS integer AS
$BODY$
DECLARE
  tot integer;
BEGIN
  select count(resnr) into tot from table1
  where resnr = t.resnr and fnr = t.fnr ...
...













--
Sergey Konoplev

Blog: http://gray-hemp.blogspot.com /
Linkedin: http://ru.linkedin.com/in/grayhemp /
JID/GTalk: gray.ru@gmail.com / Skype: gray-hemp / ICQ: 29353802

pgsql-general by date:

Previous
From: Luis Guillermo Dangel
Date:
Subject: Question about Beta for Windows 64 bits
Next
From: David Fetter
Date:
Subject: Re: Pulling data from a constraint def