roi
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
foto_url(uuid, text, text)
Parameters
Name
Type
Mode
_uuid
uuid
IN
_schema
text
IN
_mime
text
IN
Definition
DECLARE _base_url TEXT; _ext TEXT; BEGIN EXECUTE 'SET search_path TO ' || _schema || ', app_geo, roi, public'; _base_url := (SELECT waarde FROM roi.configuratie WHERE sleutel = 'bijlage-base-url'); IF _uuid IS NOT NULL AND _base_url <> '' THEN _ext = CASE _mime WHEN 'application/pdf' THEN '.pdf' WHEN 'image/jpeg' THEN '.jpg' WHEN 'image/png' THEN '.png' ELSE '.jpg' END; RETURN CONCAT(_base_url, _schema, '/', _uuid, _ext); ELSE RETURN NULL; END IF; END;