Dumped on 2009-03-16

Index of database - projectb


Table: architecture

architecture Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('architecture_id_seq'::text)::regclass)
arch_string text NOT NULL
description text

Tables referencing this one via Foreign Key Constraints:

Index - Schema public


Table: archive

archive Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('archive_id_seq'::text)::regclass)
name text NOT NULL
origin_server text
description text

Tables referencing this one via Foreign Key Constraints:

Index - Schema public


View: bin_assoc_by_arch

bin_assoc_by_arch Structure
F-Key Name Type Description
suite integer
bin integer
arch integer
SELECT ba.suite
, ba.bin
, a.id AS arch 
FROM (bin_associations ba 
  JOIN binaries b 
    ON (
           (ba.bin = b.id)
     )
)
, architecture a 
WHERE (
     (a.id > 2)
   AND (
           (b.architecture = 2)
          OR (b.architecture = a.id)
     )
);

Index - Schema public


Table: bin_associations

bin_associations Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('bin_associations_id_seq'::text)::regclass)
suite.id suite integer NOT NULL
binaries.id bin integer NOT NULL
bin_associations_bin bin

Index - Schema public


Table: binaries

binaries Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('binaries_id_seq'::text)::regclass)
package text NOT NULL
version debversion NOT NULL
maintainer.id maintainer integer NOT NULL
source.id source integer NOT NULL
architecture.id architecture integer NOT NULL
files.id file integer NOT NULL
type text NOT NULL
fingerprint.id sig_fpr integer
install_date timestamp with time zone DEFAULT now()

Tables referencing this one via Foreign Key Constraints:

binaries_architecture_idx architecture binaries_by_package id, package binaries_files file binaries_fingerprint sig_fpr binaries_maintainer maintainer jjt4 source jjt5 id, source

Index - Schema public


Table: component

component Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('component_id_seq'::text)::regclass)
name text NOT NULL
description text
meets_dfsg boolean

Tables referencing this one via Foreign Key Constraints:

Index - Schema public


Table: config

config Structure
F-Key Name Type Description
id serial PRIMARY KEY
name text UNIQUE NOT NULL
value text

Index - Schema public


Table: content_associations

content_associations Structure
F-Key Name Type Description
id serial NOT NULL
binaries.id binary_pkg integer NOT NULL
content_file_paths.id filepath integer NOT NULL
content_file_names.id filename integer NOT NULL
content_assocaitions_binary binary_pkg

Index - Schema public


Table: content_file_names

content_file_names Structure
F-Key Name Type Description
id serial PRIMARY KEY
file text UNIQUE NOT NULL

Tables referencing this one via Foreign Key Constraints:

Index - Schema public


Table: content_file_paths

content_file_paths Structure
F-Key Name Type Description
id serial PRIMARY KEY
path text UNIQUE NOT NULL

Tables referencing this one via Foreign Key Constraints:

Index - Schema public


Table: dsc_files

dsc_files Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('dsc_files_id_seq'::text)::regclass)
source.id source integer NOT NULL
files.id file integer NOT NULL
dsc_files_file file

Index - Schema public


View: file_arch_suite

file_arch_suite Structure
F-Key Name Type Description
file integer
size bigint
architecture integer
suite integer
SELECT f.id AS file
, f.size
, b.architecture
, s.id AS suite 
FROM files f
, binaries b
, bin_associations ba
, suite s 
WHERE (
     (
           (f.id = b.file)
         AND (b.id = ba.bin)
     )
   AND (ba.suite = s.id)
);

Index - Schema public


Table: files

files Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('files_id_seq'::text)::regclass)
filename text NOT NULL
size bigint NOT NULL
md5sum text NOT NULL
location.id location integer NOT NULL
last_used timestamp with time zone
sha1sum text
sha256sum text

Tables referencing this one via Foreign Key Constraints:

files_last_used last_used jjt id jjt2 location jjt3 id, location

Index - Schema public


Table: fingerprint

fingerprint Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('"fingerprint_id_seq"'::text)::regclass)
fingerprint text NOT NULL
uid.id uid integer
keyrings.id keyring integer

Tables referencing this one via Foreign Key Constraints:

Index - Schema public


Table: keyrings

keyrings Structure
F-Key Name Type Description
id serial PRIMARY KEY
name text UNIQUE NOT NULL
debian_maintainer boolean NOT NULL DEFAULT false

Tables referencing this one via Foreign Key Constraints:

Index - Schema public


Table: location

location Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('location_id_seq'::text)::regclass)
path text NOT NULL
component.id component integer
archive.id archive integer
type text NOT NULL

Tables referencing this one via Foreign Key Constraints:

Index - Schema public


Table: maintainer

maintainer Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('maintainer_id_seq'::text)::regclass)
name text NOT NULL

Tables referencing this one via Foreign Key Constraints:

Index - Schema public


Table: override

override Structure
F-Key Name Type Description
package text NOT NULL
suite.id suite integer NOT NULL
component.id component integer NOT NULL
priority.id priority integer
section.id section integer NOT NULL
override_type.id type integer NOT NULL
maintainer text
jjt_override_type_idx type override_by_package package

Index - Schema public


Table: override_type

override_type Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('override_type_id_seq'::text)::regclass)
type text NOT NULL

Tables referencing this one via Foreign Key Constraints:

Index - Schema public


Table: pending_content_associations

pending_content_associations Structure
F-Key Name Type Description
id serial NOT NULL
package text NOT NULL
version debversion NOT NULL
content_file_paths.id filepath integer NOT NULL
content_file_names.id filename integer NOT NULL
architecture.id architecture integer NOT NULL

Index - Schema public


Table: priority

priority Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('priority_id_seq'::text)::regclass)
priority text NOT NULL
level integer NOT NULL

Tables referencing this one via Foreign Key Constraints:

Index - Schema public


Table: queue

queue Structure
F-Key Name Type Description
id serial PRIMARY KEY
queue_name text NOT NULL

Tables referencing this one via Foreign Key Constraints:

Index - Schema public


Table: queue_build

queue_build Structure
F-Key Name Type Description
suite.id suite integer NOT NULL
queue.id queue integer NOT NULL
filename text NOT NULL
in_queue boolean NOT NULL
last_used timestamp without time zone

Index - Schema public


Table: section

section Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('section_id_seq'::text)::regclass)
section text NOT NULL

Tables referencing this one via Foreign Key Constraints:

Index - Schema public


Table: source

source Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('source_id_seq'::text)::regclass)
source text NOT NULL
version debversion NOT NULL
maintainer.id maintainer integer NOT NULL
files.id file integer NOT NULL
fingerprint.id sig_fpr integer
install_date timestamp with time zone NOT NULL
maintainer.id changedby integer NOT NULL
dm_upload_allowed boolean NOT NULL DEFAULT false

Tables referencing this one via Foreign Key Constraints:

source_fingerprint sig_fpr source_maintainer maintainer

Index - Schema public


Table: src_associations

src_associations Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('src_associations_id_seq'::text)::regclass)
suite.id suite integer NOT NULL
source.id source integer NOT NULL
src_associations_source source

Index - Schema public


Table: src_uploaders

src_uploaders Structure
F-Key Name Type Description
id serial PRIMARY KEY
source integer UNIQUE#1 NOT NULL
maintainer integer UNIQUE#1 NOT NULL

Index - Schema public


Table: suite

suite Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('suite_id_seq'::text)::regclass)
suite_name text NOT NULL
version text NOT NULL
origin text
label text
policy_engine text
description text
untouchable boolean NOT NULL DEFAULT false
announce text NOT NULL DEFAULT 'debian-devel-changes@lists.debian.org'::text
codename text
overridecodename text
validtime integer NOT NULL DEFAULT 604800
priority integer NOT NULL
notautomatic boolean NOT NULL DEFAULT false
copychanges text
copydotdak text
commentsdir text
overridesuite text
changelogbase text

Tables referencing this one via Foreign Key Constraints:

suite_hash suite_name

Index - Schema public


View: suite_arch_by_name

suite_arch_by_name Structure
F-Key Name Type Description
suite text
arch text
SELECT suite.suite_name AS suite
, a.arch_string AS arch 
FROM (
     (suite_architectures sa 
        JOIN architecture a 
          ON (
                 (sa.architecture = a.id)
           )
     )
  JOIN suite 
    ON (
           (sa.suite = suite.id)
     )
)
WHERE (a.arch_string <> ALL 
     (ARRAY['all'::text
           ,'source'::text]
     )
);

Index - Schema public


Table: suite_architectures

suite_architectures Structure
F-Key Name Type Description
suite.id suite integer NOT NULL
architecture.id architecture integer NOT NULL

Index - Schema public


Table: uid

