diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-08-13 20:40:44 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-08-13 20:40:44 +0000 |
commit | 46bb23ac016714065711cf2a780e080c7310d66e (patch) | |
tree | 24c508c5c37af724da039332f60dbf31039993a5 /src/interfaces/jdbc | |
parent | f8b4a2e0f0a0dd7d1cefd53d8048bfb58f33bd37 (diff) | |
download | postgresql-46bb23ac016714065711cf2a780e080c7310d66e.tar.gz postgresql-46bb23ac016714065711cf2a780e080c7310d66e.zip |
Change NAMEDATALEN to 64, INDEX_MAX_KEYS/MAX_FUNC_ARGS to 32, per discussion on hackers.
Diffstat (limited to 'src/interfaces/jdbc')
-rw-r--r-- | src/interfaces/jdbc/org/postgresql/errors.properties | 2 | ||||
-rw-r--r-- | src/interfaces/jdbc/org/postgresql/util/Serialize.java | 12 |
2 files changed, 7 insertions, 7 deletions
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: * <ul> - * <li>The class name must be less than 32 chars long and must be all lowercase. + * <li>The class name must be less than 64 chars long and must be all lowercase. * This is due to limitations in Postgres about the size of table names. * The name must be all lowercase since table names in Postgres are * case insensitive and the relname is stored in lowercase. Unless some @@ -577,7 +577,7 @@ public class Serialize * * Because of this, a Class name may not have _ in the name.<p> * 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('.', '_'); |