How to execute a random postgresql-query.

someone someone at somewhere.com
Tue Jun 29 17:57:28 UTC 2021


On Monday, 28 June 2021 at 19:16:40 UTC, Alain De Vos wrote:
> How to execute a random postgresql-query ?
> With random i mean execute any string as known by postgresql.
>
>
> void myexecutefunction(string string_to_execute){
> // Some code to Execute postgre-sq-string
> }
>
> ...
>
> void main(){
> myexecutefunction("CREATE DATABASE test");
> myexecutefunction("CREATE USER test");
> ...
> myexecutefunction("SELECT * FROM testtable");
> }

https://code.dlang.org/packages/dpq2


More information about the Digitalmars-d-learn mailing list