original_string: function _DropAutoIncrement($tabname)
  	{
  		$tabname = $this->connection->quote('%'.$tabname.'%');
  
  		$seq = $this->connection->GetOne("SELECT relname FROM pg_class WHERE NOT relname ~ 'pg_.*' AND relname LIKE $tabname AND relkind='S'");
  
  		// check if a tables depends on the sequenz and it therefor cant and dont need to be droped separatly
  		if (!$seq || $this->connection->GetOne("SELECT relname FROM pg_class JOIN pg_depend ON pg_class.relfilenode=pg_depend.objid WHERE relname='$seq' AND relkind='S' AND deptype='i'")) {
  			return False;
  		}
  		return "DROP SEQUENCE ".$seq;
  	}
code: function _DropAutoIncrement($tabname)
  	{
  		$tabname = $this->connection->quote('%'.$tabname.'%');
  
  		$seq = $this->connection->GetOne("SELECT relname FROM pg_class WHERE NOT relname ~ 'pg_.*' AND relname LIKE $tabname AND relkind='S'");
  
  		// check if a tables depends on the sequenz and it therefor cant and dont need to be droped separatly
  		if (!$seq || $this->connection->GetOne("SELECT relname FROM pg_class JOIN pg_depend ON pg_class.relfilenode=pg_depend.objid WHERE relname='$seq' AND relkind='S' AND deptype='i'")) {
  			return False;
  		}
  		return "DROP SEQUENCE ".$seq;
  	}
code_tokens: function _DropAutoIncrement ( $ tabname ) { $ tabname = $ this -> connection -> quote ( '%' . $ tabname . '%' ) ; $ seq = $ this -> connection -> GetOne ( "SELECT relname FROM pg_class WHERE NOT relname ~ 'pg_.*' AND relname LIKE $tabname AND relkind='S'" ) ; // check if a tables depends on the sequenz and it therefor cant and dont need to be droped separatly if ( ! $ seq || $ this -> connection -> GetOne ( "SELECT relname FROM pg_class JOIN pg_depend ON pg_class.relfilenode=pg_depend.objid WHERE relname='$seq' AND relkind='S' AND deptype='i'" ) ) { return False ; } return "DROP SEQUENCE " . $ seq ; }
docstring: this is still necessary if postgres < 7.3 or the SERIAL was created on an earlier version!!!
docstring_tokens: this is still necessary if postgres < 7 . 3 or the SERIAL was created on an earlier version!!!