Hi friends! I'm working in a trigger and I need to put the result of a query into a variable. That's very easy- apparently! The query has a aggregate function like this: select sum(field) into variable ... and I'm sure that field and variable are int4 type. So, when I run this trigger there is a mistake: ''there is no operator '=$' for types 'int4' and 'int4' you will either have to retype this query using an explicit cast, or you will have to define the operator using CREATE OPERATOR'' what's meaning this? and how can I assign the result of aggregate function into a variable? (My system is 6.5.3)
jreniz writes: > ''there is no operator '=$' for types 'int4' and 'int4' It seems you need to put a space into a construct of the sort 'x = $1'. -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера