Default database for Postgres scripts?
I'd like to be able to provide a defined resource as a default value for the Database input on a Postrgres script. It doesn't seem possible within the script itself (database seems to be a required input, and I can't seem to configure a default value).
I've tried to use an App to call the script, and I'm able to provide the default value, but see this error when I try to run:
"Bad request: For security reasons, variable or resource access is not allowed as dynamic argument"
Is there any way to provide a default resource for a postgres script/app? Ideally, app users won't need to know/provide the resource that they are executing against.3 Replies
Hi, if the user only has a single resource available of pg type, it will be automatically selected. Otherwise you will have to use a typescript/python script and use getResource to "pin" the resource.
Got it, thanks. I'm guessing that means the only way to hide the resource altogether is to use a typescript/python script, rather than a direct postgres script?
yes