Search Postgresql Archives

Re: variable value in array_to_string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please don't top-post - it makes following the thread a lot harder.

On Mon, Nov 21, 2016 at 4:15 PM, Armand Pirvu (home) <armand.pirvu@xxxxxxxxx> wrote:
Played with unnest  but not much luck

If you want help you will need to show your work - ideally with examples that can execute with meaningful data on an empty database.

The follow gives the expected results:

DO $$
DECLARE
foo text[];
foo1 text;
delim text := ',';
begin
foo := ARRAY['one','two']::text[];
foo1 := array_to_string(foo, delim);
RAISE NOTICE '%', foo1;
END;
$$;

NOTICE: one,two

David J.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux