You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The suggested solution is quite clever indeed. I've been thinking a bit how to approach this with a bit more straightforward solution and without shell hacks, and found out possibility to get an env variable value this way:
However, I'm not sure whether this way is safe from the SQL injection perspective - something worth re-checking on postgresql forum?
Another way would be to install python3-psycopg2 and write a simple python script that would do what we need -- installing it into the container would only be a few hundreds of kB more.
Activity
pkubatrh commentedon Apr 24, 2024
Thanks for the report. This makes sense to fix. Let's take a look.
hhorak commentedon Sep 4, 2024
The suggested solution is quite clever indeed. I've been thinking a bit how to approach this with a bit more straightforward solution and without shell hacks, and found out possibility to get an env variable value this way:
However, I'm not sure whether this way is safe from the SQL injection perspective - something worth re-checking on postgresql forum?
Another way would be to install
python3-psycopg2and write a simple python script that would do what we need -- installing it into the container would only be a few hundreds of kB more.