[HACKERS] [Fwd: Re: Problem trying to implement version 3.0 of the PostgreSQLprotocol in C#]

2003-06-06 Thread Carlos Guzman Alvarez
Hello: Sounds like you are sending junk following the Parse message. You are right thanks very much, but now i have another problem, i don't get response from the postgresql server, hummm this is what i'm sending for test: Byte1 ('P') Int32 (40) String ('') String ('SELECT

Re: [HACKERS] Problem trying to implement version 3.0 of the PostgreSQL protocol

2003-06-05 Thread Carlos Guzman Alvarez
Hello: Sounds like you are sending junk following the Parse message. You are right thanks very much, but now i have another problem, i don't get response from the postgresql server, hummm this is what i'm sending for test: Byte1 ('P') Int32 (40) String ('') String ('SELECT

Re: [HACKERS] Problem trying to implement version 3.0 of the PostgreSQL

2003-06-05 Thread Carlos Guzman Alvarez
Hello: Your Parse message looks fine, but the server will not actually send its ParseComplete response until you send a Sync or Flush message. The idea is that Parse is usually going to be part of a series of operations, and you don't want a separate network packet coming back for each operation

Re: [HACKERS] Problem trying to implement version 3.0 of the PostgreSQL protocol

2003-06-05 Thread Carlos Guzman Alvarez
Hello: Sounds like you are sending junk following the Parse message. You are right thanks very much, but now i have another problem, i don't get response from the postgresql server, hummm this is what i'm sending for test: Byte1 ('P') Int32 (40) String ('') String ('SELECT

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.

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

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

[HACKERS] Question about array read using protocol 3.0 implementation in C#

2003-06-29 Thread Carlos Guzman Alvarez
Hello: I'm trying to read an array, using binary format code and my own implementation of the 3.0 protocol in C#, at this moment i have made test with arrays of int2 and float4, seems that the server sends a header of 24 bytes before the data in the buffer, i need to know what these 24 bytes

Re: [HACKERS] Question about array read using protocol 3.0 implementation

2003-06-30 Thread Carlos Guzman Alvarez
Hello: Thanks another wuestion in this case about oidvector i'm reviewing oidvectorsend() at backend/utils/adt/oid.c and seems that for this datatype the server sends only array data, i'm rigth ??, i think yes but i want to be sure ;) ( and i think the same can be applied to int2vector ?? )

Re: [HACKERS] Question about array read using protocol 3.0 implementation

2003-06-30 Thread Carlos Guzman Alvarez
Hello: Right, the fixed-length array types are a whole 'nother critter. Thanks -- Best regards Carlos Guzmán Álvarez Vigo-Spain ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining

Re: [HACKERS] Receiving data in binary format how is it encoded?

2003-07-06 Thread Carlos Guzman Alvarez
Hello: Yeah, while waiting for the response, I added support for the int4 datatype. It is really encoded as a 4 bytes value. :) Uhmmm, where did you take the 2000,1,1 as base from? If the date is before 2000, days will have a negative value, so date is calculated correctly backwards? In the

[HACKERS] CREATE DATABASE command in Extended Query mode of 3.0 protocol

2003-07-07 Thread Carlos Guzman Alvarez
Hello: I'm trying to create a database using the extended query mode ( with my own implementation of the 3.0 protocol in C# ) but i'm having problem, the CREATE DATABASE command seems to be executed well and the answer of the server is the expected but the database is never created, if i exec

Re: [HACKERS] CREATE DATABASE command in Extended Query mode of 3.0

2003-07-09 Thread Carlos Guzman Alvarez
Hello: You do need to use Sync rather than Flush to create transaction boundaries and error restart points. I suspect your problem was coming from having only a Flush and not a Sync between the CREATE DATABASE and the *prior* command. Huummm there are no prior executed commands, the CREATE

Re: [HACKERS] Transaction handling in extended query mode and Sync

2003-07-12 Thread Carlos Guzman Alvarez
Hello: Sorry for late response... I could finally get Npgsql to talk protocol 3.0 version :) It is not 100% but it is near... Great !! I'm going to open my code at sourceforge :) I give it a try in a test similar to yours... I didn't send the create database commands just the row insertion.

Re: [HACKERS] Transaction handling in extended query mode and Sync

2003-07-15 Thread Carlos Guzman Alvarez
Hello: Did you figure this out? I can't see any way that a Sync message would close a transaction started with BEGIN (or START TRANSACTION). It runs the same code we run at the end of a simple-Query message, and we'd definitely have noticed if that were causing premature commit ... Thanks for

Re: [HACKERS] Passing server_encoding to the client is not future-proof

2003-07-29 Thread Carlos Guzman Alvarez
Hello: The JDBC guys wanted to know it. Why is not clear to me, but I figured it was easy enough to make them happy. I'm using it too in my .NET Data Provider for allow atomatic encoding of strings before send it to the server. -- Best regards Carlos Guzmán Álvarez Vigo-Spain

[HACKERS] Identification of serial fields

2003-08-02 Thread Carlos Guzman Alvarez
Hello: I continue to be working in my .NET Data provider for postgres 7.4, i want to know if there are a simple way for identify autoincrement fields, i see that for serial and big serial fields the default value is 'nextval(...)' this can be a way for know it but i want to know if there are

Re: [HACKERS] Identification of serial fields

2003-08-02 Thread Carlos Guzman Alvarez
Hello: In SERIAL columns the sequence depends on the column, so the association can be gathered from pg_depend. Check for a relation between a sequence and column of a table where the deptype = 'i'. (Taken from pg_dump) Thanks very much i will try it and comment the results here :) -- Best

