pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Syntax checking DO blocks and ALTER TABLE statements?
Date: Wed, 17 Feb 2021 11:19:44 +1100
Message-ID: <87a6s3pmjg.fsf@gmail.com> (raw)
In-Reply-To: <858b0f6b-fc12-c937-33e9-f893ecde5ac1@gmail.com>
References: <ef0b6d3f-e351-2aef-b09d-3f817cf83269@gmail.com>
	<CAKFQuwYTyXCinTZfqjbm3uWR8gZQ-tssStxhAFFu3RQmSPUjDA@mail.gmail.com>
	<87r1lfpp7k.fsf@gmail.com>
	<CAKFQuwYW7YkAzg10KGmXudHhJUwVhitrdiutR9GCT3q1vvW8Cw@mail.gmail.com>
	<87im6rpnye.fsf@gmail.com>
	<858b0f6b-fc12-c937-33e9-f893ecde5ac1@gmail.com>


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





view thread (10+ messages)  latest in thread

Message-ID: <87a6s3pmjg.fsf@gmail.com>
Permalink:  ../87a6s3pmjg.fsf@gmail.com/
Also on:    postgresql.org/message-id/87a6s3pmjg.fsf@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: theophilusx@gmail.com
  Subject: Re: Syntax checking DO blocks and ALTER TABLE statements?
  In-Reply-To: <87a6s3pmjg.fsf@gmail.com>
  References: <ef0b6d3f-e351-2aef-b09d-3f817cf83269@gmail.com> <CAKFQuwYTyXCinTZfqjbm3uWR8gZQ-tssStxhAFFu3RQmSPUjDA@mail.gmail.com> <87r1lfpp7k.fsf@gmail.com> <CAKFQuwYW7YkAzg10KGmXudHhJUwVhitrdiutR9GCT3q1vvW8Cw@mail.gmail.com> <87im6rpnye.fsf@gmail.com> <858b0f6b-fc12-c937-33e9-f893ecde5ac1@gmail.com> <87a6s3pmjg.fsf@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox