TODO 13 KB
Newer Older
1 2
TODO list for PostgreSQL
========================
Bruce Momjian's avatar
Bruce Momjian committed
3
Last updated:		Mon Nov 22 13:02:03 EST 1999
Marc G. Fournier's avatar
Marc G. Fournier committed
4

Bruce Momjian's avatar
Bruce Momjian committed
5
Current maintainer:	Bruce Momjian (pgman@candle.pha.pa.us)
Marc G. Fournier's avatar
Marc G. Fournier committed
6

Bruce Momjian's avatar
Bruce Momjian committed
7
The most recent version of this document can be viewed at
Bruce Momjian's avatar
Bruce Momjian committed
8
the PostgreSQL web site, http://www.PostgreSQL.org.
Bruce Momjian's avatar
Bruce Momjian committed
9

10
A dash(-) marks changes that will appear in the next release.
Bruce Momjian's avatar
Bruce Momjian committed
11

Bruce Momjian's avatar
Bruce Momjian committed
12 13 14
Names in brackets "[]" indicate more detailed information is available in
the directory pgsql/doc/TODO.detail/ under that name.

Bruce Momjian's avatar
Bruce Momjian committed
15

Marc G. Fournier's avatar
Marc G. Fournier committed
16 17
RELIABILITY
-----------
18 19 20

RESOURCES

Bruce Momjian's avatar
Bruce Momjian committed
21
* Elog() does not free all its memory(Jan)
22
* spinlock stuck problem when elog(FATAL) and elog(ERROR) inside bufmgr
Bruce Momjian's avatar
Bruce Momjian committed
23
* -Recover or force failure when disk space is exhausted(Hiroshi)
24 25 26 27

PARSER

* Disallow inherited columns with the same name as new columns
Bruce Momjian's avatar
Bruce Momjian committed
28
* -INSERT INTO ... SELECT with AS columns matching result columns problem
29
* SELECT pg_class FROM pg_class generates strange error
Bruce Momjian's avatar
Bruce Momjian committed
30
* Alter TABLE ADD COLUMN does not honor DEFAULT, add CONSTRAINT
31
* Do not allow bpchar column creation without length
Bruce Momjian's avatar
Bruce Momjian committed
32 33
* -Select a[1] FROM test fails, it needs test.a[1](Tom)
* -Array index references without table name cause problems [array](Tom)
Bruce Momjian's avatar
Bruce Momjian committed
34
* Update table SET table.value = 3 fails(SQL standard says this is OK)
35
* Creating index of TIMESTAMP & RELTIME fails, or rename to DATETIME(Thomas)
36
* SELECT foo UNION SELECT foo is incorrectly simplified to SELECT foo
Bruce Momjian's avatar
Bruce Momjian committed
37 38
* -INSERT ... SELECT ... GROUP BY groups by target columns not source columns(Tom)
* -CREATE TABLE test (a char(5) DEFAULT text '', b int4) fails on INSERT(Tom)
Bruce Momjian's avatar
Bruce Momjian committed
39
* -UNION with LIMIT fails
40 41
* Unique index on base column not honored on inserts from inherited table
  INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail
Bruce Momjian's avatar
Bruce Momjian committed
42
  [inherit] 
Bruce Momjian's avatar
Bruce Momjian committed
43 44 45
* -CREATE TABLE x AS SELECT 1 UNION SELECT 2 fails
* -CREATE TABLE test(col char(2) DEFAULT user) fails in length restriction
* -mismatched types in CREATE TABLE ... DEFAULT causes problems [default]
Bruce Momjian's avatar
Bruce Momjian committed
46
* SELECT ... UNION ... ORDER BY fails when sort expr not in result list
Bruce Momjian's avatar
Bruce Momjian committed
47 48
* Be smarter about promoting types when UNION merges different data types
* SELECT ... UNION ... GROUP BY fails if column types disagree
Bruce Momjian's avatar
Bruce Momjian committed
49
* redesign INSERT ... SELECT to have two levels of target list
Bruce Momjian's avatar
Bruce Momjian committed
50
* -select * from pg_class where oid in (0,-1)
Bruce Momjian's avatar
Bruce Momjian committed
51
* have INTERSECT/EXCEPT prevent duplicates unless ALL is specified
Bruce Momjian's avatar
Bruce Momjian committed
52
* prevent primary key of nine columns [primary]
Bruce Momjian's avatar
Bruce Momjian committed
53
* -SELECT COUNT('asdf') FROM pg_class WHERE oid=12 crashes
Bruce Momjian's avatar
Bruce Momjian committed
54
* SELECT DISTINCT ON col1 col1 col2 FROM tab1 is broken [distinct]
Bruce Momjian's avatar
Bruce Momjian committed
55
* -require SELECT DISTINCT target list to have all ORDER BY columns
Bruce Momjian's avatar
Bruce Momjian committed
56
* -When using aggregates + GROUP BY, no rows in should yield no rows out(Tom)
57
* -Allow HAVING to use comparisons that have no aggregates(Tom)
Bruce Momjian's avatar
Bruce Momjian committed
58
* Allow COUNT(DISTINCT col)
59 60 61 62

VIEWS

* Views containing aggregates sometimes fail(Jan)
Bruce Momjian's avatar
Bruce Momjian committed
63
* Views with spaces in view name fail when referenced
64 65
* Creating view and inheriting the view causes view* to show
  duplicates(inherit) 
Bruce Momjian's avatar
Bruce Momjian committed
66

67 68 69 70
MISC

* User who can create databases can modify pg_database table
* Plpgsql does not handle quoted mixed-case identifiers
Bruce Momjian's avatar
Bruce Momjian committed
71
* Fix btree to give a useful elog when key > 1/2 (page - overhead)
Bruce Momjian's avatar
Bruce Momjian committed
72
* pg_dump should preserve primary key information
73
* plpgsql regression tests fail on BSD/OS
Bruce Momjian's avatar
Bruce Momjian committed
74
* database names with spaces fail
Bruce Momjian's avatar
Bruce Momjian committed
75
* insert of 0.0 into DECIMAL(4,4) field fails
Marc G. Fournier's avatar
Marc G. Fournier committed
76 77 78

ENHANCEMENTS
------------
79 80 81

URGENT

Bruce Momjian's avatar
Bruce Momjian committed
82 83
* Add referential integrity(Jan?)[primary]
* Add OUTER joins, left and right[outer](Thomas, Bruce)
Bruce Momjian's avatar
Bruce Momjian committed
84
* Allow long tuples by chaining or auto-storing outside db (chaining,large objs)
Bruce Momjian's avatar
Bruce Momjian committed
85
* -Eliminate limits on query length
Bruce Momjian's avatar
Bruce Momjian committed
86 87
* Fix memory leak for expressions[memory](Tom?) 
* -Fix memory leak for aggregates(Tom)
Bruce Momjian's avatar
Bruce Momjian committed
88

89 90
ADMIN

Bruce Momjian's avatar
Bruce Momjian committed
91
* Better interface for adding to pg_group
92
* More access control over who can create tables and access the database
Bruce Momjian's avatar
Bruce Momjian committed
93
* Test syslog functionality
Bruce Momjian's avatar
Bruce Momjian committed
94 95
* Allow elog() to return error codes, not just messages
* Allow international error message support and add error codes
Bruce Momjian's avatar
Bruce Momjian committed
96 97
* Generate postmaster pid file and remove flock/fcntl lock code [flock]
* Add ability to specifiy location of lock/socket files [flock]
Bruce Momjian's avatar
Bruce Momjian committed
98

99 100
TYPES

Bruce Momjian's avatar
Bruce Momjian committed
101 102 103 104
* Add BIT, BIT VARYING
* Nchar (as distinguished from ordinary varchar),
* Domain capability
* Add STDDEV/VARIANCE() function for standard deviation computation/variance
Bruce Momjian's avatar
Bruce Momjian committed
105
* -Allow compression of large fields or a compressed field type
106
* Large objects
107 108
	o Fix large object mapping scheme, own typeid or reltype(Peter)
	o Allow large text type to use large objects(Peter)
Bruce Momjian's avatar
Bruce Momjian committed
109 110
	o Not to stuff everything as files in a single directory, hash dirs
	o Allow large object vacuuming
111
	o Tables that start with xinv confused to be large objects
Bruce Momjian's avatar
Bruce Momjian committed
112
* -Allow pg_descriptions when creating tables
Bruce Momjian's avatar
Bruce Momjian committed
113
* -Allow pg_descriptions when creating types, columns, and functions
Bruce Momjian's avatar
Bruce Momjian committed
114 115 116 117 118
* Add IPv6 capability to INET/CIDR types
* Make a separate SERIAL type?
* Store binary-compatible type information in the system
* Allow user to define char1 column
* Add support for & operator
119
* Allow LOCALE on a per-column basis, default to ASCII
Bruce Momjian's avatar
Bruce Momjian committed
120
* Allow LOCALE to use indexes in regular expression searches
121
* Allow array on int8[]
Bruce Momjian's avatar
Bruce Momjian committed
122
* Allow nulls in arrays
Bruce Momjian's avatar
Bruce Momjian committed
123
* Allow arrays to be ORDER'ed
124
* Remove Money type, add money formatting for decimal type
125
* Declare typein/out functions in pg_proc with a special "C string" data type
126
* Add non-large-object binary field
Bruce Momjian's avatar
Bruce Momjian committed
127
* -Add index on NUMERIC/DECIMAL type(Jan)
Bruce Momjian's avatar
Bruce Momjian committed
128
* Make Absolutetime/Relativetime int4 because time_t can be int8 on some ports
Bruce Momjian's avatar
Bruce Momjian committed
129
* Functions returning sets don't really work right[function]
Bruce Momjian's avatar
Bruce Momjian committed
130
* Add max() for oid type
131 132

VIEWS
Bruce Momjian's avatar
Bruce Momjian committed
133

Bruce Momjian's avatar
Bruce Momjian committed
134
* Allow DISTINCT on views
Bruce Momjian's avatar
Bruce Momjian committed
135
* Allow views of aggregate columns
Bruce Momjian's avatar
Bruce Momjian committed
136 137
* Allow views with subselects

138
INDEXES
Bruce Momjian's avatar
Bruce Momjian committed
139 140

* Allow CREATE INDEX zman_index ON test (date_trunc( 'day', zman ) datetime_ops)
141
  fails index can't store constant parameters
Bruce Momjian's avatar
Bruce Momjian committed
142
* Allow creation of functional indexes to use default types
Bruce Momjian's avatar
Bruce Momjian committed
143
* Permissions on indexes, prevent them?
Bruce Momjian's avatar
Bruce Momjian committed
144 145
* Allow SQL function indexes
* Add FILLFACTOR to index creation
146 147 148 149
* Allow indexing of LIKE with localle character sets
* Allow indexing of more than eight columns

COMMANDS
Bruce Momjian's avatar
Bruce Momjian committed
150

Bruce Momjian's avatar
Bruce Momjian committed
151
* ALTER TABLE ADD COLUMN to inherited table put column in wrong place [inherit]
Bruce Momjian's avatar
Bruce Momjian committed
152
* Add ALTER TABLE DROP/ALTER COLUMN feature
Bruce Momjian's avatar
Bruce Momjian committed
153
* Allow CLUSTER on all tables at once, and improve CLUSTER, loses NOT
Bruce Momjian's avatar
Bruce Momjian committed
154
	NULL specification, indexes, permissions, etc on table[cluster]
Bruce Momjian's avatar
Bruce Momjian committed
155
* Add SIMILAR TO to allow character classes, 'pg_[a-c]%'
Bruce Momjian's avatar
Bruce Momjian committed
156
* Auto-destroy sequence on DROP of table with SERIAL(Ryan)
Bruce Momjian's avatar
Bruce Momjian committed
157 158
* Allow LOCK TABLE tab1, tab2, tab3 so all tables locked in unison
* Allow INSERT/UPDATE of system-generated oid value for a row
Bruce Momjian's avatar
Bruce Momjian committed
159
* Allow ESCAPE '\' at the end of LIKE for ANSI compliance [like]
Bruce Momjian's avatar
Bruce Momjian committed
160
* Rewrite the LIKE handling by rewriting the user string with the 
Bruce Momjian's avatar
Bruce Momjian committed
161
  supplied ESCAPE [like]
