... ... ...
now if i a selecting the array as
-
select sequence from foo where...
-
then result which i get is not an array and i want it as an array
and i don't have to use
option
What you get back looks like a string representation of an array:
-
testdb=# SELECT sequence FROM tt2 WHERE x = 1;
-
sequence
-
-------------
-
{1,2,3,4,5}
-
(1 row)
-
If what you want is to initialize some local array variable to the result returned by the query, then it is up to you to do it, database has nothing to do with this, although you can obviously format the return value using array functions; for example you can remove the curly braces, change the default delimiter, etc.
You can find some useful information on arrays here:
Arrays Array Functions and Operators
If this is not what you're trying to do, then clarify your question.