Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-20 Thread Rick
In article <[EMAIL PROTECTED]>, Sam Mason <[EMAIL PROTECTED]> wrote: >I'm not quite sure if this would help your use case, but a few editors >allow you to send blocks of text to other processes. For example, under >Emacs I can hit Ctrl+C twice and it will grab the current paragraph >and send it o

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-11 Thread Kynn Jones
On Mon, Mar 10, 2008 at 12:28 PM, Craig Ringer <[EMAIL PROTECTED]> wrote: > > Personally I use vim to comment out small blocks. However, this is > rarely required as I break my SQL up into logical chunks in separate > files. I should get into that habit in any case. Thanks for pointing it out.

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-11 Thread Kynn Jones
On Tue, Mar 11, 2008 at 10:10 AM, Gurjeet Singh <[EMAIL PROTECTED]> wrote: > The SQL standard, and Postgres, allow you to nest comments; some > commercial RDBMS' do not provide this, and hence people think it's not > possible in SQL. > Ah! Finally I see what Martin was getting at in his reply.

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-11 Thread Kynn Jones
On Tue, Mar 11, 2008 at 7:17 AM, Sam Mason <[EMAIL PROTECTED]> wrote: > > I'm not quite sure if this would help your use case, but a few editors > allow you to send blocks of text to other processes. For example, under > Emacs I can hit Ctrl+C twice and it will grab the current paragraph > and se

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-11 Thread Richard Huxton
Gurjeet Singh wrote: If your sole objective is to comment out large chunks of SQL code, which in turn may have multi-line comments, then the simplest trick is to comment them using /* multi-line */ itself! The SQL standard, and Postgres, allow you to nest comments; some commercial RDBMS' do not

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-11 Thread Gurjeet Singh
On Mon, Mar 10, 2008 at 9:20 PM, Kynn Jones <[EMAIL PROTECTED]> wrote: > > > > Hi! When it comes to programming SQL, my newbie approach is to write my > code in a file test.sql, which I test from within psql by using > > my_db=> \i /some/path/test.sql > > ...and (once I'm satisfied with the cod

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-11 Thread Sam Mason
On Mon, Mar 10, 2008 at 10:50:26AM -0500, Kynn Jones wrote: > Hi! When it comes to programming SQL, my newbie approach is to write my > code in a file test.sql, which I test from within psql by using > > my_db=> \i /some/path/test.sql > > ...and (once I'm satisfied with the code) copy and past

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-10 Thread mgainty
2008 12:55 PM Subject: Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code > On Mar 10, 2008, at 4:50 PM, Kynn Jones wrote: > > > Hi! When it comes to programming SQL, my newbie approach is to > > write my code in a file test.sql, which I test from with

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-10 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Alban Hertroys <[EMAIL PROTECTED]> writes: >> I'm thinking of something like the trick of surrounding C code with >> pairs of #if 0 and #endif, which effectively comments out code, >> even when it contains /* C-style comments */. >> >> Is there some similar trick f

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-10 Thread Alban Hertroys
On Mar 10, 2008, at 4:50 PM, Kynn Jones wrote: Hi! When it comes to programming SQL, my newbie approach is to write my code in a file test.sql, which I test from within psql by using my_db=> \i /some/path/test.sql ...and (once I'm satisfied with the code) copy and paste it to a differ

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-10 Thread Craig Ringer
Kynn Jones wrote: Hi! When it comes to programming SQL, my newbie approach is to write my code in a file test.sql, which I test from within psql by using my_db=> \i /some/path/test.sql ...and (once I'm satisfied with the code) copy and paste it to a different file that has the SQL I've writt

[GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-10 Thread Kynn Jones
Hi! When it comes to programming SQL, my newbie approach is to write my code in a file test.sql, which I test from within psql by using my_db=> \i /some/path/test.sql ...and (once I'm satisfied with the code) copy and paste it to a different file that has the SQL I've written so far for the pr