Bruce Momjian's avatar
Bruce Momjian committed
162
* -Move LIKE index optimization handling to the optimizer(Tom)
Bruce Momjian's avatar
Bruce Momjian committed
163
* Allow RULE recompilation
Bruce Momjian's avatar
Bruce Momjian committed
164
* Support UNION/INTERSECT/EXCEPT in sub-selects
Bruce Momjian's avatar
Bruce Momjian committed
165
* Allow DELETE and UPDATE to use inheritance using tablename*
Bruce Momjian's avatar
Bruce Momjian committed
166
  
167 168
CLIENTS

Bruce Momjian's avatar
Bruce Momjian committed
169
* Make NULL's come out at the beginning or end depending on the 
170
  ORDER BY direction
Bruce Momjian's avatar
Bruce Momjian committed
171
* Allow flag to control COPY input/output of NULLs
Bruce Momjian's avatar
Bruce Momjian committed
172
* Update reltuples from COPY command
Bruce Momjian's avatar
Bruce Momjian committed
173
* -Allow psql \copy to allow delimiters
Bruce Momjian's avatar
Bruce Momjian committed
174
* Add a function to return the last inserted oid, for use in psql scripts
Bruce Momjian's avatar
Bruce Momjian committed
175
* -Allow psql to print nulls as distinct from "" [null]
Bruce Momjian's avatar
Bruce Momjian committed
176

177 178 179 180 181 182
EXOTIC FEATURES

* Add sql3 recursive unions
* Add the concept of dataspaces
* Add replication of distributed databases
* Allow queries across multiple databases
Bruce Momjian's avatar
Bruce Momjian committed
183
* Allow nested transactions
184

185 186
MISC

Bruce Momjian's avatar
Bruce Momjian committed
187
* Increase identifier length(NAMEDATALEN) if small performance hit
Bruce Momjian's avatar
Bruce Momjian committed
188 189 190
* Allow row re-use without vacuum(Vadim)
* Create a background process for each database that runs while
  database is idle, finding superceeded rows, gathering stats and vacuuming
Bruce Momjian's avatar
Bruce Momjian committed
191
* Add UNIQUE capability to non-btree indexes
Bruce Momjian's avatar
Bruce Momjian committed
192
* -Certain indexes will not shrink, i.e. oid indexes with many inserts(Vadim)
Bruce Momjian's avatar
Bruce Momjian committed
193 194
* Restore unused oid's on backend exit if no one else has gotten oids
* Have UPDATE/DELETE clean out indexes
Bruce Momjian's avatar
Bruce Momjian committed
195
* -Allow WHERE restriction on ctid(Hiroshi)
Bruce Momjian's avatar
Bruce Momjian committed
196 197
* Allow cursors to be DECLAREd/OPENed/CLOSEed outside transactions
* Allow PQrequestCancel() to terminate when in waiting-for-lock state
Bruce Momjian's avatar
Bruce Momjian committed
198
* -Transaction log, so re-do log can be on a separate disk by
Bruce Momjian's avatar
Bruce Momjian committed
199
  with after-row images(Vadim) [logging](Vadim)
Bruce Momjian's avatar
Bruce Momjian committed
200 201
* Populate backend status area and write program to dump status data
* Make oid use unsigned int more reliably, pg_atoi()
Bruce Momjian's avatar
Bruce Momjian committed
202
* -Allow subqueries in target list
Bruce Momjian's avatar
Bruce Momjian committed
203 204
* Put sort files, large objects in their own directory
* Do autocommit so always in a transaction block(?)
Bruce Momjian's avatar
Bruce Momjian committed
205 206 207 208
* Show location of syntax error in query [yacc]
* Redesign the function call interface to handle NULLs better [function]
* Document/trigger/rule so changes to pg_shadow recreate pg_pwd [pg_shadow]
* Missing optimizer selectivities for date, r-tree, etc. [optimizer]
Bruce Momjian's avatar
Bruce Momjian committed
209
* -Overhaul mdmgr/smgr to fix double unlinking and double opens, cleanup
210
* Overhaul bufmgr/lockmgr/transaction manager
Bruce Momjian's avatar
Bruce Momjian committed
211
* Add PL/Perl(Mark Hollomon)
212
* Make postgres user have a password by default
Bruce Momjian's avatar
Bruce Momjian committed
213
* Add configure test to check for C++ need for *.h and namespaces
214
* Allow BLCKSZ <= 64k, not <= 32k
Bruce Momjian's avatar
Bruce Momjian committed
215
* redesign UNION structures to have separarate target lists
Bruce Momjian's avatar
Bruce Momjian committed
216
* Allow multi-level query trees for INSERT INTO ... SELECT
Bruce Momjian's avatar
Bruce Momjian committed
217 218 219

