mirror of
https://github.com/postgres/postgres.git
synced 2026-02-10 22:33:50 -05:00
let's say this patch superscedes the previous one. I have also attached a patch addressing the similar memory leak problem in plpython. This includes a slight adjustment of the tests in the source directory. The patch also includes a cosmetic change to remove a compiler warning although I think the change makes the code look worse though. BTW, by my reckoning the memory leak would occur with prepared plans and without. If that is not the case then I've been barking up the wrong tree. Nigel J. Andrews
42 lines
921 B
SQL
42 lines
921 B
SQL
|
|
CREATE TABLE users (
|
|
fname text not null,
|
|
lname text not null,
|
|
username text,
|
|
userid serial,
|
|
PRIMARY KEY(lname, fname)
|
|
) ;
|
|
|
|
CREATE INDEX users_username_idx ON users(username);
|
|
CREATE INDEX users_fname_idx ON users(fname);
|
|
CREATE INDEX users_lname_idx ON users(lname);
|
|
CREATE INDEX users_userid_idx ON users(userid);
|
|
|
|
|
|
CREATE TABLE taxonomy (
|
|
id serial primary key,
|
|
name text unique
|
|
) ;
|
|
|
|
CREATE TABLE entry (
|
|
accession text not null primary key,
|
|
eid serial unique,
|
|
txid int2 not null references taxonomy(id)
|
|
) ;
|
|
|
|
CREATE TABLE sequences (
|
|
eid int4 not null references entry(eid),
|
|
pid serial primary key,
|
|
product text not null,
|
|
sequence text not null,
|
|
multipart bool default 'false'
|
|
) ;
|
|
CREATE INDEX sequences_product_idx ON sequences(product) ;
|
|
|
|
CREATE TABLE xsequences (
|
|
pid int4 not null references sequences(pid),
|
|
sequence text not null
|
|
) ;
|
|
CREATE INDEX xsequences_pid_idx ON xsequences(pid) ;
|
|
|
|
|