Skip to content

How to use select in storage policy? #2220

Answered by wwsalmon
wwsalmon asked this question in Questions
Discussion options

You must be logged in to vote

Renamed my user table to app_user and now the following code works

(
  (storage.foldername(name)) [ 1 ] = (
    SELECT
      app_user.username
    FROM
      app_user
    WHERE
      ((app_user.uuid):: text = (uid()):: text)
  )
)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by wwsalmon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant