pgsqlclient-checkins Mailing List for PostgreSqlClient (Page 49)
Status: Inactive
Brought to you by:
carlosga_fb
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(120) |
Aug
(95) |
Sep
(95) |
Oct
(213) |
Nov
(114) |
Dec
(64) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(6) |
Feb
(134) |
Mar
(88) |
Apr
(28) |
May
(22) |
Jun
(15) |
Jul
(23) |
Aug
(2) |
Sep
(15) |
Oct
(2) |
Nov
(6) |
Dec
|
| 2005 |
Jan
(8) |
Feb
(6) |
Mar
|
Apr
(42) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(84) |
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
(84) |
Apr
(46) |
May
(40) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <car...@us...> - 2003-08-12 14:38:03
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv14942
Modified Files:
PgParameterCollection.cs
Log Message:
Fixed error on RemoveAt method
Index: PgParameterCollection.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgParameterCollection.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PgParameterCollection.cs 2 Aug 2003 19:43:01 -0000 1.1.1.1
--- PgParameterCollection.cs 12 Aug 2003 14:25:05 -0000 1.2
***************
*** 191,195 ****
public void RemoveAt(int index)
{
! RemoveAt(this[index].ParameterName);
}
--- 191,195 ----
public void RemoveAt(int index)
{
! this.parameters.RemoveAt(index);
}
|
|
From: <car...@us...> - 2003-08-12 14:33:43
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv15012 Modified Files: changelog.txt Log Message: updated changelog.txt Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** changelog.txt 12 Aug 2003 13:34:17 -0000 1.13 --- changelog.txt 12 Aug 2003 14:25:51 -0000 1.14 *************** *** 4,7 **** --- 4,12 ---- 2003-08-12 Carlos Guzmán Álvarez <car...@te...> + * source/PgParameterCollection.cs: + + - Fixed error on RemoveAt method + + * source/PgCommand.cs: |
|
From: <car...@us...> - 2003-08-12 14:00:13
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source In directory sc8-pr-cvs1:/tmp/cvs-serv32308 Modified Files: PgDbConnection.cs Log Message: - Fixed error on null value andling and rearrange FbDbType infering from Value property to match SqlParameter behavior ( Thanks to Alessandro Petrelli for his feedback). - Added processing of new connection string element for ssl connections Index: PgDbConnection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDbConnection.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PgDbConnection.cs 2 Aug 2003 19:43:00 -0000 1.1.1.1 --- PgDbConnection.cs 12 Aug 2003 13:12:34 -0000 1.2 *************** *** 173,176 **** --- 173,180 ---- settings.Pooling = Boolean.Parse(element.Groups[2].Value.Trim()); break; + + case "ssl": + settings.SSL = Boolean.Parse(element.Groups[2].Value.Trim()); + break; } } |
|
From: <car...@us...> - 2003-08-12 13:49:55
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv3771 Modified Files: changelog.txt Log Message: Updated CHANGELOG.TXT Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** changelog.txt 12 Aug 2003 13:14:11 -0000 1.12 --- changelog.txt 12 Aug 2003 13:34:17 -0000 1.13 *************** *** 4,10 **** 2003-08-12 Carlos Guzmán Álvarez <car...@te...> * source/PgDbConnection.cs: ! Added processing of new connection string element for ssl connections * source/PgParameter.cs: --- 4,14 ---- 2003-08-12 Carlos Guzmán Álvarez <car...@te...> + * source/PgCommand.cs: + + - Added correct handling of null values when setting output parameters values. + * source/PgDbConnection.cs: ! - Added processing of new connection string element for ssl connections. * source/PgParameter.cs: |
|
From: <car...@us...> - 2003-08-12 13:33:31
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv3466
Modified Files:
PgCommand.cs
Log Message:
Added correct handling of null values when setting output parameters values
Index: PgCommand.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgCommand.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PgCommand.cs 2 Aug 2003 19:43:00 -0000 1.1.1.1
--- PgCommand.cs 12 Aug 2003 13:32:27 -0000 1.2
***************
*** 572,575 ****
--- 572,579 ----
((PgParameter)paramEnumerator.Current).Direction == ParameterDirection.ReturnValue)
{
+ if (values[i] == null)
+ {
+ values[i] = System.DBNull.Value;
+ }
((PgParameter)paramEnumerator.Current).Value = values[i];
i++;
|
|
From: <car...@us...> - 2003-08-12 13:26:40
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv32376
Modified Files:
PgParameter.cs
Log Message:
- Fixed error on null value andling and rearrange FbDbType infering from Value property
to match SqlParameter behavior ( Thanks to Alessandro Petrelli for his feedback).
- Added processing of new connection string element for ssl connections
Index: PgParameter.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgParameter.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PgParameter.cs 5 Aug 2003 17:59:07 -0000 1.2
--- PgParameter.cs 12 Aug 2003 13:13:03 -0000 1.3
***************
*** 37,40 ****
--- 37,41 ----
int size;
PgDbType pgDbType;
+ bool defaultCtor;
#endregion
***************
*** 133,137 ****
{
this.value = value;
! setPgTypeFromValue(this.value);
}
}
--- 134,141 ----
{
this.value = value;
! if (defaultCtor)
! {
! setPgTypeFromValue(this.value);
! }
}
}
***************
*** 143,154 ****
public PgParameter()
{
! direction = ParameterDirection.Input;
! sourceVersion = DataRowVersion.Current;
! isNullable = false;
! pgDbType = PgDbType.VarChar;
}
public PgParameter(string parameterName, object value) : this()
{
this.parameterName = parameterName;
this.value = value;
--- 147,160 ----
public PgParameter()
{
! this.direction = ParameterDirection.Input;
! this.sourceVersion = DataRowVersion.Current;
! this.isNullable = false;
! this.pgDbType = PgDbType.VarChar;
! this.defaultCtor = true;
}
public PgParameter(string parameterName, object value) : this()
{
+ this.defaultCtor = false;
this.parameterName = parameterName;
this.value = value;
***************
*** 157,160 ****
--- 163,167 ----
public PgParameter(string parameterName, PgDbType dbType) : this()
{
+ this.defaultCtor = false;
this.parameterName = parameterName;
this.pgDbType = dbType;
***************
*** 163,166 ****
--- 170,174 ----
public PgParameter(string parameterName, PgDbType dbType, int size) : this()
{
+ this.defaultCtor = false;
this.parameterName = parameterName;
this.pgDbType = dbType;
***************
*** 170,173 ****
--- 178,182 ----
public PgParameter(string parameterName, PgDbType dbType, int size, string sourceColumn) : this()
{
+ this.defaultCtor = false;
this.parameterName = parameterName;
this.pgDbType = dbType;
***************
*** 188,191 ****
--- 197,201 ----
object value)
{
+ this.defaultCtor = false;
this.parameterName = parameterName;
this.pgDbType = dbType;
***************
*** 224,227 ****
--- 234,242 ----
private void setPgTypeFromValue(object value)
{
+ if (value == null)
+ {
+ value = System.DBNull.Value;
+ }
+
switch (Type.GetTypeCode(value.GetType()))
{
|
|
From: <car...@us...> - 2003-08-12 13:17:40
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv32551 Modified Files: changelog.txt Log Message: Updated changelog.txt Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** changelog.txt 7 Aug 2003 10:59:00 -0000 1.11 --- changelog.txt 12 Aug 2003 13:14:11 -0000 1.12 *************** *** 2,5 **** --- 2,16 ---- ------------------------------------------------------- + 2003-08-12 Carlos Guzmán Álvarez <car...@te...> + + * source/PgDbConnection.cs: + + Added processing of new connection string element for ssl connections + + * source/PgParameter.cs: + + - Fixed error on null value andling and rearrange FbDbType infering from Value property + to match SqlParameter behavior ( Thanks to Alessandro Petrelli for his feedback). + 2003-07-07 Carlos Guzmán Álvarez <car...@te...> |
|
From: <car...@us...> - 2003-08-07 21:44:42
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv13021 Modified Files: changes.txt Log Message: Updated changes.txt Index: changes.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changes.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** changes.txt 5 Aug 2003 18:00:32 -0000 1.4 --- changes.txt 7 Aug 2003 21:44:39 -0000 1.5 *************** *** 3,6 **** --- 3,14 ---- + Alpha 3 ( XX-08-2003 ) + ----- - - -- -- ---- - + + * Improved PgDataReader.GetSchemaTable method using prepared statemets for retrieve + column and primary key information. + + + Alpha 3 ( 05-08-2003 ) ----- - - -- -- ---- - |
|
From: <car...@us...> - 2003-08-07 10:59:04
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv14694 Modified Files: changelog.txt Log Message: Updated CHANGELOG.TXT Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** changelog.txt 5 Aug 2003 18:00:32 -0000 1.10 --- changelog.txt 7 Aug 2003 10:59:00 -0000 1.11 *************** *** 2,5 **** --- 2,14 ---- ------------------------------------------------------- + 2003-07-07 Carlos Guzmán Álvarez <car...@te...> + + * source/PgDataReader.cs: + + - Improved GetSchemaTable method using prepared statements for retrieve column + and primary key information.. + + + < ----------------------------------- Beta 1 ---------------------------------- > |
|
From: <car...@us...> - 2003-08-07 10:58:35
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv14613
Modified Files:
PgDataReader.cs
Log Message:
- Improved GetSchemaTable method using prepared statements for retrieve column
and primary key information..
Index: PgDataReader.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDataReader.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PgDataReader.cs 3 Aug 2003 12:01:11 -0000 1.5
--- PgDataReader.cs 7 Aug 2003 10:58:32 -0000 1.6
***************
*** 219,229 ****
schemaTable.BeginLoadData();
for (int i = 0; i < command.Statement.RowDescriptor.Fields.Length; i++)
{
// Get Column Information
! object[] columnInfo = getColumnInfo(command.Statement.RowDescriptor.Fields[i]);
// Get Primary Key Info
! System.Array pKeyInfo = getPrimaryKeyInfo(command.Statement.RowDescriptor.Fields[i]);
// Add row information
--- 219,254 ----
schemaTable.BeginLoadData();
+ PgCommand cInfoCmd = getColumnInfoCmd();
+ PgCommand pKeyCmd = getPrimaryKeyInfoCmd();
+
for (int i = 0; i < command.Statement.RowDescriptor.Fields.Length; i++)
{
+ object[] columnInfo = null;
+ System.Array pKeyInfo = null;
+
+ // Execute commands
+ cInfoCmd.Parameters[0].Value = command.Statement.RowDescriptor.Fields[i].OidNumber;
+ cInfoCmd.Parameters[1].Value = command.Statement.RowDescriptor.Fields[i].OidTable;
+
+ pKeyCmd.Parameters[0].Value = command.Statement.RowDescriptor.Fields[i].OidTable;
+
+ cInfoCmd.InternalPrepare();
+ pKeyCmd.InternalPrepare();
+
+ cInfoCmd.InternalExecute();
+ pKeyCmd.InternalExecute();
+
// Get Column Information
! if (cInfoCmd.Statement.Rows.Count > 0)
! {
! columnInfo = (object[])cInfoCmd.Statement.Rows[0];
! }
// Get Primary Key Info
! if (pKeyCmd.Statement.Rows.Count > 0)
! {
! object[] temp = (object[])pKeyCmd.Statement.Rows[0];
! pKeyInfo = (System.Array)temp[3];
! }
// Add row information
***************
*** 276,330 ****
schemaTable.EndLoadData();
! }
!
return schemaTable;
}
! private object[] getColumnInfo(PgFieldDescriptor field)
{
- object[] columnInfo = null;
-
IDbSchema dbSchema = PgDbSchemaFactory.GetSchema(PgDbSchemaType.Columns);
! dbSchema.AddWhereFilter("pg_attribute.attnum = " + field.OidNumber);
! dbSchema.AddWhereFilter("pg_attribute.attrelid = " + field.OidTable);
!
! PgCommand schemaCmd = new PgCommand(dbSchema.GetCommandText(null), command.Connection);
! schemaCmd.InternalPrepare();
! schemaCmd.InternalExecute();
!
! if (schemaCmd.Statement.Rows.Count > 0)
! {
! columnInfo = (object[])schemaCmd.Statement.Rows[0];
! }
!
! schemaCmd.InternalClose();
! schemaCmd.Dispose();
! return columnInfo;
}
! private System.Array getPrimaryKeyInfo(PgFieldDescriptor field)
{
- System.Array columnInfo = null;
-
IDbSchema dbSchema = PgDbSchemaFactory.GetSchema(PgDbSchemaType.Primary_Keys);
! dbSchema.AddWhereFilter("pg_class.oid = " + field.OidTable);
! PgCommand schemaCmd = new PgCommand(dbSchema.GetCommandText(null), command.Connection);
! schemaCmd.InternalPrepare();
! schemaCmd.InternalExecute();
!
! if (schemaCmd.Statement.Rows.Count > 0)
! {
! object[] temp = (object[])schemaCmd.Statement.Rows[0];
! columnInfo = (System.Array)temp[3];
! }
! schemaCmd.InternalClose();
! schemaCmd.Dispose();
! return columnInfo;
}
--- 301,338 ----
schemaTable.EndLoadData();
!
! cInfoCmd.Dispose();
! pKeyCmd.Dispose();
! }
!
return schemaTable;
}
! private PgCommand getColumnInfoCmd()
{
IDbSchema dbSchema = PgDbSchemaFactory.GetSchema(PgDbSchemaType.Columns);
! dbSchema.AddWhereFilter("pg_attribute.attnum = @OidNumber");
! dbSchema.AddWhereFilter("pg_attribute.attrelid = @OidTable");
!
! PgCommand cmd = new PgCommand(dbSchema.GetCommandText(null), command.Connection);
! cmd.Parameters.Add("@OidNumber", PgDbType.Int4);
! cmd.Parameters.Add("@OidTable", PgDbType.Int4);
!
! return cmd;
}
! private PgCommand getPrimaryKeyInfoCmd()
{
IDbSchema dbSchema = PgDbSchemaFactory.GetSchema(PgDbSchemaType.Primary_Keys);
! dbSchema.AddWhereFilter("pg_class.oid = @OidTable");
! PgCommand cmd = new PgCommand(dbSchema.GetCommandText(null), command.Connection);
! cmd.Parameters.Add("@OidTable", PgDbType.Int4);
! return cmd;
}
|
|
From: <car...@us...> - 2003-08-05 18:00:35
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv27907 Modified Files: changelog.txt changes.txt Log Message: Updated changelog.txt and changes.txt Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** changelog.txt 5 Aug 2003 09:29:46 -0000 1.9 --- changelog.txt 5 Aug 2003 18:00:32 -0000 1.10 *************** *** 4,7 **** --- 4,19 ---- < ----------------------------------- Beta 1 ---------------------------------- > + 2003-07-05 Carlos Guzmán Álvarez <car...@te...> + + * source/PgParameter.cs: + + - Fixed casing of pgDbType field. + + + * source/PgCommandbuilder.cs: + + - Improved DeriveParameters method. + + 2003-07-03 Carlos Guzmán Álvarez <car...@te...> Index: changes.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changes.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** changes.txt 5 Aug 2003 09:29:47 -0000 1.3 --- changes.txt 5 Aug 2003 18:00:32 -0000 1.4 *************** *** 3,7 **** ! Alpha 3 ( XX-08-2003 ) ----- - - -- -- ---- - --- 3,7 ---- ! Alpha 3 ( 05-08-2003 ) ----- - - -- -- ---- - *************** *** 11,14 **** --- 11,16 ---- * Improved PostgreSQL 3.0 protocol handling. + + * Improved PgCommandBuilder.DeriveParameters method. * Added initial implementation of PgConnection.Notification for asynchronous notification support ( task #82889 ). |
|
From: <car...@us...> - 2003-08-05 17:59:36
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient In directory sc8-pr-cvs1:/tmp/cvs-serv27614 Modified Files: PgCodes.cs Log Message: Added SSL_REQUEST* constants Index: PgCodes.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgCodes.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PgCodes.cs 2 Aug 2003 19:43:02 -0000 1.1.1.1 --- PgCodes.cs 5 Aug 2003 17:59:33 -0000 1.2 *************** *** 89,98 **** public const int PROTOCOL_VERSION3 = (PROTOCOL_VERSION3_MAYOR << 16) | PROTOCOL_VERSION3_MINOR; ! // Cance request code ! public const int CANCEL_REQUEST = 80877102; // Backend & FrontEnd Message Formats ! public const int COPY_DATA = 'd'; ! public const int COPY_DONE = 'c'; // Authentication values --- 89,105 ---- public const int PROTOCOL_VERSION3 = (PROTOCOL_VERSION3_MAYOR << 16) | PROTOCOL_VERSION3_MINOR; ! // SSL Request code ! public const int SSL_REQUEST_MOST = 1234; ! public const int SSL_REQUEST_LEAST = 5679; ! public const int SSL_REQUEST = (SSL_REQUEST_MOST << 16) | SSL_REQUEST_LEAST; ! ! // Cancel request code ! public const int CANCEL_REQUEST_MOST = 1234; ! public const int CANCEL_REQUEST_LEAST = 5678; ! public const int CANCEL_REQUEST = (CANCEL_REQUEST_MOST << 16) | CANCEL_REQUEST_LEAST; // Backend & FrontEnd Message Formats ! public const int COPY_DATA = 'd'; ! public const int COPY_DONE = 'c'; // Authentication values |
|
From: <car...@us...> - 2003-08-05 17:59:10
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv27530
Modified Files:
PgCommandBuilder.cs PgParameter.cs
Log Message:
* source/PgParameter.cs:
- Fixed casing of pgDbType field.
* source/PgCommandbuilder.cs:
- Improved DeriveParameters method.
Index: PgCommandBuilder.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgCommandBuilder.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PgCommandBuilder.cs 2 Aug 2003 19:43:00 -0000 1.1.1.1
--- PgCommandBuilder.cs 5 Aug 2003 17:59:07 -0000 1.2
***************
*** 191,231 ****
}
command.Parameters.Clear();
- command.Prepare();
-
- int index = 0;
! // Derive input parameters
! if (command.Statement.Parameters != null)
{
! for (int i = 0; i < command.Statement.Parameters.Length; i++)
{
! PgType type = command.Statement.Parameters[i].DataType;
! PgParameter parameter = new PgParameter();
! parameter.ParameterName = "@ip" + i.ToString();
! parameter.DbType = type.DbType;
! command.Parameters.Add(parameter);
}
!
! index = command.Parameters.Count;
! }
!
! if (command.Statement.RowDescriptor != null)
! {
! // Derive output parameters
! for (int i = 0; i < command.Statement.RowDescriptor.Fields.Length; i++)
{
! PgType type = command.Statement.RowDescriptor.Fields[i].DataType;
!
! PgParameter parameter = new PgParameter();
! parameter.ParameterName = "@ip" + i.ToString();
! parameter.DbType = type.DbType;
!
! command.Parameters.Add(parameter);
! index++;
}
}
}
--- 191,232 ----
}
+ string paramsText = String.Empty;
+
command.Parameters.Clear();
! DataTable spSchema = command.Connection.GetDbSchemaTable(PgDbSchemaType.Functions,
! new object[] {null, command.CommandText.ToLower()});
!
! if (spSchema.Rows.Count != 0)
{
! int[] parameterTypes = (int[])spSchema.Rows[0]["ARGUMENTS"];
! int parameterCount = (short)spSchema.Rows[0]["ARGUMENT_NUMBER"];
!
! for (int i = 0; i < parameterCount; i++)
{
! PgParameter parameter = command.Parameters.Add(
! "@ip" + i.ToString(),
! PgDbClient.Types[parameterTypes[i]].ProviderType);
! parameter.Direction = ParameterDirection.Input;
! paramsText = paramsText + parameter.ParameterName;
! if ((i + 1) != parameterCount)
! {
! paramsText = paramsText + ",";
! }
}
!
! int returnType = (int)spSchema.Rows[0]["RETURN_TYPE"];
! if (returnType != 0)
{
! PgParameter parameter = command.Parameters.Add(
! "@op0",
! PgDbClient.Types[returnType]);
! parameter.Direction = ParameterDirection.Output;
}
+
+ command.CommandText = command.CommandText + "(" + paramsText + ")";
}
}
Index: PgParameter.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgParameter.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PgParameter.cs 2 Aug 2003 19:43:01 -0000 1.1.1.1
--- PgParameter.cs 5 Aug 2003 17:59:07 -0000 1.2
***************
*** 36,40 ****
byte scale;
int size;
! PgDbType PgDbType;
#endregion
--- 36,40 ----
byte scale;
int size;
! PgDbType pgDbType;
#endregion
***************
*** 82,87 ****
public DbType DbType
{
! get { return PgDbTypeToDbType(PgDbType); }
! set { PgDbType = dbTypeToPgType(value); }
}
--- 82,87 ----
public DbType DbType
{
! get { return PgDbTypeToDbType(pgDbType); }
! set { pgDbType = dbTypeToPgType(value); }
}
***************
*** 89,96 ****
Category("Data"),
DefaultValue(PgDbType.VarChar)]
! public PgDbType PgType
{
! get { return PgDbType; }
! set { PgDbType = value; }
}
--- 89,96 ----
Category("Data"),
DefaultValue(PgDbType.VarChar)]
! public PgDbType PgDbType
{
! get { return pgDbType; }
! set { pgDbType = value; }
}
***************
*** 146,150 ****
sourceVersion = DataRowVersion.Current;
isNullable = false;
! PgDbType = PgDbType.VarChar;
}
--- 146,150 ----
sourceVersion = DataRowVersion.Current;
isNullable = false;
! pgDbType = PgDbType.VarChar;
}
***************
*** 158,162 ****
{
this.parameterName = parameterName;
! this.PgDbType = dbType;
}
--- 158,162 ----
{
this.parameterName = parameterName;
! this.pgDbType = dbType;
}
***************
*** 164,168 ****
{
this.parameterName = parameterName;
! this.PgDbType = dbType;
this.size = size;
}
--- 164,168 ----
{
this.parameterName = parameterName;
! this.pgDbType = dbType;
this.size = size;
}
***************
*** 171,175 ****
{
this.parameterName = parameterName;
! this.PgDbType = dbType;
this.size = size;
this.sourceColumn = sourceColumn;
--- 171,175 ----
{
this.parameterName = parameterName;
! this.pgDbType = dbType;
this.size = size;
this.sourceColumn = sourceColumn;
***************
*** 189,193 ****
{
this.parameterName = parameterName;
! this.PgDbType = dbType;
this.size = size;
this.direction = direction;
--- 189,193 ----
{
this.parameterName = parameterName;
! this.pgDbType = dbType;
this.size = size;
this.direction = direction;
|
|
From: <car...@us...> - 2003-08-05 09:29:49
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv2607 Modified Files: changelog.txt changes.txt Log Message: - Updated changelog.txt - Updated changes.txt Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** changelog.txt 3 Aug 2003 12:01:48 -0000 1.8 --- changelog.txt 5 Aug 2003 09:29:46 -0000 1.9 *************** *** 2,5 **** --- 2,6 ---- ------------------------------------------------------- + < ----------------------------------- Beta 1 ---------------------------------- > 2003-07-03 Carlos Guzmán Álvarez <car...@te...> Index: changes.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changes.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** changes.txt 2 Aug 2003 19:50:36 -0000 1.2 --- changes.txt 5 Aug 2003 09:29:47 -0000 1.3 *************** *** 3,20 **** ! Alpha 3 ( XX-XX-2003 ) ----- - - -- -- ---- - ! * Added makefile for mono:: in linux. * Improved PostgreSQL 3.0 protocol handling. ! * Added initial implementation of asynchronous notification ( PgConnection.Notification ) support ( task #82889 ). * Added initial implementation of PgConnection.InfoMessage event ( task #82902 ). ! * Changed casing of all clasess from PgXXX to PgXXX to follow MS' guidelines. ! * New directory structure in the CVS for match class, file and directory names. --- 3,25 ---- ! Alpha 3 ( XX-08-2003 ) ----- - - -- -- ---- - ! * Bug fixes. ! ! * Improved NUnit test suite. * Improved PostgreSQL 3.0 protocol handling. ! * Added initial implementation of PgConnection.Notification for asynchronous notification support ( task #82889 ). * Added initial implementation of PgConnection.InfoMessage event ( task #82902 ). ! * Added initial implementation of serial fields support ( task #81647 ). ! * Changed casing of all clasess from PGXXX to PgXXX to follow MS' guidelines. ! ! * New directory structure in the CVS for match class, file and directory names ! ( pgsqlclient_10 is the actual cvs developement module ) *************** *** 41,45 **** Alpha 2 ( 27-07-2003 ) ----- - - -- -- ---- - - Initial release. --- 46,49 ---- |
|
From: <car...@us...> - 2003-08-03 12:01:51
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv1340 Modified Files: changelog.txt Log Message: Updated changelog.txt Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** changelog.txt 3 Aug 2003 11:03:30 -0000 1.7 --- changelog.txt 3 Aug 2003 12:01:48 -0000 1.8 *************** *** 5,8 **** --- 5,10 ---- 2003-07-03 Carlos Guzmán Álvarez <car...@te...> + * Added test case for error 782096. + * Added serial field for NUnit test suite. |
|
From: <car...@us...> - 2003-08-03 12:01:14
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv1275
Modified Files:
PgDataReader.cs
Log Message:
Fix problem with latest changes fo Autoincrement fields.
Index: PgDataReader.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDataReader.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgDataReader.cs 3 Aug 2003 10:21:25 -0000 1.4
--- PgDataReader.cs 3 Aug 2003 12:01:11 -0000 1.5
***************
*** 248,253 ****
schemaRow["IsRowVersion"] = false;
schemaRow["IsUnique"] = false;
- schemaRow["IsReadOnly"] = (bool)columnInfo[10];
- schemaRow["IsAutoIncrement"] = (bool)columnInfo[10];
schemaRow["IsAliased"] = isAliased(i);
schemaRow["IsExpression"] = isExpression(i);
--- 248,251 ----
***************
*** 255,258 ****
--- 253,258 ----
if (columnInfo != null)
{
+ schemaRow["IsReadOnly"] = (bool)columnInfo[10];
+ schemaRow["IsAutoIncrement"] = (bool)columnInfo[10];
schemaRow["IsKey"] = isPrimaryKey(pKeyInfo, (short)columnInfo[6]);
schemaRow["AllowDBNull"] = ((bool)columnInfo[9]) ? false : true;
***************
*** 263,266 ****
--- 263,268 ----
else
{
+ schemaRow["IsReadOnly"] = false;
+ schemaRow["IsAutoIncrement"] = false;
schemaRow["IsKey"] = false;
schemaRow["AllowDBNull"] = System.DBNull.Value;
|
|
From: <car...@us...> - 2003-08-03 12:00:32
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient.UnitTests/source
In directory sc8-pr-cvs1:/tmp/cvs-serv1159
Modified Files:
PgCommandTest.cs
Log Message:
Added test case for error 782096
Index: PgCommandTest.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient.UnitTests/source/PgCommandTest.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PgCommandTest.cs 2 Aug 2003 19:43:03 -0000 1.1.1.1
--- PgCommandTest.cs 3 Aug 2003 12:00:25 -0000 1.2
***************
*** 94,97 ****
--- 94,100 ----
Console.Write("\r\n");
}
+
+ reader.Close();
+ command.Dispose();
}
***************
*** 182,185 ****
--- 185,218 ----
Assertion.Assert(recordsAffected == 1);
+ }
+
+ [Test]
+ public void TestError782096()
+ {
+ Console.WriteLine("\r\nPgCommandTest.TestError782096");
+
+ PgCommand command = new PgCommand("SELECT * FROM public.test_table ORDER BY date_field", Connection);
+ PgDataReader reader = command.ExecuteReader();
+
+ for (int i = 0; i < reader.FieldCount; i++)
+ {
+ Console.Write("{0}\t\t", reader.GetName(i));
+ }
+ Console.Write("\r\n");
+
+ while (reader.Read())
+ {
+ object[] values = new object[reader.FieldCount];
+ reader.GetValues(values);
+
+ for (int i = 0; i < values.Length; i++)
+ {
+ Console.Write("{0}\t\t", values[i]);
+ }
+ Console.Write("\r\n");
+ }
+
+ command.Dispose();
+ reader.Close();
}
}
|
|
From: <car...@us...> - 2003-08-03 11:03:32
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv25301 Modified Files: changelog.txt Log Message: Updated changelog.txt Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** changelog.txt 3 Aug 2003 10:24:12 -0000 1.6 --- changelog.txt 3 Aug 2003 11:03:30 -0000 1.7 *************** *** 5,8 **** --- 5,10 ---- 2003-07-03 Carlos Guzmán Álvarez <car...@te...> + * Added serial field for NUnit test suite. + * source/PgDataReader.cs: |
|
From: <car...@us...> - 2003-08-03 11:03:04
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient.UnitTests/source
In directory sc8-pr-cvs1:/tmp/cvs-serv25232
Modified Files:
PgBaseTest.cs
Log Message:
Added serial field for NUnit test suite.
Index: PgBaseTest.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient.UnitTests/source/PgBaseTest.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PgBaseTest.cs 2 Aug 2003 19:43:03 -0000 1.1.1.1
--- PgBaseTest.cs 3 Aug 2003 11:03:01 -0000 1.2
***************
*** 139,143 ****
commandText.Append("time_field time,");
commandText.Append("timestamp_field timestamp,");
- // commandText.Append("serial_field serial NOT NULL,");
commandText.Append("blob_field bytea,");
commandText.Append("bool_field bool,");
--- 139,142 ----
***************
*** 147,150 ****
--- 146,150 ----
commandText.Append("numeric_field numeric(8,2),");
commandText.Append("array_int int2[],");
+ commandText.Append("serial_field serial NOT NULL,");
commandText.Append("CONSTRAINT test_table_pkey PRIMARY KEY (int4_field)");
commandText.Append(") WITH OIDS;");
|
|
From: <car...@us...> - 2003-08-03 10:24:15
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv20863 Modified Files: changelog.txt Log Message: Updated changelog.txt Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** changelog.txt 3 Aug 2003 10:23:47 -0000 1.5 --- changelog.txt 3 Aug 2003 10:24:12 -0000 1.6 *************** *** 8,12 **** - Finished initial implementation for autoincrement fields ( serial ) at ! PgDataReader.GetSchemaTable method (#). - Improved primary key handling. --- 8,12 ---- - Finished initial implementation for autoincrement fields ( serial ) at ! PgDataReader.GetSchemaTable method (#81647). - Improved primary key handling. *************** *** 14,18 **** * source/DbSchema/PgColumnsSchema.cs: ! - Finished implementation for autoincrement fields ( serial ) support (#). --- 14,18 ---- * source/DbSchema/PgColumnsSchema.cs: ! - Finished implementation for autoincrement fields ( serial ) support (#81647). |
|
From: <car...@us...> - 2003-08-03 10:23:50
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv20785 Modified Files: changelog.txt Log Message: Updated changelog.txt Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** changelog.txt 2 Aug 2003 23:45:32 -0000 1.4 --- changelog.txt 3 Aug 2003 10:23:47 -0000 1.5 *************** *** 3,6 **** --- 3,20 ---- + 2003-07-03 Carlos Guzmán Álvarez <car...@te...> + + * source/PgDataReader.cs: + + - Finished initial implementation for autoincrement fields ( serial ) at + PgDataReader.GetSchemaTable method (#). + + - Improved primary key handling. + + * source/DbSchema/PgColumnsSchema.cs: + + - Finished implementation for autoincrement fields ( serial ) support (#). + + 2003-07-02 Carlos Guzmán Álvarez <car...@te...> |
|
From: <car...@us...> - 2003-08-03 10:23:06
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema
In directory sc8-pr-cvs1:/tmp/cvs-serv20741
Modified Files:
PgColumnsSchema.cs
Log Message:
* source/PgDataReader.cs:
- Finished initial implementation for autoincrement fields ( serial ) at
PgDataReader.GetSchemaTable method (#).
- Improved primary key handling.
* source/DbSchema/PgColumnsSchema.cs:
- Finished implementation for autoincrement fields ( serial ) support (#).
Index: PgColumnsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgColumnsSchema.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgColumnsSchema.cs 2 Aug 2003 23:44:59 -0000 1.3
--- PgColumnsSchema.cs 3 Aug 2003 10:23:03 -0000 1.4
***************
*** 69,73 ****
AddJoin("left join",
"pg_depend",
! "(pg_attribute.attrelid = pg_depend.objid AND pg_depend.deptype = 'i')");
}
--- 69,73 ----
AddJoin("left join",
"pg_depend",
! "(pg_attribute.attrelid = pg_depend.refobjid AND pg_attribute.attnum = pg_depend.refobjsubid AND pg_depend.deptype = 'i')");
}
|
|
From: <car...@us...> - 2003-08-03 10:21:27
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv20587
Modified Files:
PgDataReader.cs
Log Message:
* source/PgDataReader.cs:
- Finished initial implementation for autoincrement fields ( serial ) at
PgDataReader.GetSchemaTable method (#).
- Improved primary key handling.
* source/DbSchema/PgColumnsSchema.cs:
- Finished implementation for autoincrement fields ( serial ) support (#).
Index: PgDataReader.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgDataReader.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PgDataReader.cs 2 Aug 2003 23:43:50 -0000 1.3
--- PgDataReader.cs 3 Aug 2003 10:21:25 -0000 1.4
***************
*** 248,261 ****
schemaRow["IsRowVersion"] = false;
schemaRow["IsUnique"] = false;
! if ((bool)columnInfo[10])
! {
! schemaRow["IsReadOnly"] = true;
! schemaRow["IsAutoIncrement"] = true;
! }
! else
! {
! schemaRow["IsReadOnly"] = false;
! schemaRow["IsAutoIncrement"] = false;
! }
schemaRow["IsAliased"] = isAliased(i);
schemaRow["IsExpression"] = isExpression(i);
--- 248,253 ----
schemaRow["IsRowVersion"] = false;
schemaRow["IsUnique"] = false;
! schemaRow["IsReadOnly"] = (bool)columnInfo[10];
! schemaRow["IsAutoIncrement"] = (bool)columnInfo[10];
schemaRow["IsAliased"] = isAliased(i);
schemaRow["IsExpression"] = isExpression(i);
***************
*** 337,347 ****
private bool isPrimaryKey(System.Array pKeyInfo, short ordinal)
{
! for (int i = pKeyInfo.GetLowerBound(0); i <= pKeyInfo.GetUpperBound(0); i++)
{
! if ((short)pKeyInfo.GetValue(i) == ordinal)
{
! return true;
}
}
return false;
}
--- 329,343 ----
private bool isPrimaryKey(System.Array pKeyInfo, short ordinal)
{
! if (pKeyInfo != null)
{
! for (int i = pKeyInfo.GetLowerBound(0); i <= pKeyInfo.GetUpperBound(0); i++)
{
! if ((short)pKeyInfo.GetValue(i) == ordinal)
! {
! return true;
! }
}
}
+
return false;
}
|
|
From: <car...@us...> - 2003-08-02 23:45:53
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10 In directory sc8-pr-cvs1:/tmp/cvs-serv7297 Modified Files: changelog.txt Log Message: Update changelog.txt Index: changelog.txt =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/changelog.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** changelog.txt 2 Aug 2003 21:16:49 -0000 1.3 --- changelog.txt 2 Aug 2003 23:45:32 -0000 1.4 *************** *** 14,18 **** - Fixed error closing the DataReader when the subyacent command is disposed (#782096) ! - Added test code for serial fields. --- 14,22 ---- - Fixed error closing the DataReader when the subyacent command is disposed (#782096) ! - Added code for check autoincrement fields at GetSchemaTable method. ! ! * source/DbSchema/P^gDbSchemaColumns.cs: ! ! - Added new column for know if a field is autoincrement. |
|
From: <car...@us...> - 2003-08-02 23:45:02
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema
In directory sc8-pr-cvs1:/tmp/cvs-serv7181
Modified Files:
PgColumnsSchema.cs
Log Message:
Added new column for know if a field is autoincrement.
Index: PgColumnsSchema.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/DbSchema/PgColumnsSchema.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PgColumnsSchema.cs 2 Aug 2003 21:11:37 -0000 1.2
--- PgColumnsSchema.cs 2 Aug 2003 23:44:59 -0000 1.3
***************
*** 56,59 ****
--- 56,60 ----
AddDataColumn("pg_attrdef.adsrc" , "COLUMN_DEFAULT");
AddDataColumn("pg_attribute.attnotnull" , "IS_NOT_NULL");
+ AddDataColumn("(pg_depend.objid is not null)", "IS_AUTOINCREMENT");
AddDataColumn(getStorageExpression("pg_attribute.attstorage"), "STORAGE");
AddDataColumn("pg_description.description", "DESCRIPTION");
***************
*** 64,69 ****
AddJoin("left join", "pg_class" , "pg_attribute.attrelid = pg_class.oid");
AddJoin("left join", "pg_namespace" , "pg_class.relnamespace = pg_namespace.oid");
! AddJoin("left join", "pg_attrdef" , "pg_class.oid = pg_attrdef.adrelid AND pg_attribute.attnum = pg_attrdef.adnum");
! AddJoin("left join", "pg_description", "pg_attribute.attrelid = pg_description.objoid AND pg_attribute.attnum = pg_description.objsubid");
}
--- 65,73 ----
AddJoin("left join", "pg_class" , "pg_attribute.attrelid = pg_class.oid");
AddJoin("left join", "pg_namespace" , "pg_class.relnamespace = pg_namespace.oid");
! AddJoin("left join", "pg_attrdef" , "(pg_class.oid = pg_attrdef.adrelid AND pg_attribute.attnum = pg_attrdef.adnum)");
! AddJoin("left join", "pg_description", "(pg_attribute.attrelid = pg_description.objoid AND pg_attribute.attnum = pg_description.objsubid)");
! AddJoin("left join",
! "pg_depend",
! "(pg_attribute.attrelid = pg_depend.objid AND pg_depend.deptype = 'i')");
}
***************
*** 97,100 ****
--- 101,116 ----
#region PRIVATE_METHODS
+
+ private string getSerialExpression(string fieldName)
+ {
+ StringBuilder expression = new StringBuilder();
+
+ expression.AppendFormat(" case {0} ", fieldName);
+ expression.Append(" when 0 THEN true");
+ expression.Append(" default THEN false");
+ expression.Append(" END ");
+
+ return expression.ToString();
+ }
private string getStorageExpression(string fieldName)
|