X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id B9480D1B4E5 for ; Fri, 12 Sep 2003 13:26:55 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 83137-03 for ; Fri, 12 Sep 2003 10:26:28 -0300 (ADT) Received: from abe.micropat.com (abe.micropat.com [204.17.221.119]) by svr1.postgresql.org (Postfix) with ESMTP id 8A4B4D1B526 for ; Fri, 12 Sep 2003 10:26:19 -0300 (ADT) Received: from micropat.com ([204.17.221.90]) by abe.micropat.com (Netscape Messaging Server 4.15) with ESMTP id HL3RNZ00.60V for ; Fri, 12 Sep 2003 09:19:12 -0400 Message-ID: <3F61CBBD.77B7EC68@micropat.com> Date: Fri, 12 Sep 2003 09:35:57 -0400 From: "Richard Hall" Organization: Micropatent, LLC X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Cc: pgsql-sql@postgresql.org Subject: Re: how to call a function with row-type arg References: <200309120931.13760.sad@bankir.ru> Content-Type: multipart/alternative; boundary="------------F2D48643ED064BED6C548D00" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/96 X-Sequence-Number: 15074 --------------F2D48643ED064BED6C548D00 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit DECLARE I INTEGER; BEGIN SELECT * INTO I FROM foo( ) That part is easy, but I don't understand what you are using as a function parameter. Rick sad wrote: > hi > how to call a function with a row_type arg ?? > that is the question > > CREATE FUNCTION foo(tablename) returns int ..... > > SELECT foo ( ??????? ); > > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings --------------F2D48643ED064BED6C548D00 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit DECLARE
    I INTEGER;
BEGIN
    SELECT *
      INTO I
      FROM foo( <tablename> )

That part is easy, but I don't understand what you are using as a function parameter.

Rick

sad wrote:

hi
 how to call a function with a row_type arg ??
 that is the question

CREATE FUNCTION foo(tablename) returns int .....

SELECT foo ( ??????? );

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

--------------F2D48643ED064BED6C548D00--