How do I create an array? - Mailing list pgsql-general

From Greg Stark
Subject How do I create an array?
Date
Msg-id 87y94u2ejt.fsf@stark.dyndns.tv
Whole thread Raw
Responses Re: How do I create an array?
List pgsql-general
I'm trying to create a function that operates on integer[]. It works great if
I have an integer[] column already in the table. However I don't see how to
create an array dynamically given two integers.

I could paste together a string representation and then cast it back using
something like ('{'||a||','||b||'}')::integer[] but that seems terribly
wasteful. And it doesn't seem to work anyways.

There must be something like the point() function for arrays, no? I'm probably
missing something obvious or looking in the wrong place? I just don't see it.

--
greg

pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: not exactly a bug report, but surprising behaviour
Next
From: Tom Lane
Date:
Subject: Re: not exactly a bug report, but surprising behaviour