| От | Tom Lane |
|---|---|
| Тема | Re: Select into table%ROWTYPE failed |
| Дата | |
| Msg-id | 16266.1537290626@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Select into table%ROWTYPE failed (marcelo <marcelo.nicolet@gmail.com>) |
| Ответы |
Re: Select into table%ROWTYPE failed
|
| Список | pgsql-general |
marcelo <marcelo.nicolet@gmail.com> writes:
> What was wrong in the first approach?
plpgsql's "SELECT INTO" expects a one-for-one match between the output
columns of the SELECT and the columns of the INTO destination. So I'd
expect something like this to work:
DECLARE
ranger billnumberrange%ROWTYPE;
BEGIN
SELECT * FROM billnumberrange WHERE ... INTO ranger;
Your example clearly wasn't selecting all the columns, and it
wasn't clear whether you paid any attention to column ordering;
but both of those matter.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера