]> granicus.if.org Git - postgresql/blob - doc/src/FAQ/TODO.html
4d2cd320b46198621a9071babb84a4dddb9d208e
[postgresql] / doc / src / FAQ / TODO.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html>
4 <head>
5 <title>PostgreSQL TODO List</title>
6 <meta name="generator" content="HTML::TextToHTML v2.25"/>
7 </head>
8 <body bgcolor="#FFFFFF" text="#000000" link="#FF0000" vlink="#A00000" alink="#0000FF">
9 <h1><a name="section_1">PostgreSQL TODO List</a></h1>
10 <p>Current maintainer:     Bruce Momjian (<a href="mailto:bruce@momjian.us">bruce@momjian.us</a>)<br/>
11 Last updated:           Fri Jun 13 12:24:28 EDT 2008
12 </p>
13 <p>The most recent version of this document can be viewed at<br/>
14 <a href="http://www.postgresql.org/docs/faqs.TODO.html">http://www.postgresql.org/docs/faqs.TODO.html</a>.
15 </p>
16 <p><strong>A hyphen, "-", marks changes that will appear in the upcoming 8.4 release.</strong><br/>
17 <strong>A percent sign, "%", marks items that are easier to implement.</strong>
18 </p>
19 <p>This list contains all known PostgreSQL bugs and feature requests. If<br/>
20 you would like to work on an item, please read the Developer's FAQ<br/>
21 first.  There is also a developer's wiki at<br/>
22 <a href="http://developer.postgresql.org">http://developer.postgresql.org</a>.
23 </p>
24 <h1><a name="section_2">Administration</a></h1>
25
26 <ul>
27   <li>-<em>Allow administrators to safely terminate individual sessions either</em>
28   via an SQL function or SIGTERM
29   </li><li>Check for unreferenced table files created by transactions that were
30   in-progress when the server terminated abruptly
31 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2006-06/msg00096.php">http://archives.postgresql.org/pgsql-patches/2006-06/msg00096.php</a>
32 </p>
33   </li><li>Set proper permissions on non-system schemas during db creation
34 <p>  Currently all schemas are owned by the super-user because they are copied
35   from the template1 database.  However, since all objects are inherited
36   from the template database, it is not clear that setting schemas to the db
37   owner is correct.
38 </p>
39   </li><li>-<em>Add function to report the time of the most recent server reload</em>
40   </li><li>Allow log_min_messages to be specified on a per-module basis
41 <p>  This would allow administrators to see more detailed information from
42   specific sections of the backend, e.g. checkpoints, autovacuum, etc.
43   Another idea is to allow separate configuration files for each module,
44   or allow arbitrary SET commands to be passed to them.
45 </p>
46   </li><li>Simplify ability to create partitioned tables
47 <p>  This would allow creation of partitioned tables without requiring
48   creation of triggers or rules for INSERT/UPDATE/DELETE, and constraints
49   for rapid partition selection.  Options could include range and hash
50   partition selection.
51 </p>
52 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg00375.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg00375.php</a>
53   <a href="http://archives.postgresql.org/pgsql-hackers/2007-04/msg00151.php">http://archives.postgresql.org/pgsql-hackers/2007-04/msg00151.php</a>
54   <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00028.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00028.php</a>
55   <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00248.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00248.php</a>
56   <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00387.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00387.php</a>
57   <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00413.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00413.php</a>
58 </p>
59   </li><li>Allow auto-selection of partitioned tables for min/max() operations
60   </li><li>Allow more complex user/database default GUC settings
61 <p>  Currently ALTER USER and ALTER DATABASE support per-user and
62   per-database defaults.  Consider adding per-user-and-database
63   defaults so things like search_path can be defaulted for a
64   specific user connecting to a specific database.
65 </p>
66   </li><li>Allow custom variable classes that can restrict who can set the values
67 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-11/msg00911.php">http://archives.postgresql.org/pgsql-hackers/2006-11/msg00911.php</a>
68 </p>
69   </li><li>Implement the SQL standard mechanism whereby REVOKE ROLE revokes only
70   the privilege granted by the invoking role, and not those granted
71   by other roles
72 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2007-05/msg00010.php">http://archives.postgresql.org/pgsql-bugs/2007-05/msg00010.php</a>
73 </p>
74   </li><li>Allow SSL authentication/encryption over unix domain sockets
75 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-12/msg00924.php">http://archives.postgresql.org/pgsql-hackers/2007-12/msg00924.php</a>
76 </p>
77   </li><li>Allow SSL key file permission checks to be optionally disabled when
78   sharing SSL keys with other applications
79 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2007-12/msg00069.php">http://archives.postgresql.org/pgsql-bugs/2007-12/msg00069.php</a>
80 </p>
81   </li><li>Allow client certificate names to be checked against the client
82   hostname
83 <p>  This is already implemented in
84   libpq/fe-secure.c::verify_peer_name_matches_certificate() but the code
85   is commented out.
86 </p>
87   </li><li>Configuration files
88   <ul>
89     <li>Allow pg_hba.conf to specify host names along with IP addresses
90 <p>          Host name lookup could occur when the postmaster reads the
91           pg_hba.conf file, or when the backend starts.  Another
92           solution would be to reverse lookup the connection IP and
93           check that hostname against the host names in pg_hba.conf.
94           We could also then check that the host name maps to the IP
95           address.
96 </p>
97     </li><li>%Allow postgresql.conf file values to be changed via an SQL
98           API, perhaps using SET GLOBAL
99     </li><li>Allow the server to be stopped/restarted via an SQL API
100     </li><li>Issue a warning if a change-on-restart-only postgresql.conf value
101           is modified  and the server config files are reloaded
102     </li><li>Consider normalizing fractions in postgresql.conf, perhaps
103           using '%'
104 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-06/msg00550.php">http://archives.postgresql.org/pgsql-hackers/2007-06/msg00550.php</a>
105 </p>
106     </li><li>Allow Kerberos to disable stripping of realms so we can
107           check the username@realm against multiple realms
108 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-11/msg00009.php">http://archives.postgresql.org/pgsql-hackers/2007-11/msg00009.php</a>
109 </p>
110     </li><li>Add functions to syntax check configuration files
111   </li></ul>
112   </li><li>Tablespaces
113   <ul>
114     <li>Allow a database in tablespace t1 with tables created in
115           tablespace t2 to be used as a template for a new database created
116           with default tablespace t2
117 <p>          Currently all objects in the default database tablespace must
118           have default tablespace specifications. This is because new
119           databases are created by copying directories. If you mix default
120           tablespace tables and tablespace-specified tables in the same
121           directory, creating a new database from such a mixed directory
122           would create a new database with tables that had incorrect
123           explicit tablespaces.  To fix this would require modifying
124           pg_class in the newly copied database, which we don't currently
125           do.
126 </p>
127     </li><li>Allow reporting of which objects are in which tablespaces
128 <p>          This item is difficult because a tablespace can contain objects
129           from multiple databases. There is a server-side function that
130           returns the databases which use a specific tablespace, so this
131           requires a tool that will call that function and connect to each
132           database to find the objects in each database for that tablespace.
133 </p>
134     </li><li>Allow WAL replay of CREATE TABLESPACE to work when the directory
135           structure on the recovery computer is different from the original
136     </li><li>Allow per-tablespace quotas
137   </li></ul>
138   </li><li>Statistics Collector
139   <ul>
140     <li>Allow statistics collector information to be pulled from the collector
141           process directly, rather than requiring the collector to write a
142           filesystem file twice a second?
143     </li><li>Reduce file system activity overhead of statistics file pgstat.stat
144 <p>          <a href="http://archives.postgresql.org/pgsql-general/2007-12/msg00106.php">http://archives.postgresql.org/pgsql-general/2007-12/msg00106.php</a>
145 </p>
146     </li><li>Allow statistics last vacuum/analyze execution times to be displayed
147           without requiring stats_row_level to be enabled
148 <p>          <a href="http://archives.postgresql.org/pgsql-docs/2007-04/msg00028.php">http://archives.postgresql.org/pgsql-docs/2007-04/msg00028.php</a>
149 </p>
150     </li><li>Clear table counters on TRUNCATE
151 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2008-04/msg00169.php">http://archives.postgresql.org/pgsql-hackers/2008-04/msg00169.php</a>
152 </p>
153   </li></ul>
154   </li><li>Point-In-Time Recovery (PITR)
155   <ul>
156     <li>Allow a warm standby system to also allow read-only statements
157 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg00050.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg00050.php</a>
158 </p>
159     </li><li>%Create dump tool for write-ahead logs for use in determining
160           transaction id for point-in-time recovery
161 <p>          This is useful for checking PITR recovery.
162 </p>
163     </li><li>Allow recovery.conf to support the same syntax as
164           postgresql.conf, including quoting
165 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00497.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00497.php</a>
166 </p>
167     </li><li>Fix server restart problem when the server was shutdown during
168           a PITR backup
169 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-11/msg00800.php">http://archives.postgresql.org/pgsql-hackers/2007-11/msg00800.php</a>
170 </p>
171     </li><li>Recreate pg_xlog/archive_status/ if it doesn't exist after
172           restoring from a PITR backup
173 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-12/msg00487.php">http://archives.postgresql.org/pgsql-hackers/2007-12/msg00487.php</a>
174 </p>
175   </li></ul>
176 </li></ul>
177 <h1><a name="section_3">Data Types</a></h1>
178
179 <ul>
180   <li>Change NUMERIC to enforce the maximum precision
181   </li><li>Reduce storage space for small NUMERICs
182 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-02/msg01331.php">http://archives.postgresql.org/pgsql-hackers/2007-02/msg01331.php</a>
183   <a href="http://archives.postgresql.org/pgsql-patches/2007-02/msg00505.php">http://archives.postgresql.org/pgsql-patches/2007-02/msg00505.php</a>
184   <a href="http://archives.postgresql.org/pgsql-hackers/2007-06/msg00715.php">http://archives.postgresql.org/pgsql-hackers/2007-06/msg00715.php</a>
185 </p>
186   </li><li>Fix data types where equality comparison isn't intuitive, e.g. box
187   </li><li>Add support for public SYNONYMs
188 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-03/msg00519.php">http://archives.postgresql.org/pgsql-hackers/2006-03/msg00519.php</a>
189 </p>
190   </li><li>Fix CREATE CAST on DOMAINs
191 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-05/msg00072.php">http://archives.postgresql.org/pgsql-hackers/2006-05/msg00072.php</a>
192   <a href="http://archives.postgresql.org/pgsql-hackers/2006-09/msg01681.php">http://archives.postgresql.org/pgsql-hackers/2006-09/msg01681.php</a>
193 </p>
194   </li><li>Allow domains to be cast
195 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2003-06/msg01206.php">http://archives.postgresql.org/pgsql-hackers/2003-06/msg01206.php</a>
196   <a href="http://archives.postgresql.org/pgsql-hackers/2007-08/msg00289.php">http://archives.postgresql.org/pgsql-hackers/2007-08/msg00289.php</a>
197 </p>
198   </li><li>Add support for SQL-standard GENERATED/IDENTITY columns
199 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-07/msg00543.php">http://archives.postgresql.org/pgsql-hackers/2006-07/msg00543.php</a>
200   <a href="http://archives.postgresql.org/pgsql-hackers/2006-08/msg00038.php">http://archives.postgresql.org/pgsql-hackers/2006-08/msg00038.php</a>
201   <a href="http://archives.postgresql.org/pgsql-hackers/2007-05/msg00344.php">http://archives.postgresql.org/pgsql-hackers/2007-05/msg00344.php</a>
202   <a href="http://archives.postgresql.org/pgsql-patches/2007-05/msg00076.php">http://archives.postgresql.org/pgsql-patches/2007-05/msg00076.php</a>
203   <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg00604.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg00604.php</a>
204 </p>
205   </li><li>Improve XML support
206 <p>  <a href="http://developer.postgresql.org/index.php/XML_Support">http://developer.postgresql.org/index.php/XML_Support</a>
207 </p>
208   </li><li>Consider placing all sequences in a single table, or create a system
209   view
210 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php</a>
211 </p>
212   </li><li>Allow the UUID type to accept non-standard formats
213 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg01214.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg01214.php</a>
214 </p>
215   </li><li>Consider a special data type for regular expressions
216 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-08/msg01067.php">http://archives.postgresql.org/pgsql-hackers/2007-08/msg01067.php</a>
217 </p>
218   </li><li>Reduce BIT data type overhead using short varlena headers
219 <p>  <a href="http://archives.postgresql.org/pgsql-general/2007-12/msg00273.php">http://archives.postgresql.org/pgsql-general/2007-12/msg00273.php</a>
220 </p>
221   </li><li>Allow xml arrays to be cast to other data types
222 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-09/msg00981.php">http://archives.postgresql.org/pgsql-hackers/2007-09/msg00981.php</a>
223   <a href="http://archives.postgresql.org/pgsql-hackers/2007-10/msg00231.php">http://archives.postgresql.org/pgsql-hackers/2007-10/msg00231.php</a>
224   <a href="http://archives.postgresql.org/pgsql-hackers/2007-11/msg00471.php">http://archives.postgresql.org/pgsql-hackers/2007-11/msg00471.php</a>
225 </p>
226   </li><li>Simplify integer cross-data-type operators
227 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2008-01/msg00189.php">http://archives.postgresql.org/pgsql-bugs/2008-01/msg00189.php</a>
228 </p>
229   </li><li>Allow XML to accept more liberal DOCTYPE specifications
230 <p>  <a href="http://archives.postgresql.org/pgsql-general/2008-02/msg00347.php">http://archives.postgresql.org/pgsql-general/2008-02/msg00347.php</a>
231 </p>
232   </li><li>Allow adding/renaming/removing enumerated values to an existing
233   enumerated data type
234 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-04/msg01718.php">http://archives.postgresql.org/pgsql-hackers/2008-04/msg01718.php</a>
235 </p>
236   </li><li>Dates and Times
237   <ul>
238     <li>Allow infinite dates and intervals just like infinite timestamps
239     </li><li>Merge hardwired timezone names with the TZ database; allow either
240           kind everywhere a TZ name is currently taken
241     </li><li>Allow TIMESTAMP WITH TIME ZONE to store the original timezone
242           information, either zone name or offset from UTC
243 <p>          If the TIMESTAMP value is stored with a time zone name, interval
244           computations should adjust based on the time zone rules.
245           <a href="http://archives.postgresql.org/pgsql-hackers/2004-10/msg00705.php">http://archives.postgresql.org/pgsql-hackers/2004-10/msg00705.php</a>
246 </p>
247     </li><li>Fix SELECT '0.01 years'::interval, '0.01 months'::interval
248     </li><li>Add a GUC variable to allow output of interval values in ISO8601
249           format
250     </li><li>Have timestamp subtraction not call justify_hours()?
251 <p>          <a href="http://archives.postgresql.org/pgsql-sql/2006-10/msg00059.php">http://archives.postgresql.org/pgsql-sql/2006-10/msg00059.php</a>
252 </p>
253     </li><li>Improve timestamptz subtraction to be DST-aware
254 <p>          Currently subtracting one date from another that crosses a
255           daylight savings time adjustment can return '1 day 1 hour', but
256           adding that back to the first date returns a time one hour in
257           the future.  This is caused by the adjustment of '25 hours' to
258           '1 day 1 hour', and '1 day' is the same time the next day, even
259           if daylight savings adjustments are involved.
260 </p>
261     </li><li>Fix interval display to support values exceeding 2^31 hours
262     </li><li>Add overflow checking to timestamp and interval arithmetic
263     </li><li>Extend timezone code to allow 64-bit values so we can
264           represent years beyond 2038
265 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2006-09/msg01363.php">http://archives.postgresql.org/pgsql-hackers/2006-09/msg01363.php</a>
266 </p>
267     </li><li>-<em>Use LC_TIME for localized weekday/month names, rather than</em>
268           LC_MESSAGES
269 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2006-11/msg00390.php">http://archives.postgresql.org/pgsql-hackers/2006-11/msg00390.php</a>
270 </p>
271     </li><li>Add ISO INTERVAL handling
272   </li></ul>
273 </li></ul>
274 <p>                  <a href="http://archives.postgresql.org/pgsql-hackers/2006-01/msg00250.php">http://archives.postgresql.org/pgsql-hackers/2006-01/msg00250.php</a><br/>
275                   <a href="http://archives.postgresql.org/pgsql-bugs/2006-04/msg00248.php">http://archives.postgresql.org/pgsql-bugs/2006-04/msg00248.php</a>
276 </p>
277 <ul>
278   <li>Support ISO INTERVAL syntax if units cannot be determined from
279                   the string, and are supplied after the string
280 <p>                  The SQL standard states that the units after the string
281                   specify the units of the string, e.g. INTERVAL '2' MINUTE
282                   should return '00:02:00'. The current behavior has the units
283                   restrict the interval value to the specified unit or unit
284                   range, INTERVAL '70' SECOND returns '00:00:10'.
285 </p>
286 <p>                  For syntax that isn't uniquely ISO or PG syntax, like '1' or
287                   '1:30', treat as ISO if there is a range specification clause,
288                   and as PG if there no clause is present, e.g. interpret '1:30'
289                   MINUTE TO SECOND as '1 minute 30 seconds', and interpret
290                   '1:30' as '1 hour, 30 minutes'.
291 </p>
292 <p>                  This makes common cases like SELECT INTERVAL '1' MONTH
293                   SQL-standard results. The SQL standard supports a limited
294                   number of unit combinations and doesn't support unit names in
295                   the string. The PostgreSQL syntax is more flexible in the
296                   range of units supported, e.g. PostgreSQL supports '1 year 1
297                   hour', while the SQL standard does not.
298 </p>
299   </li><li>Add support for year-month syntax, INTERVAL '50-6' YEAR
300                   TO MONTH
301   </li><li>Interpret INTERVAL '1 year' MONTH as CAST (INTERVAL '1
302                   year' AS INTERVAL MONTH), and this should return '12 months'
303   </li><li>Round or truncate values to the requested precision, e.g.
304                   INTERVAL '11 months' AS YEAR should return one or zero
305   </li><li>Support precision, CREATE TABLE foo (a INTERVAL MONTH(3))
306   <ul>
307     <li>Arrays
308     <ul>
309       <li>Delay resolution of array expression's data type so assignment
310           coercion can be performed on empty array expressions
311       </li><li>Add support for arrays of domains
312 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2007-05/msg00114.php">http://archives.postgresql.org/pgsql-patches/2007-05/msg00114.php</a>
313 </p>
314       </li><li>Allow single-byte header storage for array elements
315     </li></ul>
316     </li><li>Binary Data
317     <ul>
318       <li>Improve vacuum of large objects, like contrib/vacuumlo?
319       </li><li>Add security checking for large objects
320       </li><li>Auto-delete large objects when referencing row is deleted
321 <p>          contrib/lo offers this functionality.
322 </p>
323       </li><li>Allow read/write into TOAST values like large objects
324 <p>          This requires the TOAST column to be stored EXTERNAL.
325 </p>
326       </li><li>Add API for 64-bit large object access
327 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2005-09/msg00781.php">http://archives.postgresql.org/pgsql-hackers/2005-09/msg00781.php</a>
328 </p>
329     </li></ul>
330     </li><li>MONEY data type
331     <ul>
332       <li>Add locale-aware MONEY type, and support multiple currencies
333 <p>          <a href="http://archives.postgresql.org/pgsql-general/2005-08/msg01432.php">http://archives.postgresql.org/pgsql-general/2005-08/msg01432.php</a>
334           <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg01181.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg01181.php</a>
335 </p>
336       </li><li>MONEY dumps in a locale-specific format making it difficult to
337           restore to a system with a different locale
338       </li><li>Allow MONEY to be easily cast to/from other numeric data types
339     </li></ul>
340     </li><li>Text Search
341     <ul>
342       <li>Allow dictionaries to change the token that is passed on to
343           later dictionaries
344 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2007-11/msg00081.php">http://archives.postgresql.org/pgsql-patches/2007-11/msg00081.php</a>
345 </p>
346       </li><li>Consider a function-based API for '@@' searches
347 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-11/msg00511.php">http://archives.postgresql.org/pgsql-hackers/2007-11/msg00511.php</a>
348 </p>
349       </li><li>Improve text search error messages
350 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-10/msg00966.php">http://archives.postgresql.org/pgsql-hackers/2007-10/msg00966.php</a>
351           <a href="http://archives.postgresql.org/pgsql-hackers/2007-11/msg01146.php">http://archives.postgresql.org/pgsql-hackers/2007-11/msg01146.php</a>
352 </p>
353       </li><li>Consider changing error to warning for strings larger than one
354           megabyte
355 <p>          <a href="http://archives.postgresql.org/pgsql-bugs/2008-02/msg00190.php">http://archives.postgresql.org/pgsql-bugs/2008-02/msg00190.php</a>
356           <a href="http://archives.postgresql.org/pgsql-patches/2008-03/msg00062.php">http://archives.postgresql.org/pgsql-patches/2008-03/msg00062.php</a>
357 </p>
358     </li></ul>
359   </li></ul>
360 </li></ul>
361 <h1><a name="section_4">Functions</a></h1>
362
363 <ul>
364   <li>Allow INET subnet tests using non-constants to be indexed
365   </li><li>Allow to_date() and to_timestamp() accept localized month names
366   </li><li>Fix to_date()-related functions to consistently issue errors
367 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-02/msg00915.php">http://archives.postgresql.org/pgsql-hackers/2007-02/msg00915.php</a>
368 </p>
369   </li><li>Add missing parameter handling in to_char()
370 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2005-12/msg00948.php">http://archives.postgresql.org/pgsql-hackers/2005-12/msg00948.php</a>
371 </p>
372   </li><li>Allow substring/replace() to get/set bit values
373   </li><li>Allow to_char() on interval values to accumulate the highest unit
374   requested
375 <p>  Some special format flag would be required to request such
376   accumulation.  Such functionality could also be added to EXTRACT.
377   Prevent accumulation that crosses the month/day boundary because of
378   the uneven number of days in a month.
379 </p>
380   <ul>
381     <li>to_char(INTERVAL '1 hour 5 minutes', 'MI') =&gt; 65
382     </li><li>to_char(INTERVAL '43 hours 20 minutes', 'MI' ) =&gt; 2600
383     </li><li>to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') =&gt; 0:1:19:20
384     </li><li>to_char(INTERVAL '3 years 5 months','MM') =&gt; 41
385   </li></ul>
386   </li><li>Implement inlining of set-returning functions defined in SQL
387   </li><li>Allow SQL-language functions to return results from RETURNING queries
388 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-10/msg00665.php">http://archives.postgresql.org/pgsql-hackers/2006-10/msg00665.php</a>
389 </p>
390   </li><li>Allow SQL-language functions to reference parameters by parameter name
391 <p>  Currently SQL-language functions can only refer to dollar parameters,
392   e.g. $1
393 </p>
394   </li><li>Add SPI_gettypmod() to return the typemod for a TupleDesc
395   </li><li>Enforce typmod for function inputs, function results and parameters for
396   spi_prepare'd statements called from PLs
397 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg01403.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg01403.php</a>
398 </p>
399   </li><li>Allow holdable cursors in SPI
400   </li><li>Tighten function permission checks
401 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00568.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00568.php</a>
402 </p>
403   </li><li>Fix IS OF so it matches the ISO specification, and add documentation
404 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2003-08/msg00060.php">http://archives.postgresql.org/pgsql-patches/2003-08/msg00060.php</a>
405   <a href="http://archives.postgresql.org/pgsql-hackers/2007-02/msg00060.php">http://archives.postgresql.org/pgsql-hackers/2007-02/msg00060.php</a>
406 </p>
407   </li><li>Add missing operators for geometric data types
408 <p>  Some geometric types do not have the full suite of geometric operators,
409   e.g. box @&gt; point
410 </p>
411   </li><li>Implement Boyer-Moore searching in strpos()
412 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2007-08/msg00012.php">http://archives.postgresql.org/pgsql-patches/2007-08/msg00012.php</a>
413 </p>
414   </li><li>Prevent malicious functions from being executed with the permissions
415   of unsuspecting users
416 <p>  Index functions are safe, so VACUUM and ANALYZE are safe too. 
417   Triggers, CHECK and DEFAULT expressions, and rules are still vulnerable.
418   <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00268.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00268.php</a>
419 </p>
420   </li><li>Reduce memory usage of aggregates in set returning functions
421 <p>  <a href="http://archives.postgresql.org/pgsql-performance/2008-01/msg00031.php">http://archives.postgresql.org/pgsql-performance/2008-01/msg00031.php</a>
422 </p>
423   </li><li>Add temporal versions of generate_series()
424 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-04/msg01180.php">http://archives.postgresql.org/pgsql-hackers/2007-04/msg01180.php</a>
425 </p>
426   </li><li>Add array_accum() and array_to_set() functions for arrays
427 <p>  The standards specify array_agg() and UNNEST.
428   <a href="http://archives.postgresql.org/pgsql-hackers/2007-08/msg00464.php">http://archives.postgresql.org/pgsql-hackers/2007-08/msg00464.php</a>
429 </p>
430   </li><li>Fix /contrib/ltree operator
431 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2007-11/msg00044.php">http://archives.postgresql.org/pgsql-bugs/2007-11/msg00044.php</a>
432 </p>
433   </li><li>Fix inconsistent precedence of =, &gt;, and &lt; compared to &lt;&gt;, &gt;=, and &lt;=
434 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2007-12/msg00145.php">http://archives.postgresql.org/pgsql-bugs/2007-12/msg00145.php</a>
435 </p>
436   </li><li>Fix regular expression bug when using complex back-references
437 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2007-10/msg00000.php">http://archives.postgresql.org/pgsql-bugs/2007-10/msg00000.php</a>
438 </p>
439   </li><li>Have /contrib/dblink reuse unnamed connections
440 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-10/msg00895.php">http://archives.postgresql.org/pgsql-hackers/2007-10/msg00895.php</a>
441 </p>
442   </li><li>Add SQL-standard array_agg() and unnest() array functions
443 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg01017.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg01017.php</a>
444 </p>
445   </li><li>Allow calling of a procedure outside a SELECT that can control the
446   transaction state
447 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-10/msg01375.php">http://archives.postgresql.org/pgsql-hackers/2007-10/msg01375.php</a>
448 </p>
449 </li></ul>
450 <h1><a name="section_5">Multi-Language Support</a></h1>
451
452 <ul>
453   <li>Add NCHAR (as distinguished from ordinary varchar),
454   </li><li>Allow locale to be set at database creation
455 <p>  Currently locale can only be set during initdb.  No global tables have
456   locale-aware columns.  However, the database template used during
457   database creation might have locale-aware indexes.  The indexes would
458   need to be reindexed to match the new locale.
459 </p>
460   </li><li>Allow encoding on a per-column basis optionally using the ICU library;
461   Add CREATE COLLATE
462 <p>  Right now only one encoding is allowed per database.
463 </p>
464 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2005-03/msg00932.php">http://archives.postgresql.org/pgsql-hackers/2005-03/msg00932.php</a>
465   <a href="http://archives.postgresql.org/pgsql-patches/2005-08/msg00039.php">http://archives.postgresql.org/pgsql-patches/2005-08/msg00039.php</a>
466   <a href="http://archives.postgresql.org/pgsql-patches/2005-08/msg00309.php">http://archives.postgresql.org/pgsql-patches/2005-08/msg00309.php</a>
467   <a href="http://archives.postgresql.org/pgsql-hackers/2005-09/msg00110.php">http://archives.postgresql.org/pgsql-hackers/2005-09/msg00110.php</a>
468   <a href="http://archives.postgresql.org/pgsql-patches/2005-09/msg00020.php">http://archives.postgresql.org/pgsql-patches/2005-09/msg00020.php</a>
469   <a href="http://archives.postgresql.org/pgsql-hackers/2005-12/msg01121.php">http://archives.postgresql.org/pgsql-hackers/2005-12/msg01121.php</a>
470   <a href="http://archives.postgresql.org/pgsql-hackers/2006-01/msg00767.php">http://archives.postgresql.org/pgsql-hackers/2006-01/msg00767.php</a>
471   <a href="http://archives.postgresql.org/pgsql-patches/2006-03/msg00233.php">http://archives.postgresql.org/pgsql-patches/2006-03/msg00233.php</a>
472   <a href="http://archives.postgresql.org/pgsql-hackers/2006-09/msg00662.php">http://archives.postgresql.org/pgsql-hackers/2006-09/msg00662.php</a>
473   <a href="http://wiki.postgresql.org/wiki/Todo:Collate">http://wiki.postgresql.org/wiki/Todo:Collate</a> 
474   <a href="http://wiki.postgresql.org/wiki/Todo:ICU">http://wiki.postgresql.org/wiki/Todo:ICU</a>
475 </p>
476   </li><li>Support multiple simultaneous character sets, per SQL92
477   </li><li>Improve UTF8 combined character handling?
478   </li><li>Add octet_length_server() and octet_length_client()
479   </li><li>Make octet_length_client() the same as octet_length()?
480   </li><li>Fix problems with wrong runtime encoding conversion for NLS message files
481   </li><li>Add URL to more complete multi-byte regression tests
482 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2005-07/msg00272.php">http://archives.postgresql.org/pgsql-hackers/2005-07/msg00272.php</a>
483 </p>
484   </li><li>Fix ILIKE and regular expressions to handle case insensitivity
485   properly in multibyte encodings
486 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2005-10/msg00001.php">http://archives.postgresql.org/pgsql-bugs/2005-10/msg00001.php</a>
487   <a href="http://archives.postgresql.org/pgsql-patches/2005-11/msg00173.php">http://archives.postgresql.org/pgsql-patches/2005-11/msg00173.php</a>
488 </p>
489   </li><li>Set client encoding based on the client operating system encoding
490 <p>  Currently client_encoding is set in postgresql.conf, which
491   defaults to the server encoding.
492   <a href="http://archives.postgresql.org/pgsql-hackers/2006-08/msg01696.php">http://archives.postgresql.org/pgsql-hackers/2006-08/msg01696.php</a>
493 </p>
494   </li><li>Change memory allocation for multi-byte functions so memory is
495   allocated inside conversion functions
496 <p>  Currently we preallocate memory based on worst-case usage.
497 </p>
498 </li></ul>
499 <h1><a name="section_6">Views / Rules</a></h1>
500
501 <ul>
502   <li>Automatically create rules on views so they are updateable, per SQL99
503 <p>  We can only auto-create rules for simple views.  For more complex
504   cases users will still have to write rules manually.
505 </p>
506 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-03/msg00586.php">http://archives.postgresql.org/pgsql-hackers/2006-03/msg00586.php</a>
507   <a href="http://archives.postgresql.org/pgsql-patches/2006-08/msg00255.php">http://archives.postgresql.org/pgsql-patches/2006-08/msg00255.php</a>
508 </p>
509   </li><li>Add the functionality for WITH CHECK OPTION clause of CREATE VIEW
510   </li><li>Allow VIEW/RULE recompilation when the underlying tables change
511 <p>  Another issue is whether underlying table changes should be reflected
512   in the view, e.g. should SELECT * show additional columns if they
513   are added after the view is created.
514 </p>
515   </li><li>Make it possible to use RETURNING together with conditional DO INSTEAD
516   rules, such as for partitioning setups
517 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-09/msg00577.php">http://archives.postgresql.org/pgsql-hackers/2007-09/msg00577.php</a>
518 </p>
519   </li><li>Add the ability to automatically create materialized views
520 <p>  Right now materialized views require the user to create triggers on the
521   main table to keep the summary table current.  SQL syntax should be able
522   to manager the triggers and summary table automatically.  A more
523   sophisticated implementation would automatically retrieve from the
524   summary table when the main table is referenced, if possible.
525 </p>
526 </li></ul>
527 <h1><a name="section_7">SQL Commands</a></h1>
528
529 <ul>
530   <li>Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT
531   </li><li>Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY
532   </li><li>%Allow SET CONSTRAINTS to be qualified by schema/table name
533   </li><li>%Add a separate TRUNCATE permission
534 <p>  Currently only the owner can TRUNCATE a table because triggers are not
535   called, and the table is locked in exclusive mode.
536 </p>
537   </li><li>Allow PREPARE of cursors
538   </li><li>Allow finer control over the caching of prepared query plans
539 <p>  Currently queries prepared via the libpq API are planned on first
540   execute using the supplied parameters --- allow SQL PREPARE to do the
541   same.  Also, allow control over replanning prepared queries either
542   manually or automatically when statistics for execute parameters
543   differ dramatically from those used during planning.
544 </p>
545   </li><li>Improve logging of prepared transactions recovered during startup
546 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-11/msg00092.php">http://archives.postgresql.org/pgsql-hackers/2006-11/msg00092.php</a>
547 </p>
548   </li><li>Improve failure message when DROP DATABASE is used on a database that
549   has prepared transactions
550   </li><li>Allow prepared transactions with temporary tables created and dropped
551   in the same transaction, and when an ON COMMIT DELETE ROWS temporary 
552   table is accessed
553 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg00047.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg00047.php</a>
554 </p>
555   </li><li>Add a GUC variable to warn about non-standard SQL usage in queries
556   </li><li>Add SQL-standard MERGE/REPLACE/UPSERT command
557 <p>  MERGE is typically used to merge two tables.  REPLACE or UPSERT
558   command does UPDATE, or on failure, INSERT. This is similar to UPDATE,
559   then for unmatched rows, INSERT.  Whether concurrent access allows
560   modifications which could cause row loss is implementation independent.
561   To implement this cleanly requires that the table have a unique index
562   so duplicate checking can be easily performed.  It is possible to do it
563   without a unique index if we require the user to LOCK the table before
564   the MERGE.
565 </p>
566 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2005-11/msg00501.php">http://archives.postgresql.org/pgsql-hackers/2005-11/msg00501.php</a>
567   <a href="http://archives.postgresql.org/pgsql-hackers/2005-11/msg00536.php">http://archives.postgresql.org/pgsql-hackers/2005-11/msg00536.php</a>
568   <a href="http://archives.postgresql.org/pgsql-hackers/2008-04/msg01475.php">http://archives.postgresql.org/pgsql-hackers/2008-04/msg01475.php</a>
569 </p>
570   </li><li>Add NOVICE output level for helpful messages like automatic sequence/index
571   creation
572   </li><li>Add GUC to issue notice about statements that use unjoined tables
573   </li><li>Allow EXPLAIN to identify tables that were skipped because of
574   constraint_exclusion
575   </li><li>Allow EXPLAIN output to be more easily processed by scripts, perhaps XML
576   </li><li>Enable standard_conforming_strings
577   </li><li>Make standard_conforming_strings the default in 8.5?
578 <p>  When this is done, backslash-quote should be prohibited in non-E''
579   strings because of possible confusion over how such strings treat
580   backslashes.  Basically, '' is always safe for a literal single
581   quote, while \' might or might not be based on the backslash
582   handling rules.
583 </p>
584   </li><li>Simplify dropping roles that have objects in several databases
585   </li><li>Allow COMMENT ON to accept an expression rather than just a string
586   </li><li>Allow the count returned by SELECT, etc to be represented as an int64
587   to allow a higher range of values
588   </li><li>Add SQL99 WITH clause to SELECT
589   </li><li>Add SQL:2003 WITH RECURSIVE (hierarchical) queries to SELECT
590 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg01375.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg01375.php</a>
591   <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg00642.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg00642.php</a>
592   <a href="http://archives.postgresql.org/pgsql-patches/2007-03/msg00139.php">http://archives.postgresql.org/pgsql-patches/2007-03/msg00139.php</a>
593   <a href="http://archives.postgresql.org/pgsql-hackers/2007-11/msg01334.php">http://archives.postgresql.org/pgsql-hackers/2007-11/msg01334.php</a>
594   <a href="http://archives.postgresql.org/pgsql-patches/2008-01/msg00105.php">http://archives.postgresql.org/pgsql-patches/2008-01/msg00105.php</a>
595   <a href="http://archives.postgresql.org/pgsql-patches/2008-03/msg00327.php">http://archives.postgresql.org/pgsql-patches/2008-03/msg00327.php</a>
596 </p>
597   </li><li>Add DEFAULT .. AS OWNER so permission checks are done as the table
598   owner
599 <p>  This would be useful for SERIAL nextval() calls and CHECK constraints.
600 </p>
601   </li><li>Allow DISTINCT to work in multiple-argument aggregate calls
602   </li><li>Add column to pg_stat_activity that shows the progress of long-running
603   commands like CREATE INDEX and VACUUM
604 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2008-04/msg00203.php">http://archives.postgresql.org/pgsql-patches/2008-04/msg00203.php</a>
605 </p>
606   </li><li>Implement SQL:2003 window functions
607   </li><li>Allow INSERT/UPDATE ... RETURNING inside a SELECT 'FROM' clause or
608   target list
609 <p>  <a href="http://archives.postgresql.org/pgsql-general/2006-09/msg00803.php">http://archives.postgresql.org/pgsql-general/2006-09/msg00803.php</a>
610   <a href="http://archives.postgresql.org/pgsql-hackers/2006-10/msg00693.php">http://archives.postgresql.org/pgsql-hackers/2006-10/msg00693.php</a>
611   <a href="http://archives.postgresql.org/pgsql-hackers/2008-06/msg00124.php">http://archives.postgresql.org/pgsql-hackers/2008-06/msg00124.php</a>
612 </p>
613   </li><li>Increase locking when DROPing objects so dependent objects cannot
614   get dropped while the DROP operation is happening
615 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg00937.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg00937.php</a>
616 </p>
617   </li><li>-<em>Allow AS in "SELECT col AS label" to be optional in certain cases</em>
618   </li><li>Allow INSERT ... DELETE ... RETURNING, namely allow the DELETE ...
619   RETURNING to supply values to the INSERT
620   <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/thrd2.php#00979">http://archives.postgresql.org/pgsql-hackers/2008-02/thrd2.php#00979</a>
621   </li><li>Add comments on system tables/columns using the information in
622   catalogs.sgml
623 <p>  Ideally the information would be pulled from the SGML file
624   automatically.
625 </p>
626   </li><li>Improve reporting of UNION type mismatches
627 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-04/msg00944.php">http://archives.postgresql.org/pgsql-hackers/2007-04/msg00944.php</a>
628   <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg00597.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg00597.php</a>
629 </p>
630   </li><li>CREATE
631   <ul>
632     <li>Allow CREATE TABLE AS to determine column lengths for complex
633           expressions like SELECT col1 || col2
634     </li><li>Have WITH CONSTRAINTS also create constraint indexes
635 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2007-04/msg00149.php">http://archives.postgresql.org/pgsql-patches/2007-04/msg00149.php</a>
636 </p>
637     </li><li>Have CONSTRAINT cname NOT NULL record the contraint name
638 <p>          Right now pg_attribute.attnotnull records the NOT NULL status
639           of the column, but does not record the contraint name
640 </p>
641     </li><li>Prevent concurrent CREATE TABLE table1 from sometimes returning
642           a cryptic error message
643 <p>          <a href="http://archives.postgresql.org/pgsql-bugs/2007-10/msg00169.php">http://archives.postgresql.org/pgsql-bugs/2007-10/msg00169.php</a>
644 </p>
645     </li><li>Add CREATE SCHEMA ... LIKE that copies a schema
646   </li></ul>
647   </li><li>UPDATE
648   <ul>
649     <li>Allow UPDATE tab SET ROW (col, ...) = (SELECT...)
650 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2006-07/msg01306.php">http://archives.postgresql.org/pgsql-hackers/2006-07/msg01306.php</a>
651           <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg00865.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg00865.php</a>
652           <a href="http://archives.postgresql.org/pgsql-patches/2007-04/msg00315.php">http://archives.postgresql.org/pgsql-patches/2007-04/msg00315.php</a>
653           <a href="http://archives.postgresql.org/pgsql-patches/2008-03/msg00237.php">http://archives.postgresql.org/pgsql-patches/2008-03/msg00237.php</a>
654 </p>
655     </li><li>Research self-referential UPDATEs that see inconsistent row versions
656           in read-committed mode
657 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-05/msg00507.php">http://archives.postgresql.org/pgsql-hackers/2007-05/msg00507.php</a>
658           <a href="http://archives.postgresql.org/pgsql-hackers/2007-06/msg00016.php">http://archives.postgresql.org/pgsql-hackers/2007-06/msg00016.php</a>
659 </p>
660     </li><li>Allow GLOBAL temporary tables to exist as empty by default in
661           all sessions
662 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-07/msg00006.php">http://archives.postgresql.org/pgsql-hackers/2007-07/msg00006.php</a>
663 </p>
664   </li></ul>
665   </li><li>ALTER
666   <ul>
667     <li>Have ALTER TABLE RENAME rename SERIAL sequence names
668 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php</a>
669 </p>
670     </li><li>Have ALTER SEQUENCE RENAME rename the sequence name stored
671           in the sequence table
672 <p>          <a href="http://archives.postgresql.org/pgsql-bugs/2007-09/msg00092.php">http://archives.postgresql.org/pgsql-bugs/2007-09/msg00092.php</a>
673           <a href="http://archives.postgresql.org/pgsql-bugs/2007-10/msg00007.php">http://archives.postgresql.org/pgsql-bugs/2007-10/msg00007.php</a>
674           <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php</a>
675 </p>
676     </li><li>Add ALTER DOMAIN to modify the underlying data type
677     </li><li>%Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME
678 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2006-02/msg00168.php">http://archives.postgresql.org/pgsql-patches/2006-02/msg00168.php</a>
679 </p>
680     </li><li>%Allow ALTER TABLE to change constraint deferrability and actions
681     </li><li>Add missing object types for ALTER ... SET SCHEMA
682     </li><li>Allow ALTER TABLESPACE to move to different directories
683     </li><li>Allow databases to be moved to different tablespaces
684     </li><li>Allow moving system tables to other tablespaces, where possible
685 <p>          Currently non-global system tables must be in the default database
686           tablespace. Global system tables can never be moved.
687 </p>
688     </li><li>-<em>Prevent parent tables from altering or dropping constraints</em>
689           like CHECK that are inherited by child tables unless CASCADE
690           is used
691     </li><li>-<em>Prevent child tables from altering or dropping constraints</em>
692           like CHECK that were inherited from the parent table
693     </li><li>Have ALTER INDEX update the name of a constraint using that index
694     </li><li>Add ALTER TABLE RENAME CONSTRAINT, update index name also
695     </li><li>Allow column display reordering by recording a display,
696           storage, and permanent id for every column?
697 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00782.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00782.php</a>
698 </p>
699     </li><li>Allow an existing index to be marked as a table's primary key
700 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2008-04/msg00500.php">http://archives.postgresql.org/pgsql-hackers/2008-04/msg00500.php</a>
701 </p>
702   </li></ul>
703   </li><li>CLUSTER
704   <ul>
705     <li>Automatically maintain clustering on a table
706 <p>          This might require some background daemon to maintain clustering
707           during periods of low usage. It might also require tables to be only
708           partially filled for easier reorganization.  Another idea would
709           be to create a merged heap/index data file so an index lookup would
710           automatically access the heap data too.  A third idea would be to
711           store heap rows in hashed groups, perhaps using a user-supplied
712           hash function.
713           <a href="http://archives.postgresql.org/pgsql-performance/2004-08/msg00349.php">http://archives.postgresql.org/pgsql-performance/2004-08/msg00349.php</a>
714 </p>
715     </li><li>%Add default clustering to system tables
716 <p>          To do this, determine the ideal cluster index for each system
717           table and set the cluster setting during initdb.
718 </p>
719     </li><li>%Add VERBOSE option to report tables as they are processed,
720           like VACUUM VERBOSE
721   </li></ul>
722   </li><li>COPY
723   <ul>
724     <li>Allow COPY to report error lines and continue
725 <p>          This requires the use of a savepoint before each COPY line is
726           processed, with ROLLBACK on COPY failure.
727           <a href="http://archives.postgresql.org/pgsql-hackers/2007-12/msg00572.php">http://archives.postgresql.org/pgsql-hackers/2007-12/msg00572.php</a>
728 </p>
729     </li><li>Allow COPY on a newly-created table to skip WAL logging
730 <p>          On crash recovery, the table involved in the COPY would
731           be removed or have its heap and index files truncated.  One
732           issue is that no other backend should be able to add to
733           the table at the same time, which is something that is
734           currently allowed.  This currently is done if the table is
735           created inside the same transaction block as the COPY because
736           no other backends can see the table.
737 </p>
738     </li><li>Consider using a ring buffer for COPY FROM
739 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2008-02/msg00140.php">http://archives.postgresql.org/pgsql-patches/2008-02/msg00140.php</a>
740           <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg01080.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg01080.php</a>
741 </p>
742     </li><li>Allow COPY FROM to create index entries in bulk
743 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg00811.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg00811.php</a>
744 </p>
745     </li><li>Allow COPY in CSV mode to control whether a quoted zero-length
746           string is treated as NULL
747 <p>          Currently this is always treated as a zero-length string,
748           which generates an error when loading into an integer column
749           <a href="http://archives.postgresql.org/pgsql-hackers/2007-07/msg00905.php">http://archives.postgresql.org/pgsql-hackers/2007-07/msg00905.php</a>
750 </p>
751     </li><li>Impove COPY performance
752 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg00954.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg00954.php</a>
753 </p>
754   </li></ul>
755   </li><li>GRANT/REVOKE
756   <ul>
757     <li>Allow column-level privileges
758     </li><li>%Allow GRANT/REVOKE permissions to be applied to all schema objects
759           with one command
760 <p>          The proposed syntax is:
761 </p><p>                GRANT SELECT ON ALL TABLES IN public TO phpuser;
762                 GRANT SELECT ON NEW TABLES IN public TO phpuser;
763 </p>
764     </li><li>Allow GRANT/REVOKE permissions to be inherited by objects based on
765           schema permissions
766     </li><li>Allow SERIAL sequences to inherit permissions from the base table?
767   </li></ul>
768   </li><li>CURSOR
769   <ul>
770     <li>Prevent DROP TABLE from dropping a row referenced by its own open
771           cursor?
772   </li></ul>
773   </li><li>INSERT
774   <ul>
775     <li>Allow INSERT/UPDATE of the system-generated oid value for a row
776     </li><li>In rules, allow VALUES() to contain a mixture of 'old' and 'new'
777           references
778   </li></ul>
779   </li><li>SHOW/SET
780   <ul>
781     <li>Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM
782           ANALYZE, and CLUSTER
783   </li></ul>
784   </li><li>LISTEN/NOTIFY
785   <ul>
786     <li>Allow LISTEN/NOTIFY to store info in memory rather than tables?
787 <p>          Currently LISTEN/NOTIFY information is stored in pg_listener. 
788           Storing such information in memory would improve performance.
789 </p>
790     </li><li>Add optional textual message to NOTIFY
791 <p>          This would allow an informational message to be added to the notify
792           message, perhaps indicating the row modified or other custom
793           information.
794 </p>
795     </li><li>Allow multiple identical NOTIFY events to always be communicated
796           to the client, rather than sent as a single notification to the
797           listener
798 <p>          <a href="http://archives.postgresql.org/pgsql-general/2008-01/msg00057.php">http://archives.postgresql.org/pgsql-general/2008-01/msg00057.php</a>
799 </p>
800     </li><li>Allow NOTIFY in rules involving conditionals
801     </li><li>Improve LISTEN concurrency
802 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg01106.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg01106.php</a>
803 </p>
804   </li></ul>
805 </li></ul>
806 <h1><a name="section_8">Referential Integrity</a></h1>
807
808 <ul>
809   <li>Add MATCH PARTIAL referential integrity
810   </li><li>Change foreign key constraint for array -&gt; element to mean element
811   in array?
812   </li><li>Fix problem when cascading referential triggers make changes on
813   cascaded tables, seeing the tables in an intermediate state
814 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php">http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php</a>
815   <a href="http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php">http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php</a>
816 </p>
817   </li><li>Allow DEFERRABLE and end-of-statement UNIQUE constraints?
818 <p>  This would allow UPDATE tab SET col = col + 1 to work if col has
819   a unique index.  Currently, uniqueness checks are done while the
820   command is being executed, rather than at the end of the statement
821   or transaction.
822   <a href="http://people.planetpostgresql.org/greg/index.php?/archives/2006/06/10.html">http://people.planetpostgresql.org/greg/index.php?/archives/2006/06/10.html</a>
823   <a href="http://archives.postgresql.org/pgsql-hackers/2006-09/msg01458.php">http://archives.postgresql.org/pgsql-hackers/2006-09/msg01458.php</a>
824 </p>
825   </li><li>Optimize referential integrity checks
826 <p>  <a href="http://archives.postgresql.org/pgsql-performance/2005-10/msg00458.php">http://archives.postgresql.org/pgsql-performance/2005-10/msg00458.php</a>
827   <a href="http://archives.postgresql.org/pgsql-hackers/2007-04/msg00744.php">http://archives.postgresql.org/pgsql-hackers/2007-04/msg00744.php</a>
828 </p>
829 </li></ul>
830 <h1><a name="section_9">Server-Side Languages</a></h1>
831
832 <ul>
833   <li>PL/pgSQL
834   <ul>
835     <li>Fix RENAME to work on variables other than OLD/NEW
836 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2002-03/msg00591.php">http://archives.postgresql.org/pgsql-hackers/2002-03/msg00591.php</a>
837           <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg01615.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg01615.php</a>
838           <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg01587.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg01587.php</a>
839 </p>
840     </li><li>Allow function parameters to be passed by name,
841           get_employee_salary(12345 AS emp_id, 2001 AS tax_year)
842     </li><li>Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]
843     </li><li>Allow listing of record column names, and access to
844           record columns via variables, e.g. columns := r.(*),
845           tval2 := r.(colname)
846 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2005-07/msg00458.php">http://archives.postgresql.org/pgsql-patches/2005-07/msg00458.php</a>
847           <a href="http://archives.postgresql.org/pgsql-patches/2006-05/msg00302.php">http://archives.postgresql.org/pgsql-patches/2006-05/msg00302.php</a>
848           <a href="http://archives.postgresql.org/pgsql-patches/2006-06/msg00031.php">http://archives.postgresql.org/pgsql-patches/2006-06/msg00031.php</a>
849 </p>
850     </li><li>Add support for SCROLL cursors
851     </li><li>Add support for WITH HOLD cursors
852     </li><li>Allow row and record variables to be set to NULL constants,
853           and allow NULL tests on such variables
854 <p>          Because a row is not scalar, do not allow assignment
855           from NULL-valued scalars.
856 </p>
857 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2006-10/msg00070.php">http://archives.postgresql.org/pgsql-hackers/2006-10/msg00070.php</a>
858 </p>
859     </li><li>Review handling of MOVE and FETCH
860 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2007-04/msg00527.php">http://archives.postgresql.org/pgsql-patches/2007-04/msg00527.php</a>
861 </p>
862     </li><li>Improve logic of determining if an identifier is a a
863           variable or column name
864 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-07/msg00436.php">http://archives.postgresql.org/pgsql-hackers/2007-07/msg00436.php</a>
865 </p>
866     </li><li>Consider keeping seperate cached copies when search_path changes
867 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg01009.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg01009.php</a>
868 </p>
869     </li><li>-<em>Add CASE capability to language (already in SQL)</em>
870 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00696.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00696.php</a>
871 </p>
872   </li></ul>
873   </li><li>Other
874   <ul>
875     <li>Add table function support to pltcl, plpythonu
876     </li><li>Add support for polymorphic arguments and return types to
877           languages other than PL/PgSQL
878     </li><li>Add capability to create and call PROCEDURES
879     </li><li>Add support for OUT and INOUT parameters to languages other
880           than PL/PgSQL
881     </li><li>Add PL/PythonU tracebacks
882 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2006-02/msg00288.php">http://archives.postgresql.org/pgsql-patches/2006-02/msg00288.php</a>
883 </p>
884     </li><li>Allow data to be passed in native language formats, rather
885           than only text
886 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-05/msg00289.php">http://archives.postgresql.org/pgsql-hackers/2007-05/msg00289.php</a>
887 </p>
888     </li><li>Add ability to obfuscate function bodies
889 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2008-01/msg00125.php">http://archives.postgresql.org/pgsql-patches/2008-01/msg00125.php</a>
890 </p>
891   </li></ul>
892 </li></ul>
893 <h1><a name="section_10">Clients</a></h1>
894
895 <ul>
896   <li>Have pg_ctl look at PGHOST in case it is a socket directory?
897   </li><li>Allow pg_ctl to work properly with configuration files located outside
898   the PGDATA directory
899 <p>  pg_ctl can not read the pid file because it isn't located in the
900   config directory but in the PGDATA directory.  The solution is to
901   allow pg_ctl to read and understand postgresql.conf to find the
902   data_directory value.
903 </p>
904   </li><li>Add a function like pg_get_indexdef() that report more detailed index
905   information
906 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2007-12/msg00166.php">http://archives.postgresql.org/pgsql-bugs/2007-12/msg00166.php</a>
907 </p>
908   </li><li>psql
909   <ul>
910     <li>Have psql show current values for a sequence
911     </li><li>Move psql backslash database information into the backend, use
912           mnemonic commands?
913 <p>          This would allow non-psql clients to pull the same information out
914           of the database as psql.
915           <a href="http://archives.postgresql.org/pgsql-hackers/2004-01/msg00191.php">http://archives.postgresql.org/pgsql-hackers/2004-01/msg00191.php</a>
916 </p>
917     </li><li>Make psql's \d commands more consistent
918 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php">http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php</a>
919           <a href="http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php">http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php</a>
920 </p>
921     </li><li>Consistently display privilege information for all objects in psql
922     </li><li>Add auto-expanded mode so expanded output is used if the row
923           length is wider than the screen width.
924 <p>          Consider using auto-expanded mode for backslash commands like \df+.
925 </p>
926     </li><li>Prevent tab completion of SET TRANSACTION from querying the
927           database and therefore preventing the transaction isolation
928           level from being set.
929 <p>          Currently SET &lt;tab&gt; causes a database lookup to check all
930           supported session variables.  This query causes problems
931           because setting the transaction isolation level must be the
932           first statement of a transaction.
933 </p>
934     </li><li>Add a \set variable to control whether \s displays line numbers
935 <p>          Another option is to add \# which lists line numbers, and
936           allows command execution.
937 </p>
938 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php</a>
939 </p>
940     </li><li>Prevent escape string warnings when object names have
941           backslashes
942 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00227.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00227.php</a>
943 </p>
944     </li><li>Have \d show foreign keys that reference a table's primary key
945 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-04/msg00424.php">http://archives.postgresql.org/pgsql-hackers/2007-04/msg00424.php</a>
946 </p>
947     </li><li>Have \d show child tables that inherit from the specified parent
948     </li><li>-<em>Have \l+ show database size, if permissions allow</em>
949 <p>          Ideally it will not generate an error for invalid permissions
950 </p>
951     </li><li>Include the symbolic SQLSTATE name in verbose error reports
952 <p>          <a href="http://archives.postgresql.org/pgsql-general/2007-09/msg00438.php">http://archives.postgresql.org/pgsql-general/2007-09/msg00438.php</a>
953 </p>
954     </li><li>-<em>Improve display of enums to show valid enum values</em>
955     </li><li>Add prompt escape to display the client and server versions
956   </li></ul>
957   </li><li>pg_dump / pg_restore
958   <ul>
959     <li>%Add dumping of comments on index columns and composite type columns
960     </li><li>%Add full object name to the tag field.  eg. for operators we need
961           '=(integer, integer)', instead of just '='.
962     </li><li>Add pg_dumpall custom format dumps?
963     </li><li>Allow selection of individual object(s) of all types, not just
964           tables
965     </li><li>In a selective dump, allow dumping of an object and all its
966           dependencies
967     </li><li>Add options like pg_restore -l and -L to pg_dump
968     </li><li>Stop dumping CASCADE on DROP TYPE commands in clean mode
969     </li><li>Allow pg_dump --clean to drop roles that own objects or have
970           privileges
971     </li><li>Change pg_dump so that a comment on the dumped database is
972           applied to the loaded database, even if the database has a
973           different name.  This will require new backend syntax, perhaps
974           COMMENT ON CURRENT DATABASE.
975     </li><li>Remove unnecessary function pointer abstractions in pg_dump source
976           code
977     </li><li>Allow pg_dump to utilize multiple CPUs and I/O channels by dumping
978           multiple objects simultaneously
979 <p>          The difficulty with this is getting multiple dump processes to
980           produce a single dump output file.  It also would require
981           several sessions to share the same snapshot.
982           <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php</a>
983 </p>
984     </li><li>Allow pg_restore to utilize multiple CPUs and I/O channels by
985           restoring multiple objects simultaneously
986 <p>          This might require a pg_restore flag to indicate how many
987           simultaneous operations should be performed.  Only pg_dump's
988           -Fc format has the necessary dependency information.
989           <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg00963.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg00963.php</a>
990 </p>
991     </li><li>To better utilize resources, allow pg_restore to check foreign
992           keys simultaneously, where possible
993     </li><li>Allow pg_restore to create all indexes of a table
994           concurrently, via a single heap scan
995 <p>          This requires a pg_dump -Fc file because that format contains
996           the required dependency information.
997           <a href="http://archives.postgresql.org/pgsql-general/2007-05/msg01274.php">http://archives.postgresql.org/pgsql-general/2007-05/msg01274.php</a>
998 </p>
999     </li><li>Allow pg_restore to load different parts of the COPY data
1000           simultaneously
1001     </li><li>Prevent pg_dump/pg_restore from being affected by
1002           statement_timeout
1003 <p>          Using psql to restore a pg_dump dump is also affected.
1004 </p>
1005     </li><li>Remove pre-7.3 pg_dump code that assumes pg_depend does not exit
1006     </li><li>Allow pre/data/post files when schema and data are dumped
1007           separately, for performance reasons
1008 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php</a>
1009 </p>
1010   </li></ul>
1011   </li><li>ecpg
1012   <ul>
1013     <li>Docs
1014 <p>          Document differences between ecpg and the SQL standard and
1015           information about the Informix-compatibility module.
1016 </p>
1017     </li><li>Solve cardinality &gt; 1 for input descriptors / variables?
1018     </li><li>Add a semantic check level, e.g. check if a table really exists
1019     </li><li>fix handling of DB attributes that are arrays
1020     </li><li>Use backend PREPARE/EXECUTE facility for ecpg where possible
1021     </li><li>Implement SQLDA
1022     </li><li>Fix nested C comments
1023     </li><li>%sqlwarn[6] should be 'W' if the PRECISION or SCALE value specified
1024     </li><li>Make SET CONNECTION thread-aware, non-standard?
1025     </li><li>Allow multidimensional arrays
1026     </li><li>Add internationalized message strings
1027     </li><li>Implement COPY FROM STDIN
1028   </li></ul>
1029   </li><li>libpq
1030   <ul>
1031     <li>Add PQescapeIdentifierConn()
1032     </li><li>Prevent PQfnumber() from lowercasing unquoted the column name
1033 <p>          PQfnumber() should never have been doing lowercasing, but
1034           historically it has so we need a way to prevent it
1035 </p>
1036     </li><li>Allow statement results to be automatically batched to the client
1037 <p>          Currently all statement results are transferred to the libpq
1038           client before libpq makes the results available to the
1039           application.  This feature would allow the application to make
1040           use of the first result rows while the rest are transferred, or
1041           held on the server waiting for them to be requested by libpq.
1042           One complexity is that a statement like SELECT 1/col could error
1043           out mid-way through the result set.
1044 </p>
1045     </li><li>Consider disallowing multiple queries in PQexec() as an
1046           additional barrier to SQL injection attacks
1047 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg00184.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg00184.php</a>
1048 </p>
1049     </li><li>Add PQexecf() that allows complex parameter substitution
1050 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg01803.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg01803.php</a>
1051 </p>
1052     </li><li>Add SQLSTATE severity to PGconn return status
1053 <p>          <a href="http://archives.postgresql.org/pgsql-interfaces/2007-11/msg00015.php">http://archives.postgresql.org/pgsql-interfaces/2007-11/msg00015.php</a>
1054 </p>
1055   </li></ul>
1056 </li></ul>
1057 <h1><a name="section_11">Triggers</a></h1>
1058
1059 <ul>
1060   <li>Add deferred trigger queue file
1061 <p>  Right now all deferred trigger information is stored in backend
1062   memory.  This could exhaust memory for very large trigger queues.
1063   This item involves dumping large queues into files, or doing some
1064   kind of join to process all the triggers, or some bulk operation.
1065   <a href="http://archives.postgresql.org/pgsql-hackers/2008-05/msg00876.php">http://archives.postgresql.org/pgsql-hackers/2008-05/msg00876.php</a>
1066 </p>
1067   </li><li>Allow triggers to be disabled in only the current session.
1068 <p>  This is currently possible by starting a multi-statement transaction,
1069   modifying the system tables, performing the desired SQL, restoring the
1070   system tables, and committing the transaction.  ALTER TABLE ...
1071   TRIGGER requires a table lock so it is not ideal for this usage.
1072 </p>
1073   </li><li>With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY
1074 <p>  If the dump is known to be valid, allow foreign keys to be added
1075   without revalidating the data.
1076 </p>
1077   </li><li>Allow statement-level triggers to access modified rows
1078   </li><li>Support triggers on columns
1079 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2005-07/msg00107.php">http://archives.postgresql.org/pgsql-patches/2005-07/msg00107.php</a>
1080 </p>
1081   </li><li>Allow AFTER triggers on system tables
1082 <p>  System tables are modified in many places in the backend without going
1083   through the executor and therefore not causing triggers to fire. To
1084   complete this item, the functions that modify system tables will have
1085   to fire triggers.
1086 </p>
1087   </li><li>Tighten trigger permission checks
1088 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00564.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00564.php</a>
1089 </p>
1090   </li><li>Allow BEFORE INSERT triggers on views
1091 <p>  <a href="http://archives.postgresql.org/pgsql-general/2007-02/msg01466.php">http://archives.postgresql.org/pgsql-general/2007-02/msg01466.php</a>
1092 </p>
1093   </li><li>-<em>Add ability to trigger on TRUNCATE</em>
1094   </li><li>Add database and transaction-level triggers
1095 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg00451.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg00451.php</a>
1096 </p>
1097 </li></ul>
1098 <h1><a name="section_12">Indexes</a></h1>
1099
1100 <ul>
1101   <li>Add UNIQUE capability to non-btree indexes
1102   </li><li>Prevent index uniqueness checks when UPDATE does not modify the column
1103 <p>  Uniqueness (index) checks are done when updating a column even if the
1104   column is not modified by the UPDATE.
1105 </p>
1106   </li><li>Allow the creation of on-disk bitmap indexes which can be quickly
1107   combined with other bitmap indexes
1108 <p>  Such indexes could be more compact if there are only a few distinct values.
1109   Such indexes can also be compressed.  Keeping such indexes updated can be
1110   costly.
1111 </p>
1112 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2005-07/msg00512.php">http://archives.postgresql.org/pgsql-patches/2005-07/msg00512.php</a>
1113   <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg01107.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg01107.php</a>
1114   <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg00265.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg00265.php</a>
1115   <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg01214.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg01214.php</a>
1116   <a href="http://archives.postgresql.org/pgsql-patches/2007-05/msg00013.php">http://archives.postgresql.org/pgsql-patches/2007-05/msg00013.php</a>
1117   <a href="http://archives.postgresql.org/pgsql-hackers/2007-07/msg00741.php">http://archives.postgresql.org/pgsql-hackers/2007-07/msg00741.php</a>
1118 </p>
1119   </li><li>Allow accurate statistics to be collected on indexes with more than
1120   one column or expression indexes, perhaps using per-index statistics
1121 <p>  <a href="http://archives.postgresql.org/pgsql-performance/2006-10/msg00222.php">http://archives.postgresql.org/pgsql-performance/2006-10/msg00222.php</a>
1122   <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg01131.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg01131.php</a>
1123 </p>
1124   </li><li>Consider increasing the default and maximum number of statistics targets,
1125   and reduce statistics target overhead
1126 <p>  Also consider having a larger statistics target for indexed columns
1127   and expression indexes.
1128   <a href="http://archives.postgresql.org/pgsql-general/2007-05/msg01228.php">http://archives.postgresql.org/pgsql-general/2007-05/msg01228.php</a>
1129   <a href="http://archives.postgresql.org/pgsql-general/2007-06/msg00542.php">http://archives.postgresql.org/pgsql-general/2007-06/msg00542.php</a>
1130   <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg01066.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg01066.php</a>
1131   <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg00188.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg00188.php</a>
1132 </p>
1133   </li><li>Consider smaller indexes that record a range of values per heap page,
1134   rather than having one index entry for every heap row
1135 <p>  This is useful if the heap is clustered by the indexed values.
1136   <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00341.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00341.php</a>
1137   <a href="http://archives.postgresql.org/pgsql-hackers/2007-02/msg01264.php">http://archives.postgresql.org/pgsql-hackers/2007-02/msg01264.php</a>
1138   <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg00465.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg00465.php</a>
1139   <a href="http://archives.postgresql.org/pgsql-patches/2007-03/msg00163.php">http://archives.postgresql.org/pgsql-patches/2007-03/msg00163.php</a>
1140   <a href="http://archives.postgresql.org/pgsql-hackers/2007-08/msg00014.php">http://archives.postgresql.org/pgsql-hackers/2007-08/msg00014.php</a>
1141   <a href="http://archives.postgresql.org/pgsql-hackers/2007-08/msg00487.php">http://archives.postgresql.org/pgsql-hackers/2007-08/msg00487.php</a>
1142   <a href="http://archives.postgresql.org/pgsql-hackers/2008-04/msg01589.php">http://archives.postgresql.org/pgsql-hackers/2008-04/msg01589.php</a>
1143 </p>
1144   </li><li>Add REINDEX CONCURRENTLY, like CREATE INDEX CONCURRENTLY
1145 <p>  This is difficult because you must upgrade to an exclusive table lock
1146   to replace the existing index file.  CREATE INDEX CONCURRENTLY does not
1147   have this complication.  This would allow index compaction without
1148   downtime.
1149   <a href="http://archives.postgresql.org/pgsql-performance/2007-08/msg00289.php">http://archives.postgresql.org/pgsql-performance/2007-08/msg00289.php</a>
1150 </p>
1151   </li><li>Allow multiple indexes to be created concurrently, ideally via a
1152   single heap scan, and have pg_restore use it
1153   </li><li>Consider sorting entries before inserting into btree index
1154 <p>  <a href="http://archives.postgresql.org/pgsql-general/2008-01/msg01010.php">http://archives.postgresql.org/pgsql-general/2008-01/msg01010.php</a>
1155 </p>
1156   </li><li>Allow index scans to return matching index keys, not just the matching
1157   heap locations
1158 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-04/msg01657.php">http://archives.postgresql.org/pgsql-hackers/2008-04/msg01657.php</a>
1159 </p>
1160   </li><li>Inheritance
1161   <ul>
1162     <li>Allow inherited tables to inherit indexes, UNIQUE constraints,
1163           and primary/foreign keys
1164     </li><li>Honor UNIQUE INDEX on base column in INSERTs/UPDATEs
1165           on inherited table, e.g.  INSERT INTO inherit_table
1166           (unique_index_col) VALUES (dup) should fail
1167 <p>          The main difficulty with this item is the problem of
1168           creating an index that can span multiple tables.
1169 </p>
1170     </li><li>Allow SELECT ... FOR UPDATE on inherited tables
1171     </li><li>Require all CHECK constraints to be inherited
1172 <p>          <a href="http://archives.postgresql.org/pgsql-bugs/2007-04/msg00026.php">http://archives.postgresql.org/pgsql-bugs/2007-04/msg00026.php</a>
1173 </p>
1174     </li><li>Add checks to prevent a CREATE RULE views on inherited tables
1175 <p>          <a href="http://archives.postgresql.org/pgsql-general/2008-02/msg01420.php">http://archives.postgresql.org/pgsql-general/2008-02/msg01420.php</a>
1176           <a href="http://archives.postgresql.org/pgsql-general/2008-03/msg00077.php">http://archives.postgresql.org/pgsql-general/2008-03/msg00077.php</a>
1177 </p>
1178   </li></ul>
1179   </li><li>GIST
1180   <ul>
1181     <li>Add more GIST index support for geometric data types
1182     </li><li>Allow GIST indexes to create certain complex index types, like
1183           digital trees (see Aoki)
1184   </li></ul>
1185   </li><li>Hash
1186 </li></ul>
1187 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-09/msg00051.php">http://archives.postgresql.org/pgsql-hackers/2007-09/msg00051.php</a>
1188 </p>
1189 <ul>
1190   <li>Pack hash index buckets onto disk pages more efficiently
1191 <p>          Currently only one hash bucket can be stored on a page. Ideally
1192           several hash buckets could be stored on a single page and greater
1193           granularity used for the hash algorithm.
1194 </p>
1195 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2004-06/msg00168.php">http://archives.postgresql.org/pgsql-hackers/2004-06/msg00168.php</a>
1196 </p>
1197   </li><li>Consider sorting hash buckets so entries can be found using a
1198           binary search, rather than a linear scan
1199   </li><li>In hash indexes, consider storing the hash value with or instead
1200           of the key itself
1201   </li><li>Add WAL logging for crash recovery
1202   </li><li>Allow multi-column hash indexes
1203   </li><li>-<em>During index creation, pre-sort the tuples to improve build speed</em>
1204 </li></ul>
1205 <h1><a name="section_13">Fsync</a></h1>
1206
1207 <ul>
1208   <li>Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
1209 <p>  Ideally this requires a separate test program that can be run
1210   at initdb time or optionally later.  Consider O_SYNC when
1211   O_DIRECT exists.
1212 </p>
1213   </li><li>Add program to test if fsync has a delay compared to non-fsync
1214   </li><li>Consider sorting writes during checkpoint
1215 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-06/msg00541.php">http://archives.postgresql.org/pgsql-hackers/2007-06/msg00541.php</a>
1216 </p>
1217 </li></ul>
1218 <h1><a name="section_14">Cache Usage</a></h1>
1219
1220 <ul>
1221   <li>Speed up COUNT(*)
1222 <p>  We could use a fixed row count and a +/- count to follow MVCC
1223   visibility rules, or a single cached value could be used and
1224   invalidated if anyone modifies the table.  Another idea is to
1225   get a count directly from a unique index, but for this to be
1226   faster than a sequential scan it must avoid access to the heap
1227   to obtain tuple visibility information.
1228 </p>
1229   </li><li>Provide a way to calculate an "estimated COUNT(*)"
1230 <p>  Perhaps by using the optimizer's cardinality estimates or random
1231   sampling.
1232 </p>
1233 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2005-11/msg00943.php">http://archives.postgresql.org/pgsql-hackers/2005-11/msg00943.php</a>
1234 </p>
1235   </li><li>Allow data to be pulled directly from indexes
1236 <p>  Currently indexes do not have enough tuple visibility information
1237   to allow data to be pulled from the index without also accessing
1238   the heap.  One way to allow this is to set a bit on index tuples
1239   to indicate if a tuple is currently visible to all transactions
1240   when the first valid heap lookup happens.  This bit would have to
1241   be cleared when a heap tuple is expired.
1242 </p>
1243 <p>  Another idea is to maintain a bitmap of heap pages where all rows
1244   are visible to all backends, and allow index lookups to reference
1245   that bitmap to avoid heap lookups, perhaps the same bitmap we might
1246   add someday to determine which heap pages need vacuuming.  Frequently
1247   accessed bitmaps would have to be stored in shared memory.  One 8k
1248   page of bitmaps could track 512MB of heap pages.
1249 </p>
1250 <p>  A third idea would be for a heap scan to check if all rows are visible
1251   and if so set a per-table flag which can be checked by index scans. 
1252   Any change to the table would have to clear the flag.  To detect
1253   changes during the heap scan a counter could be set at the start and
1254   checked at the end --- if it is the same, the table has not been
1255   modified --- any table change would increment the counter.
1256 </p>
1257 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2007-10/msg00166.php">http://archives.postgresql.org/pgsql-patches/2007-10/msg00166.php</a>
1258   <a href="http://archives.postgresql.org/pgsql-patches/2008-01/msg00049.php">http://archives.postgresql.org/pgsql-patches/2008-01/msg00049.php</a>
1259 </p>
1260   </li><li>Consider automatic caching of statements at various levels:
1261   <ul>
1262     <li>Parsed query tree
1263     </li><li>Query execute plan
1264     </li><li>Query results
1265         <a href="http://archives.postgresql.org/pgsql-hackers/2008-04/msg00823.php">http://archives.postgresql.org/pgsql-hackers/2008-04/msg00823.php</a>
1266   </li></ul>
1267   </li><li>Consider increasing internal areas when shared buffers is increased
1268 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2005-10/msg01419.php">http://archives.postgresql.org/pgsql-hackers/2005-10/msg01419.php</a>
1269 </p>
1270   </li><li>Consider decreasing the amount of memory used by PrivateRefCount
1271 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-11/msg00797.php">http://archives.postgresql.org/pgsql-hackers/2006-11/msg00797.php</a>
1272   <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg00752.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg00752.php</a>
1273 </p>
1274   </li><li>Consider allowing higher priority queries to have referenced buffer
1275   cache pages stay in memory longer
1276 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-11/msg00562.php">http://archives.postgresql.org/pgsql-hackers/2007-11/msg00562.php</a>
1277 </p>
1278 </li></ul>
1279 <h1><a name="section_15">Vacuum</a></h1>
1280
1281 <ul>
1282   <li>Improve speed with indexes
1283 <p>  For large table adjustments during VACUUM FULL, it is faster to cluster
1284   or reindex rather than update the index.  Also, index updates can bloat
1285   the index.
1286 </p>
1287 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg00024.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg00024.php</a>
1288   <a href="http://archives.postgresql.org/pgsql-performance/2007-05/msg00296.php">http://archives.postgresql.org/pgsql-performance/2007-05/msg00296.php</a>
1289   <a href="http://archives.postgresql.org/pgsql-hackers/2007-08/msg00307.php">http://archives.postgresql.org/pgsql-hackers/2007-08/msg00307.php</a>
1290 </p>
1291   </li><li>Auto-fill the free space map by scanning the buffer cache or by
1292   checking pages written by the background writer
1293 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-02/msg01125.php">http://archives.postgresql.org/pgsql-hackers/2006-02/msg01125.php</a>
1294   <a href="http://archives.postgresql.org/pgsql-hackers/2006-03/msg00011.php">http://archives.postgresql.org/pgsql-hackers/2006-03/msg00011.php</a>
1295 </p>
1296   </li><li>Create a bitmap of pages that need vacuuming
1297 <p>  Instead of sequentially scanning the entire table, have the background
1298   writer or some other process record pages that have expired rows, then
1299   VACUUM can look at just those pages rather than the entire table.  In
1300   the event of a system crash, the bitmap would probably be invalidated.
1301   One complexity is that index entries still have to be vacuumed, and
1302   doing this without an index scan (by using the heap values to find the
1303   index entry) might be slow and unreliable, especially for user-defined
1304   index functions.
1305 </p>
1306 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg01188.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg01188.php</a>
1307   <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg00121.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg00121.php</a>
1308   <a href="http://archives.postgresql.org/pgsql-patches/2007-03/msg00508.php">http://archives.postgresql.org/pgsql-patches/2007-03/msg00508.php</a>
1309   <a href="http://archives.postgresql.org/pgsql-patches/2007-04/msg00347.php">http://archives.postgresql.org/pgsql-patches/2007-04/msg00347.php</a>
1310   <a href="http://archives.postgresql.org/pgsql-hackers/2007-11/msg00156.php">http://archives.postgresql.org/pgsql-hackers/2007-11/msg00156.php</a>
1311   <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg00546.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg00546.php</a>
1312   <a href="http://archives.postgresql.org/pgsql-hackers/2008-04/msg00416.php">http://archives.postgresql.org/pgsql-hackers/2008-04/msg00416.php</a>
1313 </p>
1314   </li><li>Allow FSM to return free space toward the beginning of the heap file,
1315   in hopes that empty pages at the end can be truncated by VACUUM
1316   </li><li>Allow FSM page return free space based on table clustering, to assist
1317   in maintaining clustering?
1318   </li><li>-<em>Improve dead row detection during multi-statement transactions usage</em>
1319 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2007-03/msg00358.php">http://archives.postgresql.org/pgsql-patches/2007-03/msg00358.php</a>
1320 </p>
1321   </li><li>Consider a more compact data representation for dead tuples
1322 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2007-05/msg00143.php">http://archives.postgresql.org/pgsql-patches/2007-05/msg00143.php</a>
1323 </p>
1324   </li><li>Auto-vacuum
1325   <ul>
1326     <li>%Issue log message to suggest VACUUM FULL if a table is nearly
1327           empty?
1328     </li><li>Improve control of auto-vacuum
1329 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00876.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00876.php</a>
1330 </p>
1331     </li><li>Prevent long-lived temporary tables from causing frozen-xid
1332           advancement starvation
1333 <p>          The problem is that autovacuum cannot vacuum them to set frozen xids;
1334           only the session that created them can do that.
1335           <a href="http://archives.postgresql.org/pgsql-general/2007-06/msg01645.php">http://archives.postgresql.org/pgsql-general/2007-06/msg01645.php</a>
1336 </p>
1337     </li><li>Store per-table autovacuum settings in pg_class.reloptions.
1338 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-02/msg01440.php">http://archives.postgresql.org/pgsql-hackers/2007-02/msg01440.php</a>
1339           <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00724.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00724.php</a>
1340 </p>
1341     </li><li>Prevent autovacuum from running if an old transaction is still
1342           running from the last vacuum
1343 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-11/msg00899.php">http://archives.postgresql.org/pgsql-hackers/2007-11/msg00899.php</a>
1344 </p>
1345   </li></ul>
1346 </li></ul>
1347 <h1><a name="section_16">Locking</a></h1>
1348
1349 <ul>
1350   <li>Fix priority ordering of read and write light-weight locks (Neil)
1351 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2004-11/msg00893.php">http://archives.postgresql.org/pgsql-hackers/2004-11/msg00893.php</a>
1352   <a href="http://archives.postgresql.org/pgsql-hackers/2004-11/msg00905.php">http://archives.postgresql.org/pgsql-hackers/2004-11/msg00905.php</a>
1353 </p>
1354   </li><li>Fix problem when multiple subtransactions of the same outer transaction
1355   hold different types of locks, and one subtransaction aborts
1356 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-11/msg01011.php">http://archives.postgresql.org/pgsql-hackers/2006-11/msg01011.php</a>
1357   <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00001.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00001.php</a>
1358   <a href="http://archives.postgresql.org/pgsql-hackers/2007-02/msg00435.php">http://archives.postgresql.org/pgsql-hackers/2007-02/msg00435.php</a>
1359   <a href="http://archives.postgresql.org/pgsql-hackers/2007-05/msg00773.php">http://archives.postgresql.org/pgsql-hackers/2007-05/msg00773.php</a>
1360 </p>
1361   </li><li>Allow UPDATEs on only non-referential integrity columns not to conflict
1362   with referential integrity locks
1363 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-02/msg00073.php">http://archives.postgresql.org/pgsql-hackers/2007-02/msg00073.php</a>
1364 </p>
1365   </li><li>Add idle_in_transaction_timeout GUC so locks are not held for long
1366   periods of time
1367   </li><li>Improve deadlock detection when a page cleaning lock conflicts
1368   with a shared buffer that is pinned
1369 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2008-01/msg00138.php">http://archives.postgresql.org/pgsql-bugs/2008-01/msg00138.php</a>
1370   <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php</a>
1371   <a href="http://archives.postgresql.org/pgsql-committers/2008-01/msg00365.php">http://archives.postgresql.org/pgsql-committers/2008-01/msg00365.php</a>
1372 </p>
1373   </li><li>Detect deadlocks involving LockBufferForCleanup()
1374 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php</a>
1375 </p>
1376 </li></ul>
1377 <h1><a name="section_17">Startup Time Improvements</a></h1>
1378
1379 <ul>
1380   <li>Experiment with multi-threaded backend for backend creation
1381 <p>  This would prevent the overhead associated with process creation. Most
1382   operating systems have trivial process creation time compared to
1383   database startup overhead, but a few operating systems (Win32,
1384   Solaris) might benefit from threading.  Also explore the idea of
1385   a single session using multiple threads to execute a statement faster.
1386 </p>
1387 </li></ul>
1388 <h1><a name="section_18">Write-Ahead Log</a></h1>
1389
1390 <ul>
1391   <li>Eliminate need to write full pages to WAL before page modification
1392 <p>  Currently, to protect against partial disk page writes, we write
1393   full page images to WAL before they are modified so we can correct any
1394   partial page writes during recovery.  These pages can also be
1395   eliminated from point-in-time archive files.
1396   <a href="http://archives.postgresql.org/pgsql-hackers/2002-06/msg00655.php">http://archives.postgresql.org/pgsql-hackers/2002-06/msg00655.php</a>
1397 </p>
1398   <ul>
1399     <li>When off, write CRC to WAL and check file system blocks
1400            on recovery
1401 <p>           If CRC check fails during recovery, remember the page in case
1402            a later CRC for that page properly matches.
1403 </p>
1404     </li><li>Write full pages during file system write and not when
1405            the page is modified in the buffer cache
1406 <p>           This allows most full page writes to happen in the background
1407            writer.  It might cause problems for applying WAL on recovery
1408            into a partially-written page, but later the full page will be
1409            replaced from WAL.
1410 </p>
1411   </li></ul>
1412   </li><li>Allow WAL traffic to be streamed to another server for stand-by
1413   replication
1414   </li><li>Reduce WAL traffic so only modified values are written rather than
1415   entire rows
1416 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg01589.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg01589.php</a>
1417 </p>
1418   </li><li>Allow WAL information to recover corrupted pg_controldata
1419 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2006-06/msg00025.php">http://archives.postgresql.org/pgsql-patches/2006-06/msg00025.php</a>
1420 </p>
1421   </li><li>Find a way to reduce rotational delay when repeatedly writing
1422   last WAL page
1423 <p>  Currently fsync of WAL requires the disk platter to perform a full
1424   rotation to fsync again. One idea is to write the WAL to different
1425   offsets that might reduce the rotational delay.
1426   <a href="http://archives.postgresql.org/pgsql-hackers/2002-11/msg00483.php">http://archives.postgresql.org/pgsql-hackers/2002-11/msg00483.php</a>
1427 </p>
1428   </li><li>Allow WAL logging to be turned off for a table, but the table
1429   might be dropped or truncated during crash recovery
1430 <p>  Allow tables to bypass WAL writes and just fsync() dirty pages on
1431   commit.  This should be implemented using ALTER TABLE, e.g. ALTER
1432   TABLE PERSISTENCE [ DROP | TRUNCATE | DEFAULT ].  Tables using
1433   non-default logging should not use referential integrity with
1434   default-logging tables.  A table without dirty buffers during a
1435   crash could perhaps avoid the drop/truncate.
1436   <a href="http://archives.postgresql.org/pgsql-hackers/2005-12/msg01016.php">http://archives.postgresql.org/pgsql-hackers/2005-12/msg01016.php</a>
1437 </p>
1438   </li><li>Allow WAL logging to be turned off for a table, but the table would
1439   avoid being truncated/dropped
1440 <p>  To do this, only a single writer can modify the table, and writes
1441   must happen only on new pages so the new pages can be removed during
1442   crash recovery.  Readers can continue accessing the table.  Such
1443   tables probably cannot have indexes.  One complexity is the handling
1444   of indexes on TOAST tables.
1445   <a href="http://archives.postgresql.org/pgsql-hackers/2005-12/msg01016.php">http://archives.postgresql.org/pgsql-hackers/2005-12/msg01016.php</a>
1446 </p>
1447   </li><li>Speed WAL recovery by allowing more than one page to be prefetched
1448 <p>  This should be done utilizing the same infrastructure used for
1449   prefetching in general to avoid introducing complex error-prone code
1450   in WAL replay.
1451   <a href="http://archives.postgresql.org/pgsql-general/2007-12/msg00683.php">http://archives.postgresql.org/pgsql-general/2007-12/msg00683.php</a>
1452   <a href="http://archives.postgresql.org/pgsql-hackers/2007-12/msg00497.php">http://archives.postgresql.org/pgsql-hackers/2007-12/msg00497.php</a>
1453   <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg01279.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg01279.php</a>
1454 </p>
1455   </li><li>Improve WAL concurrency by increasing lock granularity
1456 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg00556.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg00556.php</a>
1457 </p>
1458   </li><li>Be more aggressive about creating WAL files
1459 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-10/msg01325.php">http://archives.postgresql.org/pgsql-hackers/2007-10/msg01325.php</a>
1460   <a href="http://archives.postgresql.org/pgsql-hackers/2004-07/msg01075.php">http://archives.postgresql.org/pgsql-hackers/2004-07/msg01075.php</a>
1461   <a href="http://archives.postgresql.org/pgsql-hackers/2005-04/msg00556.php">http://archives.postgresql.org/pgsql-hackers/2005-04/msg00556.php</a>
1462 </p>
1463   </li><li>Have resource managers report the duration of their status changes
1464 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-10/msg01468.php">http://archives.postgresql.org/pgsql-hackers/2007-10/msg01468.php</a>
1465 </p>
1466   </li><li>Move pgfoundry's xlogdump to /contrib and have it rely more closely
1467   on the WAL backend code
1468 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-11/msg00035.php">http://archives.postgresql.org/pgsql-hackers/2007-11/msg00035.php</a>
1469 </p>
1470 </li></ul>
1471 <h1><a name="section_19">Optimizer / Executor</a></h1>
1472
1473 <ul>
1474   <li>Improve selectivity functions for geometric operators
1475   </li><li>Precompile SQL functions to avoid overhead
1476   </li><li>Create utility to compute accurate random_page_cost value
1477   </li><li>Improve ability to display optimizer analysis using OPTIMIZER_DEBUG
1478   </li><li>Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and
1479   actual row counts differ by a specified percentage
1480   </li><li>Improve how ANALYZE computes in-doubt tuples
1481 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-11/msg00771.php">http://archives.postgresql.org/pgsql-hackers/2007-11/msg00771.php</a>
1482 </p>
1483   </li><li>Consider using hash buckets to do DISTINCT, rather than sorting
1484 <p>  This would be beneficial when there are few distinct values.  This is
1485   already used by GROUP BY.
1486 </p>
1487   </li><li>Log statements where the optimizer row estimates were dramatically
1488   different from the number of rows actually found?
1489   </li><li>Consider compressed annealing to search for query plans
1490 <p>  This might replace GEQO, <a href="http://sixdemonbag.org/Djinni">http://sixdemonbag.org/Djinni</a>.
1491 </p>
1492   </li><li>Improve merge join performance by allowing mark/restore of
1493   tuple sources
1494 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg00096.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg00096.php</a>
1495 </p>
1496   </li><li>Consider using a hash for joining to a large IN (VALUES ...) list
1497 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-05/msg00450.php">http://archives.postgresql.org/pgsql-hackers/2007-05/msg00450.php</a>
1498 </p>
1499 </li></ul>
1500 <h1><a name="section_20">Background Writer</a></h1>
1501
1502 <ul>
1503   <li>Consider having the background writer update the transaction status
1504   hint bits before writing out the page
1505 <p>  Implementing this requires the background writer to have access to system
1506   catalogs and the transaction status log.
1507 </p>
1508   </li><li>Consider adding buffers the background writer finds reusable to the
1509   free list 
1510 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php">http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php</a>
1511 </p>
1512   </li><li>Automatically tune bgwriter_delay based on activity rather then using a
1513   fixed interval
1514 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php">http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php</a>
1515 </p>
1516   </li><li>Consider wither increasing BM_MAX_USAGE_COUNT improves performance
1517 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-06/msg01007.php">http://archives.postgresql.org/pgsql-hackers/2007-06/msg01007.php</a>
1518 </p>
1519   </li><li>Test to see if calling PreallocXlogFiles() from the background writer
1520   will help with WAL segment creation latency
1521 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2007-06/msg00340.php">http://archives.postgresql.org/pgsql-patches/2007-06/msg00340.php</a>
1522 </p>
1523 </li></ul>
1524 <h1><a name="section_21">Miscellaneous Performance</a></h1>
1525
1526 <ul>
1527   <li>Do async I/O for faster random read-ahead of data
1528 <p>  Async I/O allows multiple I/O requests to be sent to the disk with
1529   results coming back asynchronously.
1530 </p>
1531 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-10/msg00820.php">http://archives.postgresql.org/pgsql-hackers/2006-10/msg00820.php</a>
1532   <a href="http://archives.postgresql.org/pgsql-performance/2007-09/msg00255.php">http://archives.postgresql.org/pgsql-performance/2007-09/msg00255.php</a>
1533   <a href="http://archives.postgresql.org/pgsql-hackers/2007-12/msg00027.php">http://archives.postgresql.org/pgsql-hackers/2007-12/msg00027.php</a>
1534   <a href="http://archives.postgresql.org/pgsql-patches/2008-01/msg00170.php">http://archives.postgresql.org/pgsql-patches/2008-01/msg00170.php</a>
1535 </p>
1536   </li><li>Use mmap() rather than SYSV shared memory or to write WAL files?
1537 <p>  This would remove the requirement for SYSV SHM but would introduce
1538   portability issues. Anonymous mmap (or mmap to /dev/zero) is required
1539   to prevent I/O overhead.
1540 </p>
1541   </li><li>Consider mmap()'ing files into a backend?
1542 <p>  Doing I/O to large tables would consume a lot of address space or
1543   require frequent mapping/unmapping.  Extending the file also causes
1544   mapping problems that might require mapping only individual pages,
1545   leading to thousands of mappings.  Another problem is that there is no
1546   way to <u>prevent</u> I/O to disk from the dirty shared buffers so changes
1547   could hit disk before WAL is written.
1548 </p>
1549   </li><li>Add a script to ask system configuration questions and tune postgresql.conf
1550   </li><li>Consider ways of storing rows more compactly on disk
1551   <ul>
1552     <li>Reduce the row header size?
1553     </li><li>Consider reducing on-disk varlena length from four bytes to
1554           two because a heap row cannot be more than 64k in length
1555   </li></ul>
1556   </li><li>Consider increasing NUM_CLOG_BUFFERS
1557 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-08/msg00030.php">http://archives.postgresql.org/pgsql-hackers/2007-08/msg00030.php</a>
1558   <a href="http://archives.postgresql.org/pgsql-performance/2007-08/msg00024.php">http://archives.postgresql.org/pgsql-performance/2007-08/msg00024.php</a>
1559 </p>
1560   </li><li>Consider transaction start/end performance improvements
1561 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-07/msg00948.php">http://archives.postgresql.org/pgsql-hackers/2007-07/msg00948.php</a>
1562   <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php</a>
1563 </p>
1564   </li><li>Allow user configuration of TOAST thresholds
1565 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-02/msg00213.php">http://archives.postgresql.org/pgsql-hackers/2007-02/msg00213.php</a>
1566   <a href="http://archives.postgresql.org/pgsql-hackers/2007-08/msg00082.php">http://archives.postgresql.org/pgsql-hackers/2007-08/msg00082.php</a>
1567 </p>
1568   </li><li>Allow configuration of backend priorities via the operating system
1569 <p>  Though backend priorities make priority inversion during lock
1570   waits possible, research shows that this is not a huge problem.
1571 </p>
1572 <p>  <a href="http://archives.postgresql.org/pgsql-general/2007-02/msg00493.php">http://archives.postgresql.org/pgsql-general/2007-02/msg00493.php</a>
1573 </p>
1574   </li><li>Experiment with multi-threaded backend better I/O utilization
1575 <p>  This would allow a single query to make use of multiple I/O channels
1576   simultaneously.  One idea is to create a background reader that can
1577   pre-fetch sequential and index scan pages needed by other backends.
1578   This could be expanded to allow concurrent reads from multiple devices
1579   in a partitioned table.
1580 </p>
1581   </li><li>Experiment with multi-threaded backend better CPU utilization
1582 <p>  This would allow several CPUs to be used for a single query, such as
1583   for sorting or query execution.
1584 </p>
1585   </li><li>Consider increasing the minimum allowed number of shared buffers
1586 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2008-02/msg00157.php">http://archives.postgresql.org/pgsql-bugs/2008-02/msg00157.php</a>
1587 </p>
1588   </li><li>Expire published xmin for read-only and idle transactions
1589 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-09/msg00343.php">http://archives.postgresql.org/pgsql-hackers/2007-09/msg00343.php</a>
1590 </p>
1591   </li><li>Consider if CommandCounterIncrement() can avoid its
1592   AcceptInvalidationMessages() call
1593 <p>  <a href="http://archives.postgresql.org/pgsql-committers/2007-11/msg00585.php">http://archives.postgresql.org/pgsql-committers/2007-11/msg00585.php</a>
1594 </p>
1595   </li><li>Improve performance of shared invalidation queue for multiple CPUs
1596 <p>  <a href="http://archives.postgresql.org/pgsql-performance/2008-01/msg00023.php">http://archives.postgresql.org/pgsql-performance/2008-01/msg00023.php</a>
1597 </p>
1598   </li><li>Consider Cartesian joins when both relations are needed to form an
1599   indexscan qualification for a third relation
1600 <p>  <a href="http://archives.postgresql.org/pgsql-performance/2007-12/msg00090.php">http://archives.postgresql.org/pgsql-performance/2007-12/msg00090.php</a>
1601 </p>
1602   </li><li>Consider not storing a NULL bitmap on disk if all the NULLs are
1603   trailing
1604 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-12/msg00624.php">http://archives.postgresql.org/pgsql-hackers/2007-12/msg00624.php</a>
1605   <a href="http://archives.postgresql.org/pgsql-patches/2007-12/msg00109.php">http://archives.postgresql.org/pgsql-patches/2007-12/msg00109.php</a>
1606 </p>
1607   </li><li>Sort large UPDATE/DELETEs so it is done in heap order
1608 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg01119.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg01119.php</a>
1609 </p>
1610   </li><li>-<em>Avoid tuple some tuple copying in sort routines</em>
1611   </li><li>SMP scalability improvements
1612 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-07/msg00439.php">http://archives.postgresql.org/pgsql-hackers/2007-07/msg00439.php</a>
1613   <a href="http://archives.postgresql.org/pgsql-hackers/2007-09/msg00206.php">http://archives.postgresql.org/pgsql-hackers/2007-09/msg00206.php</a>
1614   <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php</a>
1615 </p>
1616   </li><li>Research reducing deTOASTing in more places
1617 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-09/msg00895.php">http://archives.postgresql.org/pgsql-hackers/2007-09/msg00895.php</a>
1618 </p>
1619   </li><li>Consider being smarter about memory and external files used during
1620   sorts
1621 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-11/msg01101.php">http://archives.postgresql.org/pgsql-hackers/2007-11/msg01101.php</a>
1622   <a href="http://archives.postgresql.org/pgsql-hackers/2007-12/msg00045.php">http://archives.postgresql.org/pgsql-hackers/2007-12/msg00045.php</a>
1623 </p>
1624   </li><li>Allow one transaction to see tuples using the snapshot of another
1625   transaction
1626 <p>  This would assist multiple backends in working together.
1627   <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00400.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00400.php</a>
1628 </p>
1629 </li></ul>
1630 <h1><a name="section_22">Source Code</a></h1>
1631
1632 <ul>
1633   <li>Add use of 'const' for variables in source tree
1634   </li><li>Move some things from contrib into main tree
1635   </li><li>%Remove warnings created by -Wcast-align
1636   </li><li>Move platform-specific ps status display info from ps_status.c to ports
1637   </li><li>Add optional CRC checksum to heap and index pages
1638   </li><li>Improve documentation to build only interfaces (Marc)
1639   </li><li>Remove or relicense modules that are not under the BSD license, if possible
1640   </li><li>Acquire lock on a relation before building a relcache entry for it
1641   </li><li>Allow cross-compiling by generating the zic database on the target system
1642   </li><li>Improve NLS maintenance of libpgport messages linked onto applications
1643   </li><li>Clean up casting in contrib/isn
1644 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-11/msg00245.php">http://archives.postgresql.org/pgsql-hackers/2006-11/msg00245.php</a>
1645 </p>
1646   </li><li>Improve the /contrib installation experience
1647 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-04/msg00132.php">http://archives.postgresql.org/pgsql-hackers/2008-04/msg00132.php</a>
1648 </p>
1649   </li><li>Use UTF8 encoding for NLS messages so all server encodings can
1650   read them properly
1651   </li><li>Update Bonjour to work with newer cross-platform SDK
1652 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-09/msg02238.php">http://archives.postgresql.org/pgsql-hackers/2006-09/msg02238.php</a>
1653   <a href="http://archives.postgresql.org/pgsql-patches/2006-10/msg00048.php">http://archives.postgresql.org/pgsql-patches/2006-10/msg00048.php</a>
1654 </p>
1655   </li><li>Consider detoasting keys before sorting
1656   </li><li>Consider GnuTLS if OpenSSL license becomes a problem
1657 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2006-05/msg00040.php">http://archives.postgresql.org/pgsql-patches/2006-05/msg00040.php</a>
1658   <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg01213.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg01213.php</a>
1659 </p>
1660   </li><li>Consider changing documentation format from SGML to XML
1661 <p>  <a href="http://archives.postgresql.org/pgsql-docs/2006-12/msg00152.php">http://archives.postgresql.org/pgsql-docs/2006-12/msg00152.php</a>
1662 </p>
1663   </li><li>Consider making NAMEDATALEN more configurable in future releases
1664   </li><li>Update our code to handle 64-bit timezone files to match the zic
1665   source code, which now uses them
1666   </li><li>Have configure choose integer datetimes by default
1667 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2007-05/msg00046.php">http://archives.postgresql.org/pgsql-patches/2007-05/msg00046.php</a>
1668 </p>
1669   </li><li>Support scoped IPv6 addresses
1670 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2007-05/msg00111.php">http://archives.postgresql.org/pgsql-bugs/2007-05/msg00111.php</a>
1671 </p>
1672   </li><li>Consider allowing 64-bit integers and floats to be passed by value on
1673   64-bit platforms
1674 <p>  Also change 32-bit floats (float4) to be passed by value at the same
1675   time.
1676 </p>
1677   </li><li>Research use of signals and sleep wake ups
1678 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-07/msg00003.php">http://archives.postgresql.org/pgsql-hackers/2007-07/msg00003.php</a>
1679 </p>
1680   </li><li>Add automated check for invalid C++ source code constructs
1681 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2007-07/msg00056.php">http://archives.postgresql.org/pgsql-patches/2007-07/msg00056.php</a>
1682 </p>
1683   </li><li>Consider simplifying how memory context resets handle child contexts
1684 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2007-08/msg00067.php">http://archives.postgresql.org/pgsql-patches/2007-08/msg00067.php</a>
1685 </p>
1686   </li><li>Remove use of MAKE_PTR and MAKE_OFFSET macros
1687 <p>  <a href="http://archives.postgresql.org/pgsql-general/2007-08/msg01510.php">http://archives.postgresql.org/pgsql-general/2007-08/msg01510.php</a>
1688 </p>
1689   </li><li>Convert single quotes to apostrophes in the PDF documentation
1690 <p>  <a href="http://archives.postgresql.org/pgsql-docs/2007-12/msg00059.php">http://archives.postgresql.org/pgsql-docs/2007-12/msg00059.php</a>
1691 </p>
1692   </li><li>Create three versions of libpgport to simplify client code
1693 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-10/msg00154.php">http://archives.postgresql.org/pgsql-hackers/2007-10/msg00154.php</a>
1694 </p>
1695   </li><li>Remove old-style routines for manipulating tuples
1696 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-10/msg00851.php">http://archives.postgresql.org/pgsql-hackers/2007-10/msg00851.php</a>
1697 </p>
1698   </li><li>Improve detection of shared memory segments being used by others
1699   by checking the SysV shared memory field 'nattch'
1700 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00656.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00656.php</a>
1701   <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00673.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00673.php</a>
1702 </p>
1703   </li><li>Implement the non-threaded Avahi service discovery protocol
1704 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg00939.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg00939.php</a>
1705   <a href="http://archives.postgresql.org/pgsql-patches/2008-02/msg00097.php">http://archives.postgresql.org/pgsql-patches/2008-02/msg00097.php</a>
1706   <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg01211.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg01211.php</a>
1707   <a href="http://archives.postgresql.org/pgsql-patches/2008-04/msg00001.php">http://archives.postgresql.org/pgsql-patches/2008-04/msg00001.php</a>
1708 </p>
1709   </li><li>Win32
1710   <ul>
1711     <li>Remove configure.in check for link failure when cause is found
1712     </li><li>Remove readdir() errno patch when runtime/mingwex/dirent.c rev
1713           1.4 is released
1714     </li><li>-<em>Remove psql newline patch when we find out why mingw outputs an</em>
1715           extra newline
1716     </li><li>Allow psql to use readline once non-US code pages work with
1717           backslashes
1718     </li><li>Fix problem with shared memory on the Win32 Terminal Server
1719     </li><li>Diagnose problem where shared memory can sometimes not be
1720           attached by postmaster children
1721 <p>          <a href="http://archives.postgresql.org/pgsql-general/2007-08/msg01377.php">http://archives.postgresql.org/pgsql-general/2007-08/msg01377.php</a>
1722 </p>
1723     </li><li>Improve signal handling
1724 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2005-06/msg00027.php">http://archives.postgresql.org/pgsql-patches/2005-06/msg00027.php</a>
1725 </p>
1726     </li><li>Convert MSVC build system to remove most batch files
1727 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-08/msg00961.php">http://archives.postgresql.org/pgsql-hackers/2007-08/msg00961.php</a>
1728 </p>
1729     </li><li>Prevent SSL from sending network packets to avoid interference
1730           with Win32 signal emulation
1731 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-12/msg00455.php">http://archives.postgresql.org/pgsql-hackers/2007-12/msg00455.php</a>
1732 </p>
1733     </li><li>Support pgxs when using MSVC
1734     </li><li>Fix MSVC NLS support, like for to_char()
1735 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg00485.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg00485.php</a>
1736           <a href="http://archives.postgresql.org/pgsql-patches/2008-02/msg00038.php">http://archives.postgresql.org/pgsql-patches/2008-02/msg00038.php</a>
1737 </p>
1738     </li><li>Find a correct rint() substitute on Windows
1739 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00808.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00808.php</a>
1740 </p>
1741   </li></ul>
1742   </li><li>Wire Protocol Changes
1743   <ul>
1744     <li>Allow dynamic character set handling
1745     </li><li>Add decoded type, length, precision
1746     </li><li>Use compression?
1747     </li><li>Update clients to use data types, typmod, schema.table.column names
1748           of result sets using new statement protocol
1749   </li></ul>
1750 </li></ul>
1751 <h1><a name="section_23">Exotic Features</a></h1>
1752
1753 <ul>
1754   <li>Add pre-parsing phase that converts non-ISO syntax to supported
1755   syntax
1756 <p>  This could allow SQL written for other databases to run without
1757   modification.
1758 </p>
1759   </li><li>Allow plug-in modules to emulate features from other databases
1760   </li><li>Add features of Oracle-style packages  (Pavel)
1761 <p>  A package would be a schema with session-local variables,
1762   public/private functions, and initialization functions.  It
1763   is also possible to implement these capabilities
1764   in any schema and not use a separate "packages"
1765   syntax at all.
1766 </p>
1767 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-08/msg00384.php">http://archives.postgresql.org/pgsql-hackers/2006-08/msg00384.php</a>
1768 </p>
1769   </li><li>Consider allowing control of upper/lower case folding of unquoted
1770   identifiers
1771 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2004-04/msg00818.php">http://archives.postgresql.org/pgsql-hackers/2004-04/msg00818.php</a>
1772   <a href="http://archives.postgresql.org/pgsql-hackers/2006-10/msg01527.php">http://archives.postgresql.org/pgsql-hackers/2006-10/msg01527.php</a>
1773   <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg00849.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg00849.php</a>
1774 </p>
1775   </li><li>Add autonomous transactions
1776 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00893.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00893.php</a>
1777 </p>
1778 </li></ul>
1779 <h1><a name="section_24">Features We Do <u>Not</u> Want</a></h1>
1780
1781 <ul>
1782   <li>All backends running as threads in a single process (not wanted)
1783 <p>  This eliminates the process protection we get from the current setup.
1784   Thread creation is usually the same overhead as process creation on
1785   modern systems, so it seems unwise to use a pure threaded model.
1786 </p>
1787   </li><li>Optimizer hints (not wanted)
1788 <p>  Optimizer hints are used to work around problems in the optimizer.  We
1789   would rather have the problems reported and fixed.
1790 </p>
1791 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-08/msg00506.php">http://archives.postgresql.org/pgsql-hackers/2006-08/msg00506.php</a>
1792   <a href="http://archives.postgresql.org/pgsql-hackers/2006-10/msg00517.php">http://archives.postgresql.org/pgsql-hackers/2006-10/msg00517.php</a>
1793   <a href="http://archives.postgresql.org/pgsql-hackers/2006-10/msg00663.php">http://archives.postgresql.org/pgsql-hackers/2006-10/msg00663.php</a>
1794 </p>
1795 <p>  Because we support postfix operators, it isn't possible to make AS
1796   optional and continue to use bison.
1797   <a href="http://archives.postgresql.org/pgsql-hackers/2003-04/msg00436.php">http://archives.postgresql.org/pgsql-hackers/2003-04/msg00436.php</a>
1798 </p>
1799 <p>  <a href="http://archives.postgresql.org/pgsql-sql/2006-08/msg00164.php">http://archives.postgresql.org/pgsql-sql/2006-08/msg00164.php</a>
1800 </p>
1801   </li><li>Embedded server (not wanted)
1802 <p>  While PostgreSQL clients runs fine in limited-resource environments, the
1803   server requires multiple processes and a stable pool of resources to
1804   run reliabily and efficiently.  Stripping down the PostgreSQL server
1805   to run in the same process address space as the client application
1806   would add too much complexity and failure cases.</p>
1807 </li></ul>
1808
1809 </body>
1810 </html>