X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E1ECE52901 for ; Tue, 2 Aug 2005 05:40:39 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 34881-02 for ; Tue, 2 Aug 2005 08:40:31 +0000 (GMT) Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by svr1.postgresql.org (Postfix) with ESMTP id 722BE52EC9 for ; Tue, 2 Aug 2005 05:40:30 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 0C0DF3098C; Tue, 2 Aug 2005 10:48:57 +0200 (MET DST) From: Kuba Ouhrabka X-Newsgroups: pgsql.interfaces Subject: ecpg: arrays and nulls Date: Tue, 02 Aug 2005 10:40:23 +0200 Organization: Hub.Org Networking Services Lines: 15 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1250; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: cs, en-us, en To: pgsql-interfaces@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200508/1 X-Sequence-Number: 5672 Hi, I'd like to ask how to handle null values when fetching arrays into ecpg. Always I get this error: Data read from backend is not an array in line ... I'm using indicators and I use char * variables for array values (for all column types: int[], text[], bytea[]). It works when the value of array is not null but when it's null I get the error above. Can null values in columns of array type be handled in more convenient way than using coalesce/nullif and special reserved value? Thanks, Kuba