Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 0A0A447594B for ; Fri, 12 Jul 2002 09:43:48 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g6CDheAl009257; Fri, 12 Jul 2002 09:43:40 -0400 (EDT) To: Alexaki Sofia Cc: pgsql-interfaces@postgresql.org Subject: Re: arrays as input parameter for c functions In-reply-to: References: Comments: In-reply-to Alexaki Sofia message dated "Fri, 12 Jul 2002 12:58:50 +0300" Date: Fri, 12 Jul 2002 09:43:40 -0400 Message-ID: <9256.1026481420@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200207/70 X-Sequence-Number: 2879 Alexaki Sofia writes: > I want to add a c function in PostgreSQL (7.2.1) > Is it possible the input parametrs othe function to be > arrays of text (i.e., text *temp[10])? You can certainly make the function take a "text[]", but it's not going to be spoon-fed to you as a C array; you'll need to break down the array value yourself. See deconstruct_array. (The aggregate support functions for numeric avg/stddev/etc might be useful examples of interpreting and constructing arrays of varlena datums.) regards, tom lane