SQL99 ARRAY support proposal
От | Joe Conway |
---|---|
Тема | SQL99 ARRAY support proposal |
Дата | |
Msg-id | 3E6ABB18.6080108@joeconway.com обсуждение исходный текст |
Ответы |
Re: SQL99 ARRAY support proposal
|
Список | pgsql-hackers |
I'd like to implement SQL99/200x ARRAY support (well, at least the basics). Does anyone have objections to the following grammar/semantics? =========================================================== Per SQL200x - examples =========================================================== create table foo(f1 integer ARRAY[3]); result same as create table foo(f1 integer[3]); the 3 really does nothing (thisdeviates from spec but is same as current implementation) create table foo(f1 integer ARRAY); result same as create table foo(f1 integer[]); select ARRAY[1,2,3]; result '{1,2,3}' select ARRAY[(select oid from pg_class order by relname)]; result is array of all the oid's in pg_class in relname order select ARRAY[1,2] || 3 result '{1,2,3}' select ARRAY[1,2] || ARRAY[3,4] result '{1,2,3,4}' =========================================================== Proposed PostgreSQL extensions =========================================================== select ARRAY[[1,2,3], [4,5,6]]; result '{{1,2,3},{4,5,6}}' select ARRAY[[1,2],[3,4]] || 5 result '{{1},{3},{5}}' select ARRAY[[1,2],[3,4]] || [5,6] result '{{1,2},{3,4},{5,6}}' use UNION's algorithm for deriving the element type when not specified Comments, suggestions, objections? Thanks, Joe
В списке pgsql-hackers по дате отправления: