| От | SunWuKung |
|---|---|
| Тема | pgsql variables from records |
| Дата | |
| Msg-id | MPG.1e84aadb627fe18a98968e@news.postgresql.org обсуждение исходный текст |
| Ответы |
Re: pgsql variables from records
|
| Список | pgsql-general |
I have a table in which I am storing parameters that I would like to use as variables in a pgsql procedure. Currently I find no other way to refer to these than to assign each record to a variable by a separate query like this: Declare max_option integer; Select Into max_option parameter_value From parameters Where methodid= 999 And parameter_name='max_option' and so on for each parameter. Is there a way to get all these parameters into one variable in pgsql - eg. Select Into paramarray(param_name, param_value) parameter_name, parameter_value Where methodid=999 - and refer to their values in a simple way like param_array.max_option ? Thanks for the help. Balázs
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера