Re: [HACKERS] Getting blocked when receinving response from a Parse

2003-06-29 Thread Carlos Guzman Alvarez
Hello:

Uhmmm, if you don't mind... are you implementing something like a data 
provider for Postgresql, or it is just an ad hoc program?
Well i start making a simple library for 3.0 protocol for curiosity only 
 :), the protocol have a great documentation, but after some some days 
i decide to try to make a Data Provider for protocol 3.0 only (I already 
have made a Data Provider for other RDMBMS :)),





--
Best regards
Carlos Guzmán Álvarez
Vigo-Spain
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
  http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] Getting blocked when receinving response from a Parse

2003-06-29 Thread Francisco Figueiredo Jr.
Carlos Guzman Alvarez wrote:
Hello:

Uhmmm, if you don't mind... are you implementing something like a data 
provider for Postgresql, or it is just an ad hoc program?


Well i start making a simple library for 3.0 protocol for curiosity only 
 :), the protocol have a great documentation, but after some some days i 
decide to try to make a Data Provider for protocol 3.0 only (I already 
have made a Data Provider for other RDMBMS :)),
That's very good!
Do you know about Npgsql?
Please, have a look at gborg.postgresql.org/project/npgsql.
It is a Postgresql .net data provider written 100% in C#.
Maybe you could give some tips, suggestions, improvements, bug fixes... :)
I'm right now implementing the extended query mode and as you and Tom 
Lane said, the Flush message worked very well. Thanks again.

--
Regards,
Francisco Figueiredo Jr.

--
My grandfather once told me that there are two
kinds of people: those
who work and those who take the credit. He told me
to try to be in the
first group; there was less competition there.
- Indira Gandhi
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
 subscribe-nomail command to [EMAIL PROTECTED] so that your
 message can get through to the mailing list cleanly


Re: [HACKERS] Getting blocked when receinving response from a Parse

2003-06-29 Thread Carlos Guzman Alvarez
Hello:

That's very good!
Do you know about Npgsql?
Yes i know about it, but i have no see it in deep ( i use Firebird as 
RDBMS at this moment ), i decide to take a glance at the 3.0 protocol 
using C# when i know about the plans for a native Windows version in 7.4 
version :) , but i'm not sure if i'm going to finish the .NET data 
provider implementation.


Please, have a look at gborg.postgresql.org/project/npgsql.
It is a Postgresql .net data provider written 100% in C#.
Maybe you could give some tips, suggestions, improvements, bug fixes... :)
:)



--
Best regards
Carlos Guzmán Álvarez
Vigo-Spain
---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [HACKERS] Getting blocked when receinving response from a Parse message...

2003-06-28 Thread Carlos Guzman Alvarez
Hello:

You must send either Flush or Sync after the Parse to force the backend
to emit its response to Parse.  The assumption is that in many cases
you'll be sending Parse as part of a batch of commands, and the backend
should batch its responses to minimize the number of network packets
sent.  So you have to tell it where the batch boundaries are --- thus,
Flush or Sync.  See the docs concerning the difference between the two.


I have the same problem some days ago with the implementation of the 
version 3.0 protocol in C# and now using Flush it's working quite well :)



--
Best regards
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


Re: [HACKERS] Getting blocked when receinving response from a Parse

2003-06-28 Thread Francisco Figueiredo Jr.
Tom Lane wrote:
Francisco Figueiredo Jr. [EMAIL PROTECTED] writes:

I'm implementing the 3.0 protocol version in Npgsql, a .Net Data 
provider for postgresql.


I stopped in the first message: Parse :(
I send the parse message but I don't receive the ParseComplete or the 
ErrorResponse. My code simply freezes while reading the byte from 
network stream.


You must send either Flush or Sync after the Parse to force the backend
to emit its response to Parse.  The assumption is that in many cases
you'll be sending Parse as part of a batch of commands, and the backend
should batch its responses to minimize the number of network packets
sent.  So you have to tell it where the batch boundaries are --- thus,
Flush or Sync.  See the docs concerning the difference between the two.
Oohh, thanks, Tom Lane!
I didn't read carefully the final part of extended query where it says 
about the Flush message :)

I didn't realize the idea of holding responses to minimize network 
traffic. I was thinking in the send reply style :)

--
Regards,
Francisco Figueiredo Jr.

--
My grandfather once told me that there are two
kinds of people: those
who work and those who take the credit. He told me
to try to be in the
first group; there was less competition there.
- Indira Gandhi
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] Getting blocked when receinving response from a Parse

2003-06-28 Thread Francisco Figueiredo Jr.
Carlos Guzman Alvarez wrote:

Hello:

 You must send either Flush or Sync after the Parse to force the backend
 to emit its response to Parse.  The assumption is that in many cases
 you'll be sending Parse as part of a batch of commands, and the backend
 should batch its responses to minimize the number of network packets
 sent.  So you have to tell it where the batch boundaries are --- thus,
 Flush or Sync.  See the docs concerning the difference between the two.


I have the same problem some days ago with the implementation of the 
version 3.0 protocol in C# and now using Flush it's working quite well :)


Thanks Carlos.

Uhmmm, if you don't mind... are you implementing something like a data 
provider for Postgresql, or it is just an ad hoc program?



--
Regards,
Francisco Figueiredo Jr.

--
My grandfather once told me that there are two
kinds of people: those
who work and those who take the credit. He told me
to try to be in the
first group; there was less competition there.
- Indira Gandhi
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
 subscribe-nomail command to [EMAIL PROTECTED] so that your
 message can get through to the mailing list cleanly


Re: [HACKERS] Getting blocked when receinving response from a Parse message...

2003-06-27 Thread Tom Lane
Francisco Figueiredo Jr. [EMAIL PROTECTED] writes:
 I'm implementing the 3.0 protocol version in Npgsql, a .Net Data 
 provider for postgresql.

 I stopped in the first message: Parse :(
 I send the parse message but I don't receive the ParseComplete or the 
 ErrorResponse. My code simply freezes while reading the byte from 
 network stream.

You must send either Flush or Sync after the Parse to force the backend
to emit its response to Parse.  The assumption is that in many cases
you'll be sending Parse as part of a batch of commands, and the backend
should batch its responses to minimize the number of network packets
sent.  So you have to tell it where the batch boundaries are --- thus,
Flush or Sync.  See the docs concerning the difference between the two.

regards, tom lane

---(end of broadcast)---
TIP 8: explain analyze is your friend