Postgre Protocol

From: Greg <grigorey(at)yahoo(dot)co(dot)uk>
To: pgsql-novice(at)postgresql(dot)org
Subject: Postgre Protocol
Date: 2010-06-28 16:31:54
Message-ID: 17361.12040.qm@web24303.mail.ird.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi all, I have a question (or more of a guidence request) in regards to PostgreSQL v8.4 Protocol v3 and accessing the database via TCP.

Background: part of the summer project that Im involved in I have to create fast & light (open connection, send query, read results) .Net 4 (C#) provider, similar to npgsql but should only use streams. So far I managed to get socket connection to database and authenticate (recived AuthenticationOk response code from database), right now Im not shure what to do. Documentation says that I need to wait for other messages from the server, such as "BackendKeyData" or "ReadyForQuery" but the database is not writing anything into a buffer so when I try to read from it, my application just waits.

So question is after I recive AuthenticationOk, do I need to wait for ReadyForQuery message from the database or I can go ahead and start senting queries to the database?

Database: PostgreSQL v8.4
Aplication Platform: .Net 4.0
Protol Documentation: http://www.postgresql.org/docs/8.4/interactive/protocol.html

Thanks.

PS: A have been looking at the source code for Npgsql, but I can't make sence of whats going on.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2010-06-28 18:08:55 Re: Postgre Protocol
Previous Message Atif Jung 2010-06-28 15:45:32 Re: DECLARE CURSOR