aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc/utils
diff options
context:
space:
mode:
authorBarry Lind <barry@xythos.com>2002-10-20 02:55:50 +0000
committerBarry Lind <barry@xythos.com>2002-10-20 02:55:50 +0000
commit06b297938d9c16eff26a29d2fed5a867a6122b15 (patch)
tree6ef3e7583543b5e14123db008ea0b43c83b40b3f /src/interfaces/jdbc/utils
parente9f07b14e11932a1cfb39e4196a90025d639f864 (diff)
downloadpostgresql-06b297938d9c16eff26a29d2fed5a867a6122b15.tar.gz
postgresql-06b297938d9c16eff26a29d2fed5a867a6122b15.zip
Applied patch from Teofilis Martisius to improve performance.
Also removed some unused files and fixed the which needed a small change after the previous patch to build.xml. Modified Files: jdbc/Makefile jdbc/org/postgresql/core/Encoding.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java Removed Files: jdbc/utils/CheckVersion.java jdbc/utils/buildDriver jdbc/utils/changelog.pl
Diffstat (limited to 'src/interfaces/jdbc/utils')
-rw-r--r--src/interfaces/jdbc/utils/CheckVersion.java74
-rwxr-xr-xsrc/interfaces/jdbc/utils/buildDriver47
-rw-r--r--src/interfaces/jdbc/utils/changelog.pl23
3 files changed, 0 insertions, 144 deletions
diff --git a/src/interfaces/jdbc/utils/CheckVersion.java b/src/interfaces/jdbc/utils/CheckVersion.java
deleted file mode 100644
index a2438cd4f9f..00000000000
--- a/src/interfaces/jdbc/utils/CheckVersion.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package utils;
-
-/*
- * This little app checks to see what version of JVM is being used.
- * It does this by checking first the java.vm.version property, and
- * if that fails, it looks for certain classes that should be present.
- */
-public class CheckVersion
-{
- /*
- * Check for the existence of a class by attempting to load it
- */
- public static boolean checkClass(String c)
- {
- try
- {
- Class.forName(c);
- }
- catch (Exception e)
- {
- return false;
- }
- return true;
- }
-
- /*
- * This first checks java.vm.version for 1.1, 1.2 or 1.3.
- *
- * It writes jdbc1 to stdout for the 1.1.x VM.
- *
- * For 1.2 or 1.3, it checks for the existence of the javax.sql.DataSource
- * interface, and if found writes enterprise to stdout. If the interface
- * is not found, it writes jdbc2 to stdout.
- *
- * PS: It also looks for the existence of java.lang.Byte which appeared in
- * JDK1.1.0 incase java.vm.version is not heeded by some JVM's.
- *
- * If it can't work it out, it writes huho to stdout.
- *
- * The make file uses the written results to determine which rule to run.
- *
- * Bugs: This needs thorough testing.
- */
- public static void main(String args[])
- {
- String vmversion = System.getProperty("java.vm.version");
-
- System.out.println("postgresql.jdbc=" + System.getProperty("postgresql.jdbc"));
-
- // We are running a 1.1 JVM
- if (vmversion.startsWith("1.1"))
- {
- System.out.println("jdbc1");
- //System.exit(0);
- }
- else
- // We are running a 1.2 or 1.3 JVM
- if (vmversion.startsWith("1.2") ||
- vmversion.startsWith("1.3") ||
- checkClass("java.lang.Byte")
- )
- {
-
- // Check to see if we have the standard extensions. If so, then
- // we want the enterprise edition, otherwise the jdbc2 driver.
- if (checkClass("javax.sql.DataSource"))
- System.out.println("enterprise");
- else
- System.out.println("jdbc2");
- //System.exit(0);
- }
- System.setProperty("postgresql.jdbc", "yoyo");
- }
-}
diff --git a/src/interfaces/jdbc/utils/buildDriver b/src/interfaces/jdbc/utils/buildDriver
deleted file mode 100755
index 8cca1d9c36d..00000000000
--- a/src/interfaces/jdbc/utils/buildDriver
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-#
-# $Id: buildDriver,v 1.2 2000/12/20 16:22:49 peter Exp $
-#
-# This script generates the org/postgresql/Driver.java file from the template
-# org/postgresql/Driver.java.in
-#
-# We do this because we need to include the version number from Makefile.global
-# and some other goodies.
-#
-# This used to be in Makefile, but as it's now done three times, it's better
-# to have it as a separate script.
-#
-# If you have any problems, please let us know ;-)
-#
-# Syntax: buildDriver version class
-#
-# Where:
-# version The version string from Makefile.global
-# class The class implementing java.sql.Connection
-# edition The driver edition being built
-# source The file to build. We assume that ${source}.in exists
-#
-
-VERSION=$1
-CLASS=$2
-EDITION=$3
-SOURCE=$4
-
-#---------------------------------------------------------------------------
-# Extract the version. This will work until version x.9 (and assuming we don't
-# have 7.10 etc). We only handle 1 digit for MINORVERSION to handle things like
-# 7.1devel etc
-#
-MAJORVERSION=`echo $VERSION | cut -f1 -d'.'`
-MINORVERSION=`echo $VERSION | cut -f2 -d'.' | cut -c1`
-
-#---------------------------------------------------------------------------
-# Now finally build the driver
-sed \
- -e "s/@JDBCCONNECTCLASS@/$CLASS/g" \
- -e "s/@VERSION@/$VERSION $EDITION/g" \
- -e "s/@MAJORVERSION@/$MAJORVERSION/g" \
- -e "s/@MINORVERSION@/$MINORVERSION/g" \
- <${SOURCE}.in \
- >$SOURCE
-#---------------------------------------------------------------------------
diff --git a/src/interfaces/jdbc/utils/changelog.pl b/src/interfaces/jdbc/utils/changelog.pl
deleted file mode 100644
index 3cba15aa91d..00000000000
--- a/src/interfaces/jdbc/utils/changelog.pl
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/perl
-
-while(<>) {
- chomp();
- s/\t+/ /g;
- if(substr($_,0,3) eq ' - ') {
- print "<ul>" if !$inlist;
- $inlist=1;
- print "<li>".substr($_,3)."\n";
- } else {
- if($_ eq "" || $_ eq " ") {
- print "</ul>" if $inlist;
- $inlist=0;
- print "<br>\n";
- } elsif(substr($_,0,1) eq " ") {
- print $_;
- } else {
- print "</ul>" if $inlist;
- $inlist=0;
- print "<h4>".$_."</h4>\n";
- }
- }
-}