Stored procedure support in Postgresql #1870
              
                
                  
                  
                    Answered
                  
                  by
                    mhalavanja
                  
              
          
                  
                    
                      mhalavanja
                    
                  
                
                  asked this question in
                Q&A
              
            -
| Hi, I am sorry if this is already answered somewhere or sth, but I was searching for half an hour and didn't find it. Is there a way to have custom stored procedures (or functions) with type safe GO code generated? | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            mhalavanja
          
      
      
        Oct 22, 2022 
      
    
    Replies: 1 comment
-
| This is actually what I was looking for https://docs.sqlc.dev/en/stable/howto/named_parameters.html and I will just leave it here if someone will be looking for simmilar question. This works just fine for stored procedures in Postgres: -- name: TryDeleteGroup :exec | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        mhalavanja
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
This is actually what I was looking for https://docs.sqlc.dev/en/stable/howto/named_parameters.html and I will just leave it here if someone will be looking for simmilar question. This works just fine for stored procedures in Postgres:
-- name: TryDeleteGroup :exec
CALL tryDeleteGroup(@group_id::bigint, @user_id::bigint);