| От | Szálka Tamás |
|---|---|
| Тема | plpgsql - accessing fields of record type |
| Дата | |
| Msg-id | 4156EB3D.3070805@freestart.hu обсуждение исходный текст |
| Ответы |
Re: plpgsql - accessing fields of record type
|
| Список | pgsql-sql |
Hi! I'd like to ask whether it is possible to access fields of record type variable in plpgsql in the following way: I have a table with field named "XY_1", "XY_2", ... "XY_255". I want to access the values in the table from a plpgsql function somehow in a loop with the iterative variable. Can I address the appropriate ''XY_'' || loopvariable field with the help of the loop variable? If I can, what is the syntax of this? Sorry, I've read through the documentation, but haven't find any solution. I have thought of an alternative solution: can plpgsql convert a record type into array? (Then I could address the field value with the nth element of the array) Thanks for your help tomasz
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера