473,385 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

Nov 23 '05 #1
2 7394
On Tue, Oct 05, 2004 at 12:07:11PM +0200, Johann Robette wrote:
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


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

Nov 23 '05 #2
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:mi**@fuhr.org]
Envoyé*: mardi 5 octobre 2004 15:06
À*: Johann Robette
Cc*: pg***********@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:
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


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

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: schaf | last post by:
Hi ! I'm writing a new xsl:function, which uses two other functions. But by the call of the first function, it would be abort just after the call. Not even the xsl:param would be set. I don't...
4
by: strnbrg | last post by:
I'd like to write code that fails to compile if a certain function *does* exist in a 3rd party library. (This is the opposite of the well-known problem of wanting compilation to fail if a certain...
0
by: LordHog | last post by:
Hello all, I would like to use the new SerialPort class in Visual C++ 2005 Express edition, but I am having problems adding my event handler to the DataReceived event. In the header file I have...
5
by: Dmitriy Lapshin [C# / .NET MVP] | last post by:
Hi all, I think the VB .NET compiler should at least issue a warning when a function does not return value. C# and C++ compilers treat this situation as an error and I believe this is the right...
1
by: WStoreyII | last post by:
I am using the following sub but i am getting inaccurate output Public Function Convert(ByVal Base As Integer, ByVal Number As Integer) As Strin D If Not Number / Base = 0 The Convert &=...
1
by: Minx | last post by:
This seems like a cool site, I wish I could have found this sooner. Can someone pls help me with this line of code? I get an error C2660 telling me the function does not take an argument ( The...
4
by: 1965 | last post by:
Hi,All. I want to click a string, then pass the string to asp file, where I use function to get a remote xml file, and then use brower to parse this xml file. But it doe not work. Is the code right?...
1
by: denxx | last post by:
Hi, I am new in C++ and was trying to run a programme where I found an error using the pow statement. Error showed is error C2660: 'pow' : function does not take 1 parameters. As I have a square on...
0
by: Steve Holden | last post by:
dudeja.rajat@gmail.com wrote: You could use one of the URL libraries. The os.path module is for dealing with the local filesystem. The absence of any exception from f =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.