PERFORMANCE
-----------
220 221 222

FSYNC

Bruce Momjian's avatar
Bruce Momjian committed
223 224
* -Allow transaction commits with rollback with no-fsync performance [fsync](Vadim)
* -Prevent fsync in SELECT-only queries(Vadim)
Bruce Momjian's avatar
Bruce Momjian committed
225

226 227
INDEXES

228
* Use indexes in ORDER BY for restrictive data sets, min(), max()
Bruce Momjian's avatar
Bruce Momjian committed
229 230
* Pull requested data directly from indexes, bypassing heap data
* Use index to restrict rows returned by multi-key index when used with
231
  non-consecutive keys or OR clauses, so fewer heap accesses
Bruce Momjian's avatar
Bruce Momjian committed
232
* -Convert function(constant) into a constant for index use(Tom)
Bruce Momjian's avatar
Bruce Momjian committed
233
* Allow LIMIT ability on single-table queries that have no ORDER BY to use
Bruce Momjian's avatar
Bruce Momjian committed
234 235 236
  a matching index [limit]
* Improve LIMIT processing by using index to limit rows processed [limit]
* Have optimizer take LIMIT into account when considering index scans [limit]
Bruce Momjian's avatar
Bruce Momjian committed
237 238
* -Make index creation use psort code, because it is now faster(Vadim)
* -Allow creation of sort temp tables > 1 Gig
Bruce Momjian's avatar
Bruce Momjian committed
239 240 241
* Create more system table indexes for faster cache lookups
* fix indexscan() so it does leak memory by not requiring caller to free
* Improve _bt_binsrch() to handle equal keys better, remove _bt_firsteq()(Tom)
Bruce Momjian's avatar
Bruce Momjian committed
242 243
* Allow SELECT * FROM tab WHERE int2col = 4 use int2col index, int8,
  float4, numeric/decimal too [optimizer]
Bruce Momjian's avatar
Bruce Momjian committed
244
* -Allow optimizer to prefer plans that match ORDER BY(Tom)
Bruce Momjian's avatar
Bruce Momjian committed
245

246 247
CACHE

Bruce Momjian's avatar
Bruce Momjian committed
248
* Cache most recent query plan(s) [prepare]
249
* Shared catalog cache, reduce lseek()'s by caching table size in shared area
Bruce Momjian's avatar
Bruce Momjian committed
250 251 252
* elog() flushes cache, try invalidating just entries from current xact,
  perhaps using invalidation cache

Bruce Momjian's avatar
Bruce Momjian committed
253

254 255
MISC

256
* Allow compression of log and meta data
Bruce Momjian's avatar
Bruce Momjian committed
257 258
* Allow char() not to use variable-sized header to reduce disk size
* Do async I/O to do better read-ahead of data
Bruce Momjian's avatar
Bruce Momjian committed
259
* -Fix memory exhaustion when using many OR's [cnfify](Tom)
Bruce Momjian's avatar
Bruce Momjian committed
260
* Get faster regex() code from Henry Spencer <henry@zoo.utoronto.ca>
261
  when it is available
Bruce Momjian's avatar
Bruce Momjian committed
262
* Use mmap() rather than SYSV shared memory(?)
Bruce Momjian's avatar
Bruce Momjian committed
263
* -Process const = const parts of OR clause in separate pass(Tom)
Bruce Momjian's avatar
Bruce Momjian committed
264
* Make oid use oidin/oidout not int4in/int4out in pg_type.h
Bruce Momjian's avatar
Bruce Momjian committed
265
* Improve Subplan list handling
Bruce Momjian's avatar
Bruce Momjian committed
266
* Allow Subplans to use efficient joins(hash, merge) with upper variable
Bruce Momjian's avatar
Bruce Momjian committed
267
  [subquery]
Bruce Momjian's avatar
Bruce Momjian committed
268 269 270
* use fmgr_info()/fmgr_faddr() instead of fmgr() calls in high-traffic
  places, like GROUP BY, UNIQUE, index processing, etc.
* improve dynamic memory allocation by introducing tuple-context memory
Bruce Momjian's avatar
Bruce Momjian committed
271
  allocation [memory]
Bruce Momjian's avatar
Bruce Momjian committed
272
* fix memory leak in cache code when non-existant table is referenced
273
* In WHERE tab1.x=3 AND tab1.x=tab2.y, add tab2.y=3
Bruce Momjian's avatar
Bruce Momjian committed
274
* pass atttypmod through parser in more cases [atttypmod]
275
* remove duplicate type in/out functions for disk and net
Bruce Momjian's avatar
Bruce Momjian committed
276 277
* Allow persistent backends [persistent]
* Misc [performance]
278

279 280
SOURCE CODE
-----------
Bruce Momjian's avatar
Bruce Momjian committed
281
* Add use of 'const' for variables in source tree
Bruce Momjian's avatar
Bruce Momjian committed
282
* Fix C optimizer problem where fmgr_ptr calls return different types [alpha]
Bruce Momjian's avatar
Bruce Momjian committed
283
* -Add needed includes and removed unneeded include files(Bruce)
Bruce Momjian's avatar
Bruce Momjian committed
284
* -Make configure --enable-debug add -g on compile line
Bruce Momjian's avatar
Bruce Momjian committed
285
* Does Mariposa source contain any other bug fixes?
Bruce Momjian's avatar
Bruce Momjian committed
286
* Remove SET KSQO option if OR processing is improved(Tom)
Bruce Momjian's avatar
Bruce Momjian committed
287
* rename 'createuser' to 'pg_createuser', and add 'pg_' to other commands
288 289 290 291 292 293 294
---------------------------------------------------------------------------


Developers who have claimed items are:
--------------------------------------
	* Billy is Billy G. Allie <Bill.Allie@mug.org>
	* Brook is Brook Milligan <brook@trillium.NMSU.Edu>
Bruce Momjian's avatar
Bruce Momjian committed
295
	* Bruce is Bruce Momjian<pgman@candle.pha.pa.us>
296 297 298 299 300 301 302 303 304 305 306 307
	* Bryan is Bryan Henderson<bryanh@giraffe.netgate.net>
	* D'Arcy is D'Arcy J.M. Cain <darcy@druid.net>
	* David is David Hartwig <daveh@insightdist.com>
	* Edmund is Edmund Mergl <E.Mergl@bawue.de>
	* Goran is Goran Thyni <goran@kyla.kiruna.se>
	* Hiroshi is Hiroshi Inoue<Inoue@tpf.co.jp>
	* Jan is Jan Wieck <wieck@sapserv.debis.de>
 	* Marc is Marc Fournier <scrappy@hub.org>
	* Massimo Dal Zotto <dz@cs.unitn.it>
	* Michael is Michael Meskes <meskes@postgresql.org>
	* Oleg is Oleg Bartunov <oleg@sai.msu.su>
	* Peter is Peter T Mount <peter@retep.org.uk>
Bruce Momjian's avatar
Bruce Momjian committed
308
	* Ryan is Ryan Bradetich <rbrad@hpb50023.boi.hp.com>
309 310 311 312 313 314 315 316
	* Stefan Simkovics <ssimkovi@rainbow.studorg.tuwien.ac.at>
	* Tatsuo is Tatsuo Ishii <t-ishii@sra.co.jp>
	* Tom is Tom Lane <tgl@sss.pgh.pa.us>
	* Thomas is Thomas Lockhart <lockhart@alumni.caltech.edu>
	* TomH is Tom I Helbekkmo <tih@Hamartun.Priv.NO>
	* Vadim is "Vadim B. Mikheev" <vadim@krs.ru>