Re: Syntax checking DO blocks and ALTER TABLE statements? - Mailing list pgsql-general

From Tim Cross
Subject Re: Syntax checking DO blocks and ALTER TABLE statements?
Date
Msg-id 87a6s3pmjg.fsf@gmail.com
Whole thread Raw
In response to Re: Syntax checking DO blocks and ALTER TABLE statements?  (Ron <ronljohnsonjr@gmail.com>)
Responses Re: Syntax checking DO blocks and ALTER TABLE statements?  (Ron <ronljohnsonjr@gmail.com>)
List pgsql-general
Ron <ronljohnsonjr@gmail.com> writes:

> On 2/16/21 5:44 PM, Tim Cross wrote:
>> Given the number, I think I would do the same. A good example of why
>> being 'lazy' can be a virtue. Faster and easier to write a procedure to
>> generate dynamic SQL than write out all those alter statements manually
>> or even write it using a scripting language and ODBC if there is
>> sufficient variation in the statements to make writing it in plsql
>> 'messy'.
>
> In my case, the statements are generated by Ora2Pg, and the DO blocks are
> generated by a bash script I wrote.  Input data can be messy, so want to
> verify things before running.
>
> Sure, vim is great at highlighting some problems, but certainly not all.
>
> What I'm really looking for the PostgreSQL version of SQL Server's Ctrl-F5:
> it runs just the parser and then stops,

Sounds like exactly what LSP aims to provide. Don't know if the LSP SQL
servers available are mature enough yet, but that is definitely the
objective. Real benefit is that it is editor agnostic. Once your editor
has LSP support, all you need to do is configure the server details and
you get parsing, completion, re-factoring, definition lookup etc.

--
Tim Cross



pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: Syntax checking DO blocks and ALTER TABLE statements?
Next
From: Ron
Date:
Subject: Re: Syntax checking DO blocks and ALTER TABLE statements?