Re: SQL99 ARRAY support proposal

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: SQL99 ARRAY support proposal
Дата
Msg-id Pine.LNX.4.44.0303131721500.1617-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: SQL99 ARRAY support proposal  (Joe Conway <mail@joeconway.com>)
Ответы Re: SQL99 ARRAY support proposal  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: SQL99 ARRAY support proposal  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
OK, let's look at these more closely:

>  >>      array_push(anyarray, anyelement) returns anyarray

The standard spelling for that appears to be   somearray || ARRAY[element]
which also has the nice property that it is commutative.

>  >>      array_pop(anyarray) returns anyelement

That appears to mean that you return somearray[0] and alter the array as a
side effect.  How do you plan to do that?

>  >>      array_subscript(anyarray, int) yields anyelement

That's just somearray[x], no?

>  >>      singleton_array(anyelement) returns anyarray

That's ARRAY[element].

>  >>      split(text, text) returns text[]
>  >>         - split string into array on delimiter
>  >>      implode(text[], text) returns text
>  >>         - join array elements into a string using given string delimiter

I can live with these, but perhaps we should choose some not-so-generic
names.

-- 
Peter Eisentraut   peter_e@gmx.net



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christoph Haller
Дата:
Сообщение: Re: [SQL] What's wrong with this group by clause?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] What's wrong with this group by clause?