Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 8B6D012A65BB for ; Sat, 2 Jun 2012 14:21:51 -0300 (ADT) Received: from mail-pz0-f46.google.com ([209.85.210.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Sas1M-00060r-EQ for pgsql-general@postgresql.org; Sat, 02 Jun 2012 17:21:50 +0000 Received: by dady13 with SMTP id y13so4099942dad.19 for ; Sat, 02 Jun 2012 10:21:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:x-mailer:content-transfer-encoding:mime-version :x-gm-message-state; bh=PGKEnTKhwtsqZOGeGUwuGrmSNGGU1wcD3YYRoXOlMZw=; b=fApvUkgvZvJFYDGX5h745hFA2yjlcXYEnUYH7A6g9LNPPm3/koQf4sDQemDSr2tuaS D/bZYk38pFBkI7g7pzUsqpa+TrRuldhy96aOXe+SubXxYKZrQj7LFYrsSANI3ZMWf7Mr 87FKmQsqr5ZlPcSHfU3qV46+CWuUNtQ0qK+ak5i5GVUr0tOCZFJUzhrLqPxRgUX7YBnN Fr2/n8mHD5+bepkAn5Rt+krK7Tev6ajazPCUcFIacyacy/7aaajVnIBhWKAsIuFB4weT kEaprcFMB06UIhgTER6dlyMMGjxLESbOsSZ0N/+tV4rI5K78l+TCxq1+tQGfFqPsDDZy 2Acg== Received: by 10.68.228.170 with SMTP id sj10mr22030344pbc.106.1338657694560; Sat, 02 Jun 2012 10:21:34 -0700 (PDT) Received: from [192.168.1.101] (c-69-181-249-16.hsd1.ca.comcast.net. [69.181.249.16]) by mx.google.com with ESMTPS id jv6sm6874890pbc.40.2012.06.02.10.21.33 (version=SSLv3 cipher=OTHER); Sat, 02 Jun 2012 10:21:33 -0700 (PDT) Message-ID: <1338657695.27686.7.camel@jdavis> Subject: Re: [PERFORM] Array fundamentals From: Jeff Davis To: idc danny Cc: pgsql-general@postgresql.org Date: Sat, 02 Jun 2012 10:21:35 -0700 In-Reply-To: <1338656730.99764.YahooMailNeo@web110416.mail.gq1.yahoo.com> References: <4FC7F0DB.40600@atlassian.com> <4FC7F844.8070205@atlassian.com> <4FC80000.2000900@atlassian.com> <4FC8862B.70103@gmail.com> <1338656730.99764.YahooMailNeo@web110416.mail.gq1.yahoo.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.2- Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-Gm-Message-State: ALoCoQlAi7eW6LWPdn8x+w27HGNt0X9l8xr6M1ZTL51f39ONmHtCKdZ4yy8jSKhfBPaS0fqb8ju4 X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201206/27 X-Sequence-Number: 187807 On Sat, 2012-06-02 at 10:05 -0700, idc danny wrote: > Now, if I want do do the following: > select CombineStrings(ARRAY[SplitString2Array("SomeTextColumn"), 'New > string to add']) from "SomeTable" > > i get the following error: > array value must start with "{" or dimension information This discussion is better suited to another list, like -general, so I'm moving it there. In the fragment: ARRAY[SplitString2Array("SomeTextColumn"), 'New string to add'] The first array element is itself an array of strings, but the second is a plain string. Array elements must all be the same type. What you want to do is replace that fragment with something more like: array_append(SplitString2Array("SomeTextColumn"), 'New string to add') If that still doesn't work, we'll need to see the exact definitions of your functions. Also, as a debugging strategy, I recommend that you look at the pieces that do work, and slowly build up the fragments until it doesn't work. That will allow you to see the inputs to each function, and it makes it easier to see why it doesn't work. Regards, Jeff Davis