Обсуждение: Talking to PostgreSQL with telnet

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

Talking to PostgreSQL with telnet

От
"Campano, Troy"
Дата:

I want to write a program that scans a bunch of nodes on port 5432 to see if PostgreSQL lives there.
Is there a command I can issue from telnet that will return if it is PostgreSQL and not another server without supplying and credentials?

For example if I telnet to a node called 'bob' on port 21 I could get:

220 bob FTP server (SunOS 5.8) ready.

And then I'd now it's a FTP server. Anything to find out if it's a PostgreSQL server?
When I use this same method on a PostgreSQL server running on port 5432, I get a blank console that is awaiting for a command.

thank you!

Troy Campano