Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 23rd, 2005, 02:24 AM
Johann Robette
Guest
 
Posts: n/a
Default Function array_to_string(text[], text) does not exist ???

Hi,

I'm trying to call the array_to_string function like this :
SELECT array_to_string(array[1, 2, 3], '~^~') --> it comes
directly from the doc.
I get this error msg :
ERROR: parser: parse error at or near "[" at character 24

So I tried this way
SELECT array_to_string('{1, 2, 3}', '~^~')
I get this error msg :
ERROR: Function array_to_string("unknown", "unknown") does
not exist
Unable to identify a function that satisfies the given argument
types
You may need to add explicit typecasts

So I tried to cast it
SELECT array_to_string(CAST('{1, 2, 3}' AS _int8),
CAST('~^~' AS text))
I get this error msg :
ERROR: Function array_to_string(bigint[], text) does not
exist
Unable to identify a function that satisfies the given argument
types
You may need to add explicit typecasts

Any help would be greatly appreciated.

Thanks



  #2  
Old November 23rd, 2005, 02:24 AM
Michael Fuhr
Guest
 
Posts: n/a
Default Re: Function array_to_string(text[], text) does not exist ???

On Tue, Oct 05, 2004 at 12:07:11PM +0200, Johann Robette wrote:
[color=blue]
> I'm trying to call the array_to_string function like this :
> SELECT array_to_string(array[1, 2, 3], '~^~') --> it comes
> directly from the doc.
> I get this error msg :
> ERROR: parser: parse error at or near "[" at character 24[/color]

What version of PostgreSQL are you running? According to the Release
Notes, array constructors and array_to_string() were added in 7.4.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

  #3  
Old November 23rd, 2005, 02:24 AM
Johann Robette
Guest
 
Posts: n/a
Default RE : Function array_to_string(text[], text) does not exist ???

Ok, that must be it.
In fact I was originally using 7.3 but I thought that we've upgraded to
7.4 but apparently note.

What I would do is upgrade it and it should work...

Thanls

-----Message d'origine-----
De*: Michael Fuhr [mailto:mike@fuhr.org]
Envoyé*: mardi 5 octobre 2004 15:06
À*: Johann Robette
Cc*: pgsql-general@postgresql.org
Objet*: Re: [GENERAL] Function array_to_string(text[], text) does not
exist ???

On Tue, Oct 05, 2004 at 12:07:11PM +0200, Johann Robette wrote:
[color=blue]
> I'm trying to call the array_to_string function like this :
> SELECT array_to_string(array[1, 2, 3], '~^~') --> it comes
> directly from the doc.
> I get this error msg :
> ERROR: parser: parse error at or near "[" at character 24[/color]

What version of PostgreSQL are you running? According to the Release
Notes, array constructors and array_to_string() were added in 7.4.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles