mirror of
https://github.com/postgres/postgres.git
synced 2026-02-13 07:43:11 -05:00
large objects. Dump all these in pg_dump; also add code to pg_dump user-defined conversions. Make psql's large object code rely on the backend for inserting/deleting LOB comments, instead of trying to hack pg_description directly. Documentation and regression tests added. Christopher Kings-Lynne, code reviewed by Tom
31 lines
827 B
SQL
31 lines
827 B
SQL
--
|
|
-- CREATE_AGGREGATE
|
|
--
|
|
|
|
-- all functions CREATEd
|
|
CREATE AGGREGATE newavg (
|
|
sfunc = int4_accum, basetype = int4, stype = _numeric,
|
|
finalfunc = numeric_avg,
|
|
initcond1 = '{0,0,0}'
|
|
);
|
|
|
|
-- test comments
|
|
COMMENT ON AGGREGATE newavg_wrong (int4) IS 'an agg comment';
|
|
COMMENT ON AGGREGATE newavg (int4) IS 'an agg comment';
|
|
COMMENT ON AGGREGATE newavg (int4) IS NULL;
|
|
|
|
-- without finalfunc; test obsolete spellings 'sfunc1' etc
|
|
CREATE AGGREGATE newsum (
|
|
sfunc1 = int4pl, basetype = int4, stype1 = int4,
|
|
initcond1 = '0'
|
|
);
|
|
|
|
-- value-independent transition function
|
|
CREATE AGGREGATE newcnt (
|
|
sfunc = int4inc, basetype = 'any', stype = int4,
|
|
initcond = '0'
|
|
);
|
|
|
|
COMMENT ON AGGREGATE nosuchagg (*) IS 'should fail';
|
|
COMMENT ON AGGREGATE newcnt (*) IS 'an any agg comment';
|
|
COMMENT ON AGGREGATE newcnt (*) IS NULL;
|