-- value-independent transition function CREATE AGGREGATE newcnt ( sfunc = int4inc, basetype = 'any', stype = int4, initcond = '0' ); COMMENT ON AGGREGATE newcnt (any) IS 'an any agg comment'; ERROR: syntax error at or near "any" at character 30 COMMENT ON AGGREGATE newcnt (any) IS NULL; ERROR: syntax error at or near "any" at character 30 Is there any way of commenting that aggregate? Chris
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> COMMENT ON AGGREGATE newcnt (any) IS 'an any agg comment';
> ERROR: syntax error at or near "any" at character 30
ANY is a reserved word. To reference the pseudotype named "any",
you need quotes:COMMENT ON AGGREGATE newcnt ("any") IS 'an any agg comment';
No doubt it would've been better to use a different name for the
pseudotype, but I think the behavior of CREATE AGGREGATE's
"basetype = 'any'" was chosen long before there was any thought of
making Postgres SQL-compliant :-(
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера