finish yesterday work on rql constraints:
* Fix inheritance pb: there are some places where we filter constraints
according to the class hierarchy, so rql unique constraint should'nt
be neither a RQLContraint nor a RQLVocabularyConstraint subclass.
Added test in unittest_schema reflecting this.
* So now we have to get explicitly RQLUniqueConstraint where desired (eg in
server/hooks.py)
* Update i18ncubicweb command to include constraint types in generated pot file
(this should have been there for a while...)
* Update unittest_schemaserial which has been broken when serializing format
for rql constraints has changed
/* -*- sql -*- postgres specific registered procedures, require the plpgsql language installed */CREATEFUNCTIONcomma_join(anyarray)RETURNStextAS$$SELECTarray_to_string($1,', ')$$LANGUAGESQL;;CREATEAGGREGATEgroup_concat(basetype=anyelement,sfunc=array_append,stype=anyarray,finalfunc=comma_join,initcond='{}');;CREATEFUNCTIONlimit_size(fulltexttext,formattext,maxsizeinteger)RETURNStextAS$$DECLAREplaintexttext;BEGINIFchar_length(fulltext)<maxsizeTHENRETURNfulltext;ENDIF;IFformat='text/html'ORformat='text/xhtml'ORformat='text/xml'THENplaintext:=regexp_replace(fulltext,'<[\\w/][^>]+>','','g');ELSEplaintext:=fulltext;ENDIF;IFchar_length(plaintext)<maxsizeTHENRETURNplaintext;ELSERETURNsubstring(plaintextfrom1formaxsize)||'...';ENDIF;END$$LANGUAGEplpgsql;;CREATEFUNCTIONtext_limit_size(fulltexttext,maxsizeinteger)RETURNStextAS$$BEGINRETURNlimit_size(fulltext,'text/plain',maxsize);END$$LANGUAGEplpgsql;;