Dumped on 2009-03-16
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:
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:
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) ) );
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 |
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, sourceF-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:
F-Key | Name | Type | Description |
---|---|---|---|
id | serial | PRIMARY KEY | |
name | text | UNIQUE NOT NULL | |
value | text |
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 |
F-Key | Name | Type | Description |
---|---|---|---|
id | serial | PRIMARY KEY | |
file | text | UNIQUE NOT NULL |
Tables referencing this one via Foreign Key Constraints:
F-Key | Name | Type | Description |
---|---|---|---|
id | serial | PRIMARY KEY | |
path | text | UNIQUE NOT NULL |
Tables referencing this one via Foreign Key Constraints:
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 |
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) );
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, locationF-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:
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:
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:
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:
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 |
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:
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 |
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:
F-Key | Name | Type | Description |
---|---|---|---|
id | serial | PRIMARY KEY | |
queue_name | text | NOT NULL |
Tables referencing this one via Foreign Key Constraints:
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 |
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:
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 maintainerF-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 |
F-Key | Name | Type | Description |
---|---|---|---|
id | serial | PRIMARY KEY | |
source | integer | UNIQUE#1 NOT NULL | |
maintainer | integer | UNIQUE#1 NOT NULL |
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_nameF-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] ) );
F-Key | Name | Type | Description |
---|---|---|---|
suite.id | suite | integer | NOT NULL |
architecture.id | architecture | integer | NOT NULL |
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:
SELECT max(id) FROM bin_associations
SELECT max(id) FROM binaries
select case WHEN $2 is null or $2 = '' THEN $1 WHEN $1 is null or $1 = '' THEN $2 ELSE $1 || ',' || $2 END
aggregate_dummy
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;
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;
Get debian version epoch
DECLARE split text[]; BEGIN split := debversion_split(version); RETURN split[1]; END;
debversion equal
DECLARE comp integer; result boolean; BEGIN comp := debversion_compare(version1, version2); result := comp = 0; RETURN result; END;
debversion greater-than-or-equal
DECLARE comp integer; result boolean; BEGIN comp := debversion_compare(version1, version2); result := comp >= 0; RETURN result; END;
debversion greater-than
DECLARE comp integer; result boolean; BEGIN comp := debversion_compare(version1, version2); result := comp > 0; RETURN result; END;
debversion less-than-or-equal
DECLARE comp integer; result boolean; BEGIN comp := debversion_compare(version1, version2); result := comp <= 0; RETURN result; END;
debversion less-than
DECLARE comp integer; result boolean; BEGIN comp := debversion_compare(version1, version2); result := comp < 0; RETURN result; END;
debversion not equal
DECLARE comp integer; result boolean; BEGIN comp := debversion_compare(version1, version2); result := comp <> 0; RETURN result; END;
Get debian version revision
DECLARE split text[]; BEGIN split := debversion_split(version); RETURN split[3]; END;
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'}];
Get debian version upstream version
DECLARE split text[]; BEGIN split := debversion_split(version); RETURN split[2]; END;
SELECT max(id) FROM dsc_files
SELECT max(id) FROM files
SELECT max(id) FROM override_type
SELECT max(id) FROM priority
SELECT max(id) FROM section
SELECT max(id) FROM source
select case WHEN $2 is null or $2 = '' THEN $1 WHEN $1 is null or $1 = '' THEN $2 ELSE $1 || ' ' || $2 END
aggregate_dummy
SELECT max(id) FROM src_associations
Generated by PostgreSQL Autodoc