uid Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval(('"uid_id_seq"'::text)::regclass)
uid text NOT NULL
name text

Tables referencing this one via Foreign Key Constraints:

Index - Schema public


Function: bin_associations_id_max( )

Returns: integer

Language: SQL

SELECT max(id) FROM bin_associations

Function: binaries_id_max( )

Returns: integer

Language: SQL

SELECT max(id) FROM binaries

Function: comma_concat( text, text )

Returns: text

Language: SQL

select case
                   WHEN $2 is null or $2 = '' THEN $1
                   WHEN $1 is null or $1 = '' THEN $2
                   ELSE $1 || ',' || $2
                   END

Function: comma_separated_list( text )

Returns: text

Language: INTERNAL

aggregate_dummy

Function: debversion_compare( ARRAY(0x12a4f68) public.debversion, public.debversion )

Returns: integer

Language: PLPGSQL

Compare Debian versions

DECLARE
  split1 text[];
  split2 text[];
  result integer;
BEGIN
  result := 0;
  split1 := debversion_split(version1);
  split2 := debversion_split(version2);

  -- RAISE NOTICE 'Version 1: %', version1;
  -- RAISE NOTICE 'Version 2: %', version2;
  -- RAISE NOTICE 'Split 1: %', split1;
  -- RAISE NOTICE 'Split 2: %', split2;

  IF split1[1] > split2[1] THEN
    result := 1;
  ELSIF split1[1] < split2[1] THEN
    result := -1;
  ELSE
    result := debversion_compare_single(split1[2], split2[2]);
    IF result = 0 THEN
      result := debversion_compare_single(split1[3], split2[3]);
    END IF;
  END IF;

  RETURN result;
END;

Function: debversion_compare_single( ARRAY(0x12a0ae0) text, text )

Returns: integer

Language: PLPERL

Compare upstream or revision parts of Debian versions

     sub order{
	  my ($x) = @_;
	  ##define order(x) ((x) == '~' ? -1 	  #           : cisdigit((x)) ? 0 	  #           : !(x) ? 0 	  #           : cisalpha((x)) ? (x) 	  #           : (x) + 256)
	  # This comparison is out of dpkg's order to avoid
	  # comparing things to undef and triggering warnings.
	  if (not defined $x or not length $x) {
	       return 0;
	  }
	  elsif ($x eq '~') {
	       return -1;
	  }
	  elsif ($x =~ /^\d$/) {
	       return 0;
	  }
	  elsif ($x =~ /^[A-Z]$/i) {
	       return ord($x);
	  }
	  else {
	       return ord($x) + 256;
	  }
     }

     sub next_elem(\@){
	  my $a = shift;
	  return @{$a} ? shift @{$a} : undef;
     }
     my ($val, $ref) = @_;
     $val = "" if not defined $val;
     $ref = "" if not defined $ref;
     my @val = split //,$val;
     my @ref = split //,$ref;
     my $vc = next_elem @val;
     my $rc = next_elem @ref;
     while (defined $vc or defined $rc) {
	  my $first_diff = 0;
	  while ((defined $vc and $vc !~ /^\d$/) or
		 (defined $rc and $rc !~ /^\d$/)) {
	       my $vo = order($vc); my $ro = order($rc);
	       # Unlike dpkg's verrevcmp, we only return 1 or -1 here.
	       return (($vo - $ro > 0) ? 1 : -1) if $vo != $ro;
	       $vc = next_elem @val; $rc = next_elem @ref;
	  }
	  while (defined $vc and $vc eq '0') {
	       $vc = next_elem @val;
	  }
	  while (defined $rc and $rc eq '0') {
	       $rc = next_elem @ref;
	  }
	  while (defined $vc and $vc =~ /^\d$/ and
		 defined $rc and $rc =~ /^\d$/) {
	       $first_diff = ord($vc) - ord($rc) if !$first_diff;
	       $vc = next_elem @val; $rc = next_elem @ref;
	  }
	  return 1 if defined $vc and $vc =~ /^\d$/;
	  return -1 if defined $rc and $rc =~ /^\d$/;
	  return (($first_diff  > 0) ? 1 : -1) if $first_diff;
     }
     return 0;

Function: debversion_epoch( ARRAY(0x12a4938) public.debversion )

Returns: text

Language: PLPGSQL

Get debian version epoch

DECLARE
  split text[];
