Обсуждение: win cmd line query tool

Поиск
Список
Период
Сортировка

win cmd line query tool

От
"uuZZuuZZ (sent by Nabble.com)"
Дата:
I need a windows command line tool that will allow me to retrieve a row from
a postgresql database (using odbc I would guess). I know osql won't work
since it is geared to mssql. I tried dbisql from sybase but I don't need to
install a CD to do this. I need something with a small foot print. Can I use
telnet ?? Any tips would be appreciated. I'll buy something if needed, but I
need cmd line so I can parse the output from the select.
Thanks

--
View this message in context: http://www.nabble.com/win-cmd-line-query-tool-t1162261.html#a3051009
Sent from the PostgreSQL - general forum at Nabble.com.


Re: win cmd line query tool

От
Martijn van Oosterhout
Дата:
On Tue, Feb 21, 2006 at 06:39:13AM -0800, uuZZuuZZ (sent by Nabble.com) wrote:
>
> I need a windows command line tool that will allow me to retrieve a row from
> a postgresql database (using odbc I would guess). I know osql won't work
> since it is geared to mssql. I tried dbisql from sybase but I don't need to
> install a CD to do this. I need something with a small foot print. Can I use
> telnet ?? Any tips would be appreciated. I'll buy something if needed, but I
> need cmd line so I can parse the output from the select.
> Thanks

What's wrong with psql?

psql -c "select * from blah where x = 44"

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

Re: win cmd line query tool

От
Tony Caduto
Дата:
uuZZuuZZ (sent by Nabble.com) wrote:
> I need a windows command line tool that will allow me to retrieve a row from
> a postgresql database

What's wrong with the one that comes with Postgresql?
if you install the win32 server it's in the bin directory and called
psql.exe, and you can install it seperate from the server and call it
from batch files etc, or if you need something more specialized you
could create a console application with C,Delphi,C#,VB.net etc.

Thanks,

--
Tony Caduto
AM Software Design
Home of PG Lightning Admin for Postgresql
http://www.amsoftwaredesign.com

Re: win cmd line query tool

От
"uuZZuuZZ (sent by Nabble.com)"
Дата:
niets is verkeerd met psql.
What is it and where do I obtain it ? Do I have to install the entire
postgresql package to make it work ? The target db is on a remote server
from where psql will run.
Dank u wel
--
View this message in context: http://www.nabble.com/win-cmd-line-query-tool-t1162261.html#a3051281
Sent from the PostgreSQL - general forum at Nabble.com.


Re: win cmd line query tool

От
Martijn van Oosterhout
Дата:
On Tue, Feb 21, 2006 at 06:54:57AM -0800, uuZZuuZZ (sent by Nabble.com) wrote:
>
> niets is verkeerd met psql.
> What is it and where do I obtain it ? Do I have to install the entire
> postgresql package to make it work ? The target db is on a remote server
> from where psql will run.

You need to install the client side. When you install it gives you the
options of which parts to install. Just select only the client
libraries and you should be fine.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения