Re: Acccessing individual array elements form plpgsql
| От | Tom Lane |
|---|---|
| Тема | Re: Acccessing individual array elements form plpgsql |
| Дата | |
| Msg-id | 5984.1110581209@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Acccessing individual array elements form plpgsql ("Celia McInnis" <celia@drmath.ca>) |
| Ответы |
Re: Acccessing individual array elements form plpgsql
|
| Список | pgsql-novice |
"Celia McInnis" <celia@drmath.ca> writes:
> but how do I access members of this array individually??? I'd love it if
> direction[1] would pull out the 2nd or 1st element so that I could use it in
> the selects which my procedure is forming, but I get syntax errors when I try
> to reference the array element in such a way. For example:
> RAISE NOTICE '%',direction[1];
> ERROR: syntax error at or near "[" at character ####
The RAISE statement is pretty limited: it won't take a general
expression as an argument, only a bare variable name. But you should be
able to subscript direction in other contexts. If you really need to
put out a notice using this value, assign it to a temporary variable ...
regards, tom lane
В списке pgsql-novice по дате отправления: