Menu

[edfa28]: / initdb-postgres  Maximize  Restore  History

Download this file

78 lines (67 with data), 2.0 kB

drop sequence lxr_filenum;
drop sequence lxr_symnum;
drop sequence lxr_declnum;
drop table lxr_files cascade;
drop table lxr_symbols cascade;
drop table lxr_indexes cascade;
drop table lxr_releases cascade;
drop table lxr_usage cascade;
drop table lxr_status cascade;
drop table lxr_declarations cascade;

create sequence lxr_filenum cache 50;
create sequence lxr_symnum cache 50;
create sequence lxr_declnum cache 10;

create table lxr_files (
	filename	varchar,
	revision	varchar,
	fileid		int,
	primary key	(fileid),
	unique		(filename, revision)
);

create table lxr_symbols (
	symname		varchar,
	symid		int,
	primary key	(symid),
	unique		(symname)
);

create table lxr_declarations (
	declid		smallint not null,
	langid		smallint not null,
	declaration	char(255) not null,
	primary key	(declid, langid)
);

create table lxr_indexes (
	symid		int		references lxr_symbols,
	fileid		int		references lxr_files,
	line		int,
	langid		smallint not null,
	type		smallint not null,
	relsym		int		references lxr_symbols,
	foreign key	(langid, type)	references lxr_declarations (langid, declid)
);

create table lxr_releases
	(fileid		int		references lxr_files,
	releaseid		varchar,
	primary key	(fileid,releaseid)
);

create table lxr_usage
	(fileid		int		references lxr_files,
	line		int,
	symid		int		references lxr_symbols
);

create table lxr_status
	(fileid		int		references lxr_files,
	status		smallint,
	primary key	(fileid)
);

create index lxr_indexindex on lxr_indexes using btree (symid);
create index lxr_symbolindex on lxr_symbols using btree (symname);
create index lxr_usageindex on lxr_usage using btree (symid);
create index lxr_filelookup on lxr_files using btree (filename);

grant select on lxr_files to public;
grant select on lxr_symbols to public;
grant select on lxr_indexes to public;
grant select on lxr_releases to public;
grant select on lxr_usage to public;
grant select on lxr_status to public;
grant select on lxr_declarations to public;
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.