Re: [postgis-users] Can we treat a large block of psql codes as a string and execute the string?

2020-04-22 Thread Stephen Woodbridge
On 4/22/2020 11:15 AM, Shaozhong SHI wrote: Hi, Giuseppe, Thank you. As I remembered that I did a very long string in a loop and it worked. By the way, what is quickest way to print string on screen.  That could be a much better way of checking. raise notice psqlstring; Regards, Shao O

Re: [postgis-users] Can we treat a large block of psql codes as a string and execute the string?

2020-04-22 Thread Shaozhong SHI
Hi, Giuseppe, Thank you. As I remembered that I did a very long string in a loop and it worked. By the way, what is quickest way to print string on screen. That could be a much better way of checking. Regards, Shao On Wed, 22 Apr 2020 at 14:35, Giuseppe Broccolo wrote: > Hi Shao, > > Looks

Re: [postgis-users] Can we treat a large block of psql codes as a string and execute the string?

2020-04-22 Thread Giuseppe Broccolo
Hi Shao, Looks like there's a syntax error in the UPDATE command that makes truncate the string, I would say some missing spaces in the concatenate. For instance, [...] 'UPDATE' || output || "SET style_description [...] should be [...] 'UPDATE ' || output || " SET style_description [...] Hope

Re: [postgis-users] Can we treat a large block of psql codes as a string and execute the string?

2020-04-22 Thread Shaozhong SHI
Hi, Giuseppe, I am following these examples. https://stackoverflow.com/questions/12780275/dynamic-sql-query-in-postgres But, it appears that it does not allow long text strings. I wonder how to go about. Regards, Shao On Wed, 22 Apr 2020 at 07:47, Shaozhong SHI wrote: > Hi, Giuseppe, > >