pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
function array_to_string(text[]) does not exist
3+ messages / 3 participants
[nested] [flat]

* function array_to_string(text[]) does not exist
@ 2013-08-25 12:15 Victor Sterpu <victor@caido.ro>
  2013-08-25 12:33 ` Re: function array_to_string(text[]) does not exist Jov <amutu@amutu.com>
  2013-08-25 13:18 ` Re: function array_to_string(text[]) does not exist Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Victor Sterpu @ 2013-08-25 12:15 UTC (permalink / raw)
  To: pgsql-sql

Hello

When I run :
SELECT array_to_string(array_agg(CONCAT(CAST (ltrv1.val_min AS CHAR), 
'-', CAST(ltrv1.val_max AS CHAR), ' ', ltrv1.comentarii)))
FROM lab_tests_reference_values ltrv1
GROUP BY ltrv1.val_min, ltrv1.val_max, ltrv1.comentarii;

I get the error:
ERROR:  function array_to_string(text[]) does not exist
LINE 1: SELECT array_to_string(array_agg(CONCAT(CAST (ltrv1.val_min ...
                ^
HINT:  No function matches the given name and argument types. You might 
need to add explicit type casts.

I tryed to cast but it's still not working.

Thanku you.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: function array_to_string(text[]) does not exist
  2013-08-25 12:15 function array_to_string(text[]) does not exist Victor Sterpu <victor@caido.ro>
@ 2013-08-25 12:33 ` Jov <amutu@amutu.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Jov @ 2013-08-25 12:33 UTC (permalink / raw)
  To: Victor Sterpu <victor@caido.ro>; +Cc: pgsql-sql

Yes,array_to_string(text[]) does not exist.
This from the doc may help:
 array_to_string(anyarray,text [, text]) text concatenates array elements
using supplied delimiter and optional null stringarray_to_string(ARRAY[1,
2, 3, NULL, 5], ',', '*') 1,2,3,*,5

Jov
blog: http:amutu.com/blog <http://amutu.com/blog;


2013/8/25 Victor Sterpu <victor@caido.ro>

>  Hello
>
> When I run :
> SELECT array_to_string(array_agg(CONCAT(CAST (ltrv1.val_min AS CHAR), '-',
> CAST(ltrv1.val_max AS CHAR), ' ', ltrv1.comentarii)))
> FROM lab_tests_reference_values ltrv1
> GROUP BY ltrv1.val_min, ltrv1.val_max, ltrv1.comentarii;
>
> I get the error:
> ERROR:  function array_to_string(text[]) does not exist
> LINE 1: SELECT array_to_string(array_agg(CONCAT(CAST (ltrv1.val_min ...
>                ^
> HINT:  No function matches the given name and argument types. You might
> need to add explicit type casts.
>
> I tryed to cast but it's still not working.
>
> Thanku you.
>
> *DISCLAIMER:
> Acest mesaj de posta electronica si documentele aferente sunt
> confidentiale. Este interzisa distribuirea, dezvaluirea sau orice alt mod
> de utilizare a lor. Daca nu sunteti destinatarul acestui mesaj, este
> interzis sa actionati in baza acestor informatii. Citirea, copierea,
> distribuirea, dezvaluirea sau utilizarea in alt mod a informatiei continute
> in acest mesaj constituie o incalcare a legii. Daca ati primit mesajul din
> greseala, va rugam sa il distrugeti, anuntand expeditorul de eroarea
> comisa. Intrucat nu poate fi garantat faptul ca posta electronica este un
> mod sigur si lipsit de erori de transmitere a informatiilor, este
> responsabilitatea dvs. sa va asigurati ca mesajul (inclusiv documentele
> alaturate lui) este validat si autorizat spre a fi utilizat in mediul dvs.
> *
>
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: function array_to_string(text[]) does not exist
  2013-08-25 12:15 function array_to_string(text[]) does not exist Victor Sterpu <victor@caido.ro>
@ 2013-08-25 13:18 ` Pavel Stehule <pavel.stehule@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Pavel Stehule @ 2013-08-25 13:18 UTC (permalink / raw)
  To: Victor Sterpu <victor@caido.ro>; +Cc: pgsql-sql

Hello

you should to enter separator

postgres=# select array_to_string(ARRAY[1,2,3,4], '|');
 array_to_string
─────────────────
 1|2|3|4
(1 row)

Regards

Pavel Stehule



2013/8/25 Victor Sterpu <victor@caido.ro>

>  Hello
>
> When I run :
> SELECT array_to_string(array_agg(CONCAT(CAST (ltrv1.val_min AS CHAR), '-',
> CAST(ltrv1.val_max AS CHAR), ' ', ltrv1.comentarii)))
> FROM lab_tests_reference_values ltrv1
> GROUP BY ltrv1.val_min, ltrv1.val_max, ltrv1.comentarii;
>
> I get the error:
> ERROR:  function array_to_string(text[]) does not exist
> LINE 1: SELECT array_to_string(array_agg(CONCAT(CAST (ltrv1.val_min ...
>                ^
> HINT:  No function matches the given name and argument types. You might
> need to add explicit type casts.
>
> I tryed to cast but it's still not working.
>
> Thanku you.
>
> *DISCLAIMER:
> Acest mesaj de posta electronica si documentele aferente sunt
> confidentiale. Este interzisa distribuirea, dezvaluirea sau orice alt mod
> de utilizare a lor. Daca nu sunteti destinatarul acestui mesaj, este
> interzis sa actionati in baza acestor informatii. Citirea, copierea,
> distribuirea, dezvaluirea sau utilizarea in alt mod a informatiei continute
> in acest mesaj constituie o incalcare a legii. Daca ati primit mesajul din
> greseala, va rugam sa il distrugeti, anuntand expeditorul de eroarea
> comisa. Intrucat nu poate fi garantat faptul ca posta electronica este un
> mod sigur si lipsit de erori de transmitere a informatiilor, este
> responsabilitatea dvs. sa va asigurati ca mesajul (inclusiv documentele
> alaturate lui) este validat si autorizat spre a fi utilizat in mediul dvs.
> *
>
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2013-08-25 13:18 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-08-25 12:15 function array_to_string(text[]) does not exist Victor Sterpu <victor@caido.ro>
2013-08-25 12:33 ` Jov <amutu@amutu.com>
2013-08-25 13:18 ` Pavel Stehule <pavel.stehule@gmail.com>

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