BEGIN
  split := debversion_split(version);
  RETURN split[1];
END;

Function: debversion_eq( ARRAY(0x12a9530) public.debversion, public.debversion )

Returns: boolean

Language: PLPGSQL

debversion equal

DECLARE
  comp integer;
  result boolean;
BEGIN
  comp := debversion_compare(version1, version2);
  result := comp = 0;
  RETURN result;
END;

Function: debversion_ge( ARRAY(0x12a8a68) public.debversion, public.debversion )

Returns: boolean

Language: PLPGSQL

debversion greater-than-or-equal

DECLARE
  comp integer;
  result boolean;
BEGIN
  comp := debversion_compare(version1, version2);
  result := comp >= 0;
  RETURN result;
END;

Function: debversion_gt( ARRAY(0x12a9548) public.debversion, public.debversion )

Returns: boolean

Language: PLPGSQL

debversion greater-than

DECLARE
  comp integer;
  result boolean;
BEGIN
  comp := debversion_compare(version1, version2);
  result := comp > 0;
  RETURN result;
END;

Function: debversion_le( ARRAY(0x12a0810) public.debversion, public.debversion )

Returns: boolean

Language: PLPGSQL

debversion less-than-or-equal

DECLARE
  comp integer;
  result boolean;
BEGIN
  comp := debversion_compare(version1, version2);
  result := comp <= 0;
  RETURN result;
END;

Function: debversion_lt( ARRAY(0x12a9620) public.debversion, public.debversion )

Returns: boolean

Language: PLPGSQL

debversion less-than

DECLARE
  comp integer;
  result boolean;
BEGIN
  comp := debversion_compare(version1, version2);
  result := comp < 0;
  RETURN result;
END;

Function: debversion_ne( ARRAY(0x12a9878) public.debversion, public.debversion )

Returns: boolean

Language: PLPGSQL

debversion not equal

DECLARE
  comp integer;
  result boolean;
BEGIN
  comp := debversion_compare(version1, version2);
  result := comp <> 0;
  RETURN result;
END;

Function: debversion_revision( ARRAY(0x12a9848) public.debversion )

Returns: text

Language: PLPGSQL

Get debian version revision

DECLARE
  split text[];
BEGIN
  split := debversion_split(version);
  RETURN split[3];
END;

Function: debversion_split( public.debversion )

Returns: text[]

Language: PLPERL

Split debian version into epoch, upstream version and revision

    my $ver = shift;
    my %verhash;
    if ($ver =~ /:/)
    {
        $ver =~ /^(\d+):(.+)/ or die "bad version number '$ver'";
        $verhash{epoch} = $1;
        $ver = $2;
    }
    else
    {
        $verhash{epoch} = 0;
    }
    if ($ver =~ /(.+)-(.*)$/)
    {
        $verhash{version} = $1;
        $verhash{revision} = $2;
    }
    else
    {
        $verhash{version} = $ver;
        $verhash{revision} = 0;
    }

    return [$verhash{'epoch'}, $verhash{'version'}, $verhash{'revision'}];

Function: debversion_version( ARRAY(0x12a8b70) public.debversion )

Returns: text

Language: PLPGSQL

Get debian version upstream version

DECLARE
  split text[];
BEGIN
  split := debversion_split(version);
  RETURN split[2];
END;

Function: dsc_files_id_max( )

Returns: integer

Language: SQL

SELECT max(id) FROM dsc_files

Function: files_id_max( )

Returns: integer

Language: SQL

SELECT max(id) FROM files

Function: override_type_id_max( )

Returns: integer

Language: SQL

SELECT max(id) FROM override_type

Function: priority_id_max( )

Returns: integer

Language: SQL

SELECT max(id) FROM priority

Function: section_id_max( )

Returns: integer

Language: SQL

SELECT max(id) FROM section

Function: source_id_max( )

Returns: integer

Language: SQL

SELECT max(id) FROM source

Function: space_concat( text, text )

Returns: text

Language: SQL

select case
WHEN $2 is null or $2 = '' THEN $1
WHEN $1 is null or $1 = '' THEN $2
ELSE $1 || ' ' || $2
END

Function: space_separated_list( text )

Returns: text

Language: INTERNAL

aggregate_dummy

Function: src_associations_id_max( )

Returns: integer

Language: SQL

SELECT max(id) FROM src_associations

Generated by PostgreSQL Autodoc

W3C HTML 4.01 Strict