Re: [HACKERS] Identification of serial fields

2003-08-02 Thread Carlos Guzman Alvarez
Hello: Thanks very much i will try it and comment the results here :) This is was i'm finally using for retirve column information: SELECT pg_namespace.nspname AS TABLE_SCHEMA, pg_class.relname AS TABLE_NAME, pg_attribute.attname AS COLUMN_NAME, pg_attribute.atttypid AS DATA_TYPE,

Re: [HACKERS] Identification of serial fields

2003-08-03 Thread Carlos Guzman Alvarez
Hello: Finally after some tests i'm doing this: SELECT pg_namespace.nspname AS TABLE_SCHEMA, pg_class.relname AS TABLE_NAME, pg_attribute.attname AS COLUMN_NAME, pg_attribute.atttypid AS DATA_TYPE, pg_attribute.attlen AS COLUMN_SIZE, pg_attribute.attndims AS COLUMN_DIMENSIONS,

Re: [HACKERS] PostgreSQL 7.4 Beta 1 + SSL + Cygwin

2003-08-08 Thread Carlos Guzman Alvarez
Hello: I want to know if postgresql 7.4 beta 1 can be configured under Cygwin with SSL support ?? If the answer is positive how can i do it ?? or where can i found documentation about this ( under linux or cygwin :) ) ?? I have found this on PostgreSQL docs :) i have it configured yet. --

[HACKERS] PostgreSQL 7.4 Beta 1 + SSL + Cygwin

2003-08-11 Thread Carlos Guzman Alvarez
Hello: I want to know if postgresql 7.4 beta 1 can be configured under Cygwin with SSL support ?? If the answer is positive how can i do it ?? or where can i found documentation about this ( under linux or cygwin :) ) ?? Thanks in advance :) -- Best regards Carlos Guzmán Álvarez

[HACKERS] SSL Connection / Windows + Cygwin + PostgreSQL 7.4 Beta 1 question

2003-08-14 Thread Carlos Guzman Alvarez
Hello: I'm trying to establish a TLS connection to PostgreSQL 7.4 beta 1 on windows and Cygwin using C#, i have configured PostgreSQL as it's explained here: http://developer.postgresql.org/docs/postgres/ssl-tcp.html There are anything more that is needed to be done in order to run SSL/TLS

[HACKERS] SSL Connections

2003-08-25 Thread Carlos Guzman Alvarez
Hello: I'm developing a TLS library in C# for my PostgreSQL ADO.NET Data Provider, i can work well using the openssl test server, using: openssl s_server -accept 443 -key server.key -cert server.crt -tls1 -bugs But when i try to use it for connect to postgresql (7.4 on Windows+Cygwin) i get

[HACKERS] PostgreSQL SSL Connections

2003-08-28 Thread Carlos Guzman Alvarez
Hello: I'm developing a TLS library in C# for my PostgreSQL ADO.NET Data Provider, i can work well using the openssl test server, using: openssl s_server -accept 443 -key server.key -cert server.crt -tls1 -bugs But when i try to use it for connect to postgresql (7.4 on Windows+Cygwin) i get

[HACKERS] [ANN] PGSqlClient 1.0 Beta 1 released

2003-09-12 Thread Carlos Guzman Alvarez
Hello: 1st Beta 1 version of PGSqlClient an ADO.NET Data Provider for PostgreSQL 7.4+ released. Beta 1 ( 12-09-2003 ) - - -- -- - * Better fit to ADO.NET. * Simple Transport Layer security ( TLS 1.0 ) implementation It's used yet for both TLS and non-TLS connections but it's not

[HACKERS] SSL/TLS connections on Cygwin

2003-09-15 Thread Carlos Guzman Alvarez
Hello: I'm testing the TLS support of my .net data provider for PostgreSQL 7.4 (on Cygwin using PostgreSQL 7.4 Beta 2), i have a question, i'm receiving Application data messages with a length of 24 bytes than decrypted are empty messages ( decrypted message length = 0 ), is this correct

[HACKERS] Array Parameters on protocol 3.0

2003-09-18 Thread Carlos Guzman Alvarez
Hello: I'm trying to give support to array parameters for sql commands in my .net data provider for postgres 7.4, i'm sending the same data as i need for read array field values but i get always the error : insufficient data left in message I'm sending this for array parameters (in binary

Re: [HACKERS] Array Parameters on protocol 3.0

2003-09-20 Thread Carlos Guzman Alvarez
Hello: Looks right to me. Either you have some small typo in your code, or the backend does ... let me know which ... Note that insufficient data left in message could arise from misformatting of an individual array element with respect to its individual value size, not only from a mistake at

Re: [HACKERS] Array Parameters on protocol 3.0

2003-09-20 Thread Carlos Guzman Alvarez
Hello: Looks right to me. Either you have some small typo in your code, or the backend does ... let me know which ... Note that insufficient data left in message could arise from misformatting of an individual array element with respect to its individual value size, not only from a mistake at