From 46bb23ac016714065711cf2a780e080c7310d66e Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 13 Aug 2002 20:40:44 +0000 Subject: Change NAMEDATALEN to 64, INDEX_MAX_KEYS/MAX_FUNC_ARGS to 32, per discussion on hackers. --- src/interfaces/jdbc/org/postgresql/errors.properties | 2 +- src/interfaces/jdbc/org/postgresql/util/Serialize.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/interfaces') diff --git a/src/interfaces/jdbc/org/postgresql/errors.properties b/src/interfaces/jdbc/org/postgresql/errors.properties index 26ff2f724b2..d03673351b1 100644 --- a/src/interfaces/jdbc/org/postgresql/errors.properties +++ b/src/interfaces/jdbc/org/postgresql/errors.properties @@ -61,7 +61,7 @@ postgresql.res.colname:The column name {0} not found. postgresql.res.colrange:The column index is out of range. postgresql.res.nextrequired:Result set not positioned properly, perhaps you need to call next(). postgresql.serial.interface:You cannot serialize an interface. -postgresql.serial.namelength:Class & Package name length cannot be longer than 32 characters. {0} is {1} characters. +postgresql.serial.namelength:Class & Package name length cannot be longer than 64 characters. {0} is {1} characters. postgresql.serial.noclass:No class found for {0} postgresql.serial.table:The table for {0} is not in the database. Contact the DBA, as the database is in an inconsistent state. postgresql.serial.underscore:Class names may not have _ in them. You supplied {0}. diff --git a/src/interfaces/jdbc/org/postgresql/util/Serialize.java b/src/interfaces/jdbc/org/postgresql/util/Serialize.java index f1f12520baa..8898e1ecf4e 100644 --- a/src/interfaces/jdbc/org/postgresql/util/Serialize.java +++ b/src/interfaces/jdbc/org/postgresql/util/Serialize.java @@ -57,7 +57,7 @@ import java.sql.*; * There are a number of limitations placed on the java class to be * used by Serialize: *
* Another limitation, is that the entire class name (including packages) - * cannot be longer than 32 characters (a limit forced by PostgreSQL). + * cannot be longer than 64 characters (a limit forced by PostgreSQL). * * @param name Class name * @return PostgreSQL table name @@ -590,16 +590,16 @@ public class Serialize if (name.indexOf("_") > -1) throw new PSQLException("postgresql.serial.underscore"); - // Postgres table names can only be 32 character long. - // Reserve 1 char, so allow only up to 31 chars. + // Postgres table names can only be 64 character long. + // Reserve 1 char, so allow only up to 63 chars. // If the full class name with package is too long // then just use the class name. If the class name is // too long throw an exception. // - if ( name.length() > 31 ) + if ( name.length() > 63 ) { name = name.substring(name.lastIndexOf(".") + 1); - if ( name.length() > 31 ) + if ( name.length() > 63 ) throw new PSQLException("postgresql.serial.namelength", name, new Integer(name.length())); } return name.replace('.', '_'); -- cgit v1.2.3