From: | SAKAIDA <sakaida(at)psn(dot)co(dot)jp> |
---|---|
To: | hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] pgbash-1.1.1 release |
Date: | 1999-10-02 04:00:49 |
Message-ID: | 37F5837182.7440SAKAIDA@smtp.psn.ne.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-interfaces |
Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> 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 "<TABLE option>"
-O "*:<TH option1>" -O "name:<TH option2>"
-O "*:<TD option3>" -O "addr:<TD option4>"
-F "name:<font color='0000ff' size=4>%-7.7s</font>"
-F "addr:<fonr color='ff0000'>%s</font>"
"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.
From | Date | Subject | |
---|---|---|---|
Next Message | D'Arcy J.M. Cain | 1999-10-02 11:25:05 | Re: [HACKERS] postmaster dead on startup from unportable SSL patch |
Previous Message | SAKAIDA | 1999-10-02 03:39:47 | Re: [HACKERS] pgbash-1.1.1 release |
From | Date | Subject | |
---|---|---|---|
Next Message | Gene Selkov Jr. | 1999-10-02 04:51:14 | Re: [INTERFACES] Re: [HACKERS] pgbash-1.1.1 release |
Previous Message | SAKAIDA | 1999-10-02 03:39:47 | Re: [HACKERS] pgbash-1.1.1 release |