Re: How do I create an array?
От | Tom Lane |
---|---|
Тема | Re: How do I create an array? |
Дата | |
Msg-id | 9474.1044509071@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | How do I create an array? (Greg Stark <gsstark@mit.edu>) |
Ответы |
Re: How do I create an array?
|
Список | pgsql-general |
Greg Stark <gsstark@mit.edu> writes: > There must be something like the point() function for arrays, no? Not in general --- how would you declare the input and result types of such a function? Unless you make a bespoke function for every array-element datatype, there's no evident way to declare it in Postgres' type system. It would be useful to have something like that, but AFAICS it would take inventing some specialized SQL syntax construct to do it. Which no one has gotten around to defining, let alone implementing. (Ideas welcome, though.) IIRC, pltcl has some reasonably convenient facilities for creating SQL arrays based on translation from Tcl arrays. Also, I'll bet that Joe Conway's upcoming plr makes it just as easy as pie (once you learn R, anyway). But plain SQL and plpgsql don't really have much to fall back on to support such things. regards, tom lane
В списке pgsql-general по дате отправления: