*/
	public java.sql.ResultSet getTypeInfo() throws SQLException
	{

		ResultSetField f[] = new ResultSetField[18];
		ArrayList v = new ArrayList(); // The new ResultSet tuple stuff

		f[0] = new ResultSetField("TYPE_NAME", TypeOid.VARCHAR,
			getMaxNameLength());
		f[1] = new ResultSetField("DATA_TYPE", TypeOid.INT2, 2);
		f[2] = new ResultSetField("PRECISION", TypeOid.INT4, 4);
		f[3] = new ResultSetField("LITERAL_PREFIX", TypeOid.VARCHAR,
			getMaxNameLength());
		f[4] = new ResultSetField("LITERAL_SUFFIX", TypeOid.VARCHAR,
			getMaxNameLength());
		f[5] = new ResultSetField("CREATE_PARAMS", TypeOid.VARCHAR,
			getMaxNameLength());
		f[6] = new ResultSetField("NULLABLE", TypeOid.INT2, 2);
		f[7] = new ResultSetField("CASE_SENSITIVE", TypeOid.BOOL, 1);
		f[8] = new ResultSetField("SEARCHABLE", TypeOid.INT2, 2);
		f[9] = new ResultSetField("UNSIGNED_ATTRIBUTE", TypeOid.BOOL, 1);
		f[10] = new ResultSetField("FIXED_PREC_SCALE", TypeOid.BOOL, 1);
		f[11] = new ResultSetField("AUTO_INCREMENT", TypeOid.BOOL, 1);
		f[12] = new ResultSetField("LOCAL_TYPE_NAME", TypeOid.VARCHAR,
			getMaxNameLength());
		f[13] = new ResultSetField("MINIMUM_SCALE", TypeOid.INT2, 2);
		f[14] = new ResultSetField("MAXIMUM_SCALE", TypeOid.INT2, 2);
		f[15] = new ResultSetField("SQL_DATA_TYPE", TypeOid.INT4, 4);
		f[16] = new ResultSetField("SQL_DATETIME_SUB", TypeOid.INT4, 4);
		f[17] = new ResultSetField("NUM_PREC_RADIX", TypeOid.INT4, 4);

		String sql = "SELECT typname FROM pg_catalog.pg_type where typrelid = 0";

		ResultSet rs = m_connection.createStatement().executeQuery(sql);
		// cache some results, this will keep memory useage down, and speed
		// things up a little.
		Integer i9 = new Integer(9);
		Integer i10 = new Integer(10);
		Short nn = new Short((short)java.sql.DatabaseMetaData.typeNoNulls);
		Short ts = new Short((short)java.sql.DatabaseMetaData.typeSearchable);

		String typname = null;

		while(rs.next())
		{
			Object[] tuple = new Object[18];
			typname = rs.getString(1);
			tuple[0] = typname;
			tuple[1] = new Short((short)m_connection.getSQLType(typname));
			tuple[2] = i9; // for now
			tuple[6] = nn; // for now
			tuple[7] = Boolean.FALSE; // false for now - not case sensitive
			tuple[8] = ts;
			tuple[9] = Boolean.FALSE; // false for now - it's signed
			tuple[10] = Boolean.FALSE; // false for now - must handle money
			tuple[11] = Boolean.FALSE; // false - it isn't autoincrement

			// 12 - LOCAL_TYPE_NAME is null
			// 13 & 14 ?
			// 15 & 16 are unused so we return null
			tuple[17] = i10; // everything is base 10
			v.add(tuple);

			// add pseudo-type serial, bigserial
			if(typname.equals("int4"))
			{
				Object[] tuple1 = (Object[])tuple.clone();

				tuple1[0] = "serial";
				tuple1[11] = Boolean.TRUE;
				v.add(tuple1);
			}
			else if(typname.equals("int8"))
			{
				Object[] tuple1 = (Object[])tuple.clone();

				tuple1[0] = "bigserial";
				tuple1[11] = Boolean.TRUE;
				v.add(tuple1);
			}

		}
		rs.close();

		return createSyntheticResultSet(f, v);
	}