pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: idc danny <idcdanny@yahoo.com>
Cc: pgsql-general@postgresql.org
Subject: Re: [PERFORM] Array fundamentals
Date: Sat, 02 Jun 2012 10:21:35 -0700
Message-ID: <1338657695.27686.7.camel@jdavis> (raw)
In-Reply-To: <1338656730.99764.YahooMailNeo@web110416.mail.gq1.yahoo.com>
References: <4FC7F0DB.40600@atlassian.com>
	<CAFwQ8rcEyUyhyUHrhQRzJk=DRVYhZT9-mJmvKAPoD8+8_NWG5g@mail.gmail.com>
	<4FC7F844.8070205@atlassian.com>
	<CAFwQ8rf89H+BCvua_EnjtPPK1onrxUA_mMDA8nr9hd5VgQvtcA@mail.gmail.com>
	<4FC80000.2000900@atlassian.com>
	<4FC8862B.70103@gmail.com>
	<1338656730.99764.YahooMailNeo@web110416.mail.gq1.yahoo.com>

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




view thread (3+ messages)  latest in thread

Message-ID: <1338657695.27686.7.camel@jdavis>
Permalink:  ../1338657695.27686.7.camel@jdavis/
Also on:    postgresql.org/message-id/1338657695.27686.7.camel@jdavis

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pgsql@j-davis.com, idcdanny@yahoo.com, pgsql-general@postgresql.org
  Subject: Re: [PERFORM] Array fundamentals
  In-Reply-To: <1338657695.27686.7.camel@jdavis>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox