Search Postgresql Archives

Re: Command to execute SQL string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, March 8, 2018, Francisco Olarte <folarte@xxxxxxxxxxxxxx> wrote:
On Thu, Mar 8, 2018 at 1:26 PM, Łukasz Jarych <jaryszek@xxxxxxxxx> wrote:
> i have a table when i have string in each row,
> for example "DELETE FROM t_test WHERE ID = 3".
>
> I want to execute for each row this command.
> It is possible?

I supose you mean execute the command contained in each row. Anyway,
it is easy with a procedure, look for example at

https://www.postgresql.org/docs/10/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN


See also v10 psql \gexec

David J. 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux