Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA03104; Tue, 28 Apr 92 01:54:37 -0700
Message-Id: <9204280854.AA03104@postgres.Berkeley.EDU>
From: "Schenkelaars.V.F" <V.F.Schenkelaars@fel.tno.nl>
Subject: Variable length text arrays
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
To: postgres@postgres.berkeley.edu (Postgres mailing list)
Date: Tue, 28 Apr 92 10:57:58 MET DST
Cc: pjmg1@tnofel.fel.tno.nl (Peter van Oosterom)
X-Mailer: ELM [version 2.3 PL11]

Dear Postgres Group,

How can I use variable length text as an return type of a function. I've tried
to call the Polyline2_out function which does function correctly with our
defined type Polyline2, But when I call this function directly from the
terminal monitor, The answer is cut off after 16 characters. Ive tried the
following commands.

retrieve (test.polyline)          /* polyline is of type POLYLINE2  */

Query sent to backend is "retrieve (test.polyline)"
---------------
| polyline    |
---------------
| (6:0,0,2,2,3,1,4,-1.01,5,-2,7,0)|
---------------


retrieve (b = Polyline2_out(test.polyline))\g

Query sent to backend is "retrieve (b = Polyline2_out(test.polyline))"
---------------
| b           |
---------------
| (6:0,0,2,2,3,1,4|
---------------

When I changed the output type of the function Polyline2_out to "text" instead
of "char16", I get the message

Error: Invalid argument to pg_alloc().

Please help me with this problem.

     ____________________
 \  / . _   _  _   _  |
  \/ ( ( \ (_ (-' ( \ |

--------------------------------------------------------------------------------
Vincent F. Schenkelaars				|
Company: FEL-TNO                                | Private:
Email  : V.F.Schenkelaars@tnofel.fel.tno.nl	|
address: Oude Waalsdorperweg 63			| Groenhovenstraat 12
         Postbus 96864				|
         2509 JG  Den Haag			| 2311 BT  Leiden
         The Netherlands			| The Netherlands
Phone  : Holland 070-3264221			| Holland 071-125576
Fax    : Holland 070-3280961			|
--------------------------------------------------------------------------------
We apologize for the inconvenience.
