Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread Raimon Fernandez
On 27/10/2009, at 15:06, Alvaro Herrera wrote: Raimon Fernandez wrote: how I know where the length ends ? You count 4 bytes. thanks, I'm parsing now the resulted string as a binarystring and all is getting sense ... thanks for your help, raimon -- Alvaro Herrera

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread Merlin Moncure
On Mon, Oct 26, 2009 at 7:17 PM, John R Pierce wrote: > Alvaro Herrera wrote: >>> >>> I'm trying to implement the front-end protocol with TCP from >>> REALbasic to PostgreSQL. >>> >> >> That sounds the most difficult way to do it.  Can't you just embed >> libpq? >> > > yah, seriously.   the binary

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread Alvaro Herrera
Raimon Fernandez wrote: > how I know where the length ends ? You count 4 bytes. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread Raimon Fernandez
On 27/10/2009, at 14:41, Alvaro Herrera wrote: Raimon Fernandez wrote: After the S I found thre char(0) and later the size of the packet, and later the name + char(0) (separator between value and parameter), the parameter, and so on. Why I found those three char(0) after the S and before the

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread Alvaro Herrera
Raimon Fernandez wrote: > I receive string data, I suppose it's text data. > > I can parse the data received, search for a B. You don't search for a B. You search for an S. The B in the documentation you quote indicates that this message can be sent by the backend only. You'll notice others h

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread Alvaro Herrera
Raimon Fernandez wrote: > After the S I found thre char(0) and later the size of the packet, > and later the name + char(0) (separator between value and > parameter), the parameter, and so on. > > Why I found those three char(0) after the S and before the packet > length? Because the length is a

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread Raimon Fernandez
Hello, As this thread it's alive, I'm going to ask more specific questions: After sending the satartup sequence, I receive the paramlist. I don't need to send Authentication as I'm using a Trust user, for making things easier. I receive string data, I suppose it's text data. I can parse

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread Raimon Fernandez
On 27/10/2009, at 14:00, Alvaro Herrera wrote: Raimon Fernandez wrote: REALbasic has plugin for PostgreSQL, but they are synchronous and freeze the GUI when interacting with PG. This is not a problem noramlly, as the SELECTS/UPDATES/... are fast enopugh, but sometimes we need to fetch 1000,

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread John DeSoi
On Oct 26, 2009, at 7:17 PM, John R Pierce wrote: yah, seriously. the binary protocol is not considered stable, it can change in subtle ways in each version. libpq handles the current version and all previous versions, and exposes all methods. I don't think the frontend/backend protocol

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread Alvaro Herrera
Raimon Fernandez wrote: > REALbasic has plugin for PostgreSQL, but they are synchronous and > freeze the GUI when interacting with PG. This is not a problem > noramlly, as the SELECTS/UPDATES/... are fast enopugh, but sometimes > we need to fetch 1000, 5000 or more rows and the application stops

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread John DeSoi
On Oct 27, 2009, at 4:55 AM, Albe Laurenz wrote: That's probably not the problem in the original message, but there are things you can do with the frontend/backend protocol that libpq does not expose: for example, with the extended query protocol you can send a "Bind" call that requests that so

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread Craig Ringer
On 27/10/2009 3:20 PM, Raimon Fernandez wrote: > REALbasic has plugin for PostgreSQL, but they are synchronous and > freeze the GUI when interacting with PG. This is not a problem noramlly, > as the SELECTS/UPDATES/... are fast enopugh, but sometimes we need to > fetch 1000, 5000 or more rows and

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread Albe Laurenz
John R Pierce wrote: > yah, seriously. the binary protocol is not considered stable, it can > change in subtle ways in each version. libpq handles the current > version and all previous versions, and exposes all methods. That's probably not the problem in the original message, but there are t

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread Raimon Fernandez
On 27/10/2009, at 8:29, John R Pierce wrote: Raimon Fernandez wrote: REALbasic has plugin for PostgreSQL, but they are synchronous and freeze the GUI when interacting with PG. This is not a problem noramlly, as the SELECTS/UPDATES/... are fast enopugh, but sometimes we need to fetch 1000

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread John R Pierce
Raimon Fernandez wrote: REALbasic has plugin for PostgreSQL, but they are synchronous and freeze the GUI when interacting with PG. This is not a problem noramlly, as the SELECTS/UPDATES/... are fast enopugh, but sometimes we need to fetch 1000, 5000 or more rows and the application stops to r

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-27 Thread Raimon Fernandez
On 27/10/2009, at 0:17, John R Pierce wrote: Alvaro Herrera wrote: I'm trying to implement the front-end protocol with TCP from REALbasic to PostgreSQL. That sounds the most difficult way to do it. Can't you just embed libpq? yah, seriously. the binary protocol is not considered stabl

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-26 Thread Craig Ringer
On Mon, 2009-10-26 at 20:15 -0300, Alvaro Herrera wrote: > Raimon Fernandez wrote: > > > > > > Hello, > > > > > > I'm trying to implement the front-end protocol with TCP from > > REALbasic to PostgreSQL. > > That sounds the most difficult way to do it. Can't you just embed > libpq? +1 Alm

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-26 Thread John R Pierce
Alvaro Herrera wrote: I'm trying to implement the front-end protocol with TCP from REALbasic to PostgreSQL. That sounds the most difficult way to do it. Can't you just embed libpq? yah, seriously. the binary protocol is not considered stable, it can change in subtle ways in each v

Re: [GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-26 Thread Alvaro Herrera
Raimon Fernandez wrote: > > > Hello, > > > I'm trying to implement the front-end protocol with TCP from > REALbasic to PostgreSQL. That sounds the most difficult way to do it. Can't you just embed libpq? -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreS

[GENERAL] Implementing Frontend/Backend Protocol TCP/IP

2009-10-26 Thread Raimon Fernandez
Hello, I'm trying to implement the front-end protocol with TCP from REALbasic to PostgreSQL. The docs from PostgreSQL, well, I understand almost, but there are some points that maybe need more clarification. Anyone have some experience to start making questions ? :-) The front-end t