Received: from mail.psn.ne.jp (mail.psn.ne.jp [210.167.249.5]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA66254 for ; Fri, 1 Oct 1999 23:58:28 -0400 (EDT) (envelope-from sakaida@psn.co.jp) Received: from ppp119 (ppp119.psn.ne.jp [210.167.249.119]) by mail.psn.ne.jp (8.9.1/3.7W) with SMTP id MAA14803 for ; Sat, 2 Oct 1999 12:58:26 +0900 (JST) Date: Sat, 02 Oct 1999 13:00:49 +0900 From: SAKAIDA To: hackers@postgreSQL.org Subject: Re: [HACKERS] pgbash-1.1.1 release In-Reply-To: References: <37F4C04A1B8.A39FSAKAIDA@smtp.psn.ne.jp> Message-Id: <37F5837182.7440SAKAIDA@smtp.psn.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver 1.25.07 Oleg Bartunov wrote: > Sakaida, > > sorry for bothering you but I didn't find > TODO file and wondering what new features (if any) > you plan to implement to pgbash. Please give me your opinion. My plan is not yet the concrete, but a few of my new plan are: 1. Improvement of function of an HTML output. exec_sql -H -O "" -O "*:
" -O "name:" -O "*:" -O "addr:" -F "name:%-7.7s" -F "addr:%s" "select * from test where ..." 2. Snapshot cursor operation. exec_sql -c cur "select * from test where ..." exec_sql "open cur" exec_sql "fetch in cur into :r1, :r2" echo "r1=$r1 r2=$r2" exec_sql "close cur" # Declare cursor operation is already implemented. > I'm a little boried to enclose SQL statements > into double quotes. Is't really need ? I think that it is necessary, because in the inside of the double quotes, it can be used $variable and it is possible to describe the SQL statement in the multiple line. ex) exec_sql "select * from test where name='$DATA' and addr='$ADATA'" > I'm doubt it's possible, because > SQL statement must begins from valid SQL word. > > If it's impossible to avoid probably pgbash > might have a possibility to redefine quote character, > so user could use > exec_sql [select * from test] > Notice, no need to press shift key ! > I think with a little more effort this could be > achieved without explicit redefining of > quote character. But this is not a big problem, > I could use alias to define [] as a quote characters > just as an example: > alias sql='exec_sql -Q "[]"' > and then use sql instead of exec_sql. > I use alias too, but I do not know the method for aliasing double quotes. ex) alias E='exec_sql' (Shell program) ----------------------------------------------------- #!/usr/local/bin/bash function E { exec_sql "$@" } ----------------------------------------------------- (KUBO Takehiro taught me this method.) > Anyway, I'm just speculating about enhancement > after playing for several hours with pgbash. > I like it ! I hope a new idea. -- Regards. SAKAIDA Masaaki -- Osaka, Japan  # Sorry, I am not good at English.