> 'conversation_id')::uuid = conversation_id );"> > 'conversation_id')::uuid = conversation_id );"> > 'conversation_id')::uuid = conversation_id );">
create policy "select_messages_in_conversation" on public.messages for
select
to authenticated using (
(auth.jwt () ->> 'conversation_id')::uuid = conversation_id
);
运算符 | 类型 | 说明 |
---|---|---|
-> |
JSON | 提取 JSON 对象或数组元素,返回 JSON 类型 |
->> |
Text | 提取 JSON 字段的文本值,返回 Text 类型 |