summaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc/org/postgresql/util
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-08-13 20:40:44 +0000
committerBruce Momjian <bruce@momjian.us>2002-08-13 20:40:44 +0000
commit46bb23ac016714065711cf2a780e080c7310d66e (patch)
tree24c508c5c37af724da039332f60dbf31039993a5 /src/interfaces/jdbc/org/postgresql/util
parentf8b4a2e0f0a0dd7d1cefd53d8048bfb58f33bd37 (diff)
downloadpostgresql-46bb23ac016714065711cf2a780e080c7310d66e.tar.gz
Change NAMEDATALEN to 64, INDEX_MAX_KEYS/MAX_FUNC_ARGS to 32, per discussion on hackers.
Diffstat (limited to 'src/interfaces/jdbc/org/postgresql/util')
-rw-r--r--src/interfaces/jdbc/org/postgresql/util/Serialize.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/util/Serialize.java b/src/interfaces/jdbc/org/postgresql/util/Serialize.java
index f1f12520ba..8898e1ecf4 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('.', '_');