Hello
I am thinking about allowing 2D array from multicolumn subselect (all
columns have to share same type, ofcourse). Is there some real limit,
why this functionality is disallowed?
Regards
Pavel Stehule
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to
On Tue, Nov 18, 2008 at 10:06 AM, Pavel Stehule [EMAIL PROTECTED] wrote:
Hello
I am thinking about allowing 2D array from multicolumn subselect (all
columns have to share same type, ofcourse). Is there some real limit,
why this functionality is disallowed?
Seems like you could just write
On Tue, Nov 18, 2008 at 10:29:53AM -0500, Robert Haas wrote:
On Tue, Nov 18, 2008 at 10:06 AM, Pavel Stehule [EMAIL PROTECTED] wrote:
Hello
I am thinking about allowing 2D array from multicolumn subselect
(all columns have to share same type, ofcourse). Is there some
real limit, why
On Tue, Nov 18, 2008 at 07:37:44AM -0800, David Fetter wrote:
On Tue, Nov 18, 2008 at 10:29:53AM -0500, Robert Haas wrote:
Seems like you could just write SELECT ARRAY[col1, col2, col3]
instead of SELECT col1, col2, col3.
If I understand this right, Pavel is thinking that
2008/11/18 David Fetter [EMAIL PROTECTED]:
On Tue, Nov 18, 2008 at 10:29:53AM -0500, Robert Haas wrote:
On Tue, Nov 18, 2008 at 10:06 AM, Pavel Stehule [EMAIL PROTECTED] wrote:
Hello
I am thinking about allowing 2D array from multicolumn subselect
(all columns have to share same type,
2008/11/18 Sam Mason [EMAIL PROTECTED]:
On Tue, Nov 18, 2008 at 07:37:44AM -0800, David Fetter wrote:
On Tue, Nov 18, 2008 at 10:29:53AM -0500, Robert Haas wrote:
Seems like you could just write SELECT ARRAY[col1, col2, col3]
instead of SELECT col1, col2, col3.
If I understand this right,
On Tue, Nov 18, 2008 at 05:20:27PM +0100, Pavel Stehule wrote:
2008/11/18 Sam Mason [EMAIL PROTECTED]:
I've used this syntax before and got a surprising message back. I'd
expect to be able to do the following:
ARRAY((SELECT col1, col2 FROM (VALUES ('a',1), ('b',2)) x(col1,col2)));
On Tue, Nov 18, 2008 at 05:19:12PM +0100, Pavel Stehule wrote:
there are some not necessary limits, because we should some operations:
postgres=# select array(select * from foo);
ERROR: subquery must return only one column
LINE 1: select array(select * from foo);
The current limitation
2008/11/18 Sam Mason [EMAIL PROTECTED]:
On Tue, Nov 18, 2008 at 05:19:12PM +0100, Pavel Stehule wrote:
there are some not necessary limits, because we should some operations:
postgres=# select array(select * from foo);
ERROR: subquery must return only one column
LINE 1: select array(select
2008/11/18 Sam Mason [EMAIL PROTECTED]:
On Tue, Nov 18, 2008 at 05:20:27PM +0100, Pavel Stehule wrote:
2008/11/18 Sam Mason [EMAIL PROTECTED]:
I've used this syntax before and got a surprising message back. I'd
expect to be able to do the following:
ARRAY((SELECT col1, col2 FROM
Sam Mason [EMAIL PROTECTED] writes:
I've used this syntax before and got a surprising message back. I'd
expect to be able to do the following:
ARRAY((SELECT col1, col2 FROM (VALUES ('a',1), ('b',2)) x(col1,col2)));
and get the following back {(a,1),(b,2)}. So I think I'm with
David.
I
2008/11/18 Tom Lane [EMAIL PROTECTED]:
Sam Mason [EMAIL PROTECTED] writes:
I've used this syntax before and got a surprising message back. I'd
expect to be able to do the following:
and get the following back {(a,1),(b,2)}. So I think I'm with
David.
I concur --- if we support something
On Tue, Nov 18, 2008 at 06:55:26PM +0100, Pavel Stehule wrote:
2008/11/18 Sam Mason [EMAIL PROTECTED]:
On Tue, Nov 18, 2008 at 05:20:27PM +0100, Pavel Stehule wrote:
2008/11/18 Sam Mason [EMAIL PROTECTED]:
I've used this syntax before and got a surprising message back. I'd
expect to be
2008/11/18 Sam Mason [EMAIL PROTECTED]:
On Tue, Nov 18, 2008 at 06:55:26PM +0100, Pavel Stehule wrote:
2008/11/18 Sam Mason [EMAIL PROTECTED]:
On Tue, Nov 18, 2008 at 05:20:27PM +0100, Pavel Stehule wrote:
2008/11/18 Sam Mason [EMAIL PROTECTED]:
I've used this syntax before and got a
On Tue, Nov 18, 2008 at 06:22:21PM +, Sam Mason wrote:
I've always been taught to design things so that the that the basic
semantics should be as simple as possible which maintaining useful
this should of course be while! ^
performance.
CREATE FUNCTION
Pavel Stehule [EMAIL PROTECTED] writes:
there are clean rules. you do array from input - when input is 1D
array, then result is 2D array, when input is record, then result is
1D array of record. Where should be problem?
That seems all right, but it's *not* what you first proposed, and
what you
2008/11/18 Sam Mason [EMAIL PROTECTED]:
On Tue, Nov 18, 2008 at 06:22:21PM +, Sam Mason wrote:
I've always been taught to design things so that the that the basic
semantics should be as simple as possible which maintaining useful
this should of course be while! ^
On Tue, Nov 18, 2008 at 07:32:33PM +0100, Pavel Stehule wrote:
2008/11/18 Sam Mason [EMAIL PROTECTED]:
this is what I think you want to do in the context of aggregates:
CREATE FUNCTION array_concat_(ANYARRAY,ANYARRAY) RETURNS ANYARRAY
AS $$ SELECT array_cat($1,ARRAY[$2]); $$
18 matches
Mail list logo