word: identify rows by id number
[sheet.git] / tools / word.pg.sql
index 3a0f158b5124f6dcd2d26590c61955ca4224471d..3c05c3865b6405ca4d00330d826053b67a65df18 100644 (file)
@@ -42,7 +42,8 @@ COMMENT ON COLUMN word.creator    IS 'user responsible for initial submit';
 
 CREATE OR REPLACE FUNCTION exportform(word) RETURNS text AS $$
        SELECT concat(
-               $1.prio || CASE WHEN $1.cover THEN 'c' ELSE '' END || ':',
+               $1.id, ':',
+               $1.prio, CASE WHEN $1.cover THEN 'c' ELSE '' END, ':',
                array_to_string($1.form || $1.alt, '/')
        );
 $$ LANGUAGE SQL IMMUTABLE;