postgresql/doc/src/sgml
Tom Lane bac3e83622 Replace the hard-wired type knowledge in TypeCategory() and IsPreferredType()
with system catalog lookups, as was foreseen to be necessary almost since
their creation.  Instead put the information into two new pg_type columns,
typcategory and typispreferred.  Add support for setting these when
creating a user-defined base type.

The category column is just a "char" (i.e. a poor man's enum), allowing
a crude form of user extensibility of the category list: just use an
otherwise-unused character.  This seems sufficient for foreseen uses,
but we could upgrade to having an actual category catalog someday, if
there proves to be a huge demand for custom type categories.

In this patch I have attempted to hew exactly to the behavior of the
previous hardwired logic, except for introducing new type categories for
arrays, composites, and enums.  In particular the default preferred state
for user-defined types remains TRUE.  That seems worth revisiting, but it
should be done as a separate patch from introducing the infrastructure.
Likewise, any adjustment of the standard set of categories should be done
separately.
2008-07-30 17:05:05 +00:00
..
ref Replace the hard-wired type knowledge in TypeCategory() and IsPreferredType() 2008-07-30 17:05:05 +00:00
acronyms.sgml cvsweb lives on anoncvs.postgresql.org these days. 2008-03-18 16:05:07 +00:00
adminpack.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
advanced.sgml Consistenly use colons before '<programlisting>' blocks, where 2007-02-01 00:28:19 +00:00
arch-dev.sgml Change 'merge sort join', a phrase we use nowhere else, to the more 2007-12-12 06:23:27 +00:00
array.sgml Add generate_subscripts, a series-generation function which generates an 2008-04-28 14:48:58 +00:00
backup.sgml Properly document archive/restore command examples on Windows. 2008-07-18 17:33:17 +00:00
biblio.sgml Update URL for "Generalized Partial Indexes" paper to point to a cached 2007-02-08 04:31:37 +00:00
bki.sgml Consistenly use colons before '<programlisting>' blocks, where 2007-02-01 00:28:19 +00:00
btree-gist.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
catalogs.sgml Replace the hard-wired type knowledge in TypeCategory() and IsPreferredType() 2008-07-30 17:05:05 +00:00
charset.sgml Add Swedish_Sweden.1252 Windows locale example to docs. 2008-07-15 17:45:03 +00:00
chkpass.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
citext.sgml Add a new, improved version of citext as a contrib module. 2008-07-29 18:31:20 +00:00
client-auth.sgml Put spaces after "RFC". 2008-01-05 13:17:00 +00:00
config.sgml Properly document archive/restore command examples on Windows. 2008-07-18 17:33:17 +00:00
contacts.sgml Make $PostgreSQL CVS tags consistent for SGML files. 2006-03-10 19:10:50 +00:00
contrib-spi.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
contrib.sgml Add a new, improved version of citext as a contrib module. 2008-07-29 18:31:20 +00:00
cube.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
cvs.sgml Fix typo, noted by Stefan Kaltenbrunner. 2008-04-21 11:06:13 +00:00
datatype.sgml Extend GIN to support partial-match searches, and extend tsquery to support 2008-05-16 16:31:02 +00:00
datetime.sgml Update docs to reflect the fact that we can now deal with DST rules 2008-02-16 21:51:04 +00:00
dblink.sgml Implement current_query(), that shows the currently executing query. 2008-04-04 16:57:21 +00:00
ddl.sgml Change the rules for inherited CHECK constraints to be essentially the same 2008-05-09 23:32:05 +00:00
dfunc.sgml Consistenly use colons before '<programlisting>' blocks, where 2007-02-01 00:28:19 +00:00
dict-int.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
dict-xsyn.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
diskusage.sgml Update documentation on may/can/might: 2007-01-31 20:56:20 +00:00
dml.sgml Entity-ify a passel of & < > characters. Per gripe from Devrim. 2007-12-03 23:49:51 +00:00
docguide.sgml Update required TeX settings 2007-12-28 11:13:55 +00:00
earthdistance.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
ecpg.sgml Use macro to document size of ecpg sqlerrmc string. 2008-06-12 19:15:40 +00:00
errcodes.sgml Support SQL/PSM-compatible CASE statement in plpgsql. 2008-05-15 22:39:49 +00:00
extend.sgml Support "variadic" functions, which can accept a variable number of arguments 2008-07-16 01:30:23 +00:00
external-projects.sgml Clean up some now-obsolete references to GBorg. 2007-11-14 01:58:18 +00:00
features.sgml Update SQL conformance information about XML features. 2007-02-03 17:59:36 +00:00
filelist.sgml Add a new, improved version of citext as a contrib module. 2008-07-29 18:31:20 +00:00
fixrtf Add CVS tag lines to files that were lacking them. 2006-03-11 04:38:42 +00:00
func.sgml Code review for array_fill patch: fix inadequate check for array size overflow 2008-07-21 04:47:00 +00:00
fuzzystrmatch.sgml Add a variant of the Levenshtein string-distance function that lets the user 2008-04-03 21:13:07 +00:00
geqo.sgml Provide a bit more high-level documentation for the GEQO planner. 2007-07-21 04:02:41 +00:00
gin.sgml Update link to Oleg and Teodor's GIN page. 2008-07-22 22:05:24 +00:00
gist.sgml Push index operator lossiness determination down to GIST/GIN opclass 2008-04-14 17:05:34 +00:00
high-availability.sgml Improve table reference 2008-01-30 10:49:55 +00:00
history.sgml Add note on PostgreSQL vs. Postgres. 2007-10-30 23:06:06 +00:00
hstore.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
indexam.sgml Push index operator lossiness determination down to GIST/GIN opclass 2008-04-14 17:05:34 +00:00
indices.sgml Multi-column GIN indexes. Teodor Sigaev 2008-07-11 21:06:29 +00:00
info.sgml Remove mention of /contrib README files from documentation because files 2008-01-09 02:37:45 +00:00
information_schema.sgml Fix markup. 2007-02-20 23:14:19 +00:00
install-win32.sgml Cleanup reference to config.pl so it makes sense not only in 2008-07-29 15:23:44 +00:00
installation.sgml Abort if Tcl support was configured and no tcl shell was found. 2008-07-23 17:07:50 +00:00
intagg.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-10 05:32:51 +00:00
intarray.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-10 05:32:51 +00:00
intro.sgml Update documentation on may/can/might: 2007-01-31 20:56:20 +00:00
isn.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-10 05:32:51 +00:00
keywords.sgml Update key words table for 8.3 2008-01-30 10:37:36 +00:00
legal.sgml Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
libpq.sgml Mention actual function names in documentation of how to pass binary 2008-06-27 02:44:31 +00:00
lo.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
lobj.sgml Add server side lo_import(filename, oid) function. 2008-03-22 01:55:14 +00:00
ltree.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-10 05:32:51 +00:00
maintenance.sgml Rewrite docs section about routine vacuuming --- it's gotten rather mangled of 2008-06-16 03:13:14 +00:00
Makefile Make XML building work silently on VPATH builds (untested on regular builds). 2008-06-10 00:19:32 +00:00
manage-ag.sgml Move NFS section into "Creating Cluster" documentation section because 2007-11-08 15:21:03 +00:00
mk_feature_tables.pl Add CVS tag lines to files that were lacking them. 2006-03-11 04:38:42 +00:00
monitoring.sgml Fix a few typos in the DTrace docs. Patch from Euler Taveira de Oliveira, 2008-06-18 17:44:12 +00:00
mvcc.sgml Update "Conflicting lock modes" to show as conflict, add 2007-02-18 01:21:49 +00:00
nls.sgml Consistenly use colons before '<programlisting>' blocks, where 2007-02-01 00:28:19 +00:00
notation.sgml Make $PostgreSQL CVS tags consistent for SGML files. 2006-03-10 19:10:50 +00:00
oid2name.sgml Remove the -P options of oid2name and pgbench, as they are security 2007-12-11 02:31:49 +00:00
pageinspect.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-10 05:32:51 +00:00
perform.sgml Update examples in planstats.sgml for 8.3, and improve some aspects of 2007-12-28 21:03:31 +00:00
pgbench.sgml Add -M (query mode) option per ITAGAKI Takahiro 2008-03-19 03:33:21 +00:00
pgbuffercache.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-10 05:32:51 +00:00
pgcrypto.sgml Typo fix. 2008-01-17 14:34:45 +00:00
pgfreespacemap.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-10 05:32:51 +00:00
pgrowlocks.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-10 05:32:51 +00:00
pgstandby.sgml Add Simon Riggs' email address. 2008-05-07 18:48:40 +00:00
pgstattuple.sgml Adjust pgstatindex() to give correct answers for indexes larger than 2008-03-21 03:23:30 +00:00
pgtrgm.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-10 05:32:51 +00:00
planstats.sgml Update examples in planstats.sgml for 8.3, and improve some aspects of 2007-12-28 21:03:31 +00:00
plhandler.sgml Remove emacs info from footer of SGML files. 2006-09-16 00:30:20 +00:00
plperl.sgml Remove mention of DBD::PgSPI, which is unmaintained and generally unnecessary. 2008-04-10 15:16:46 +00:00
plpgsql.sgml Implement SQL-spec RETURNS TABLE syntax for functions. 2008-07-18 03:32:53 +00:00
plpython.sgml Support statement-level ON TRUNCATE triggers. Simon Riggs 2008-03-28 00:21:56 +00:00
pltcl.sgml Support statement-level ON TRUNCATE triggers. Simon Riggs 2008-03-28 00:21:56 +00:00
postgres.sgml Move Client Authentication right after Server Configuration in docs. 2008-05-07 16:36:43 +00:00
problems.sgml Update documentation on may/can/might: 2007-01-31 20:56:20 +00:00
protocol.sgml Some small editorialization on the protocol documentation for GSSAPI/SSPI 2008-02-08 18:18:05 +00:00
queries.sgml Allow AS to be omitted when specifying an output column name in SELECT 2008-02-15 22:17:06 +00:00
query.sgml Consistenly use colons before '<programlisting>' blocks, where 2007-02-01 00:28:19 +00:00
reference.ced Deprecate 'current' for date/time input. 2001-11-21 05:53:41 +00:00
reference.sgml Remove ipcclean utility command --- didn't work on all Unixes and on 2008-03-27 17:24:16 +00:00
regress.sgml Copy refint.so and autoinc.so into the src/test/regress directory during 2008-05-30 00:04:32 +00:00
release.sgml Update release notes for ALTER AGGREGATE fix. 2008-06-08 21:46:07 +00:00
rowtypes.sgml Consistenly use colons before '<programlisting>' blocks, where 2007-02-01 00:28:19 +00:00
rules.sgml Wording cleanup for error messages. Also change can't -> cannot. 2007-02-01 19:10:30 +00:00
runtime.sgml Code review for recent patch to terminate online backup during shutdown: 2008-04-26 22:47:40 +00:00
seg.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
sources.sgml Add a new ereport auxiliary function errdetail_log(), which works the same as 2008-03-24 18:08:47 +00:00
spi.sgml Add SPI-level support for executing SQL commands with one-time-use plans, 2008-04-01 03:09:30 +00:00
sql.sgml Allow AS to be omitted when specifying an output column name in SELECT 2008-02-15 22:17:06 +00:00
sslinfo.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
standalone-install.sgml $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
start.sgml Update psql startup banner to be shorter, suggest "help" for help. 2008-05-16 17:17:00 +00:00
storage.sgml Remove the recently added USE_SEGMENTED_FILES option, and indeed remove all 2008-05-02 01:08:27 +00:00
stylesheet-common.xsl Reorganize XSLT stylesheet support. Put common things into a separate 2006-12-10 16:01:06 +00:00
stylesheet-fo.xsl Reorganize XSLT stylesheet support. Put common things into a separate 2006-12-10 16:01:06 +00:00
stylesheet-hh.xsl Reorganize XSLT stylesheet support. Put common things into a separate 2006-12-10 16:01:06 +00:00
stylesheet.css Override upstream DSSSL style sheet formatting changes 2004-06-29 20:44:34 +00:00
stylesheet.dsl Disable LOT for the time being because of TeX problems 2007-12-28 11:14:19 +00:00
stylesheet.xsl Reorganize XSLT stylesheet support. Put common things into a separate 2006-12-10 16:01:06 +00:00
syntax.sgml Use SGML table to show backslash string escapes, rather than have them 2008-06-26 22:24:42 +00:00
tablefunc.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
test-parser.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
textsearch.sgml Extend GIN to support partial-match searches, and extend tsquery to support 2008-05-16 16:31:02 +00:00
trigger.sgml Support statement-level ON TRUNCATE triggers. Simon Riggs 2008-03-28 00:21:56 +00:00
tsearch2.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
typeconv.sgml Replace the hard-wired type knowledge in TypeCategory() and IsPreferredType() 2008-07-30 17:05:05 +00:00
user-manag.sgml Consistenly use colons before '<programlisting>' blocks, where 2007-02-01 00:28:19 +00:00
uuid-ossp.sgml Make an editorial pass over the newly SGML-ified contrib documentation. 2007-12-06 04:12:10 +00:00
vacuumlo.sgml Make documentation of -W options more accurate and uniform. 2007-12-11 19:57:32 +00:00
wal.sgml Extend yesterday's patch making BLCKSZ and RELSEG_SIZE configurable to also 2008-05-02 19:52:37 +00:00
xaggr.sgml Consistenly use colons before '<programlisting>' blocks, where 2007-02-01 00:28:19 +00:00
xfunc.sgml Implement SQL-spec RETURNS TABLE syntax for functions. 2008-07-18 03:32:53 +00:00
xindex.sgml Extend GIN to support partial-match searches, and extend tsquery to support 2008-05-16 16:31:02 +00:00
xml2.sgml Fix contrib/xml2 makefile to not override CFLAGS, and in passing make it 2008-05-08 16:49:37 +00:00
xoper.sgml spell checker run 2007-11-28 15:42:31 +00:00
xplang.sgml Consistenly use colons before '<programlisting>' blocks, where 2007-02-01 00:28:19 +00:00
xtypes.sgml Change the declaration of struct varlena so that the length word is 2008-02-23 19:11:45 +00:00