aonestar
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
sp_get_photo_user_guest_document
Parameters
Name
Type
Mode
p_data
jsonb
IN
o_photo_url
text
OUT
o_image_url
text
OUT
Definition
declare v_result json; v_msg_text text; v_sqlstate text; v_detail text; v_hint text; v_context text; v_guest_doc_id int; v_guest_doc_record record; begin v_guest_doc_id:=(p_data ->> 'guest_doc_id')::int4; -- presign สดจาก path (V20260704.10.1) — row เก่าที่มีแต่ URL ใช้ cached ต่อ select fn_presign_or_cached(gd.photo_path, gd.photo_url), fn_presign_or_cached(gd.image_path, gd.image_url) into o_photo_url, o_image_url from guest_document gd where gd.id = v_guest_doc_id limit 1; if not found then o_photo_url:=null; o_image_url:=null; end if; return; end;