Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
934c2134
Commit
934c2134
authored
Nov 12, 2003
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation cleanup
parent
fa5c8a05
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
377 additions
and
362 deletions
+377
-362
doc/src/sgml/ecpg.sgml
doc/src/sgml/ecpg.sgml
+10
-10
doc/src/sgml/extend.sgml
doc/src/sgml/extend.sgml
+62
-40
doc/src/sgml/install-win32.sgml
doc/src/sgml/install-win32.sgml
+2
-2
doc/src/sgml/libpq.sgml
doc/src/sgml/libpq.sgml
+43
-43
doc/src/sgml/lobj.sgml
doc/src/sgml/lobj.sgml
+2
-2
doc/src/sgml/plpgsql.sgml
doc/src/sgml/plpgsql.sgml
+167
-167
doc/src/sgml/plpython.sgml
doc/src/sgml/plpython.sgml
+10
-13
doc/src/sgml/pltcl.sgml
doc/src/sgml/pltcl.sgml
+2
-2
doc/src/sgml/ref/create_function.sgml
doc/src/sgml/ref/create_function.sgml
+4
-4
doc/src/sgml/release.sgml
doc/src/sgml/release.sgml
+19
-19
doc/src/sgml/typeconv.sgml
doc/src/sgml/typeconv.sgml
+3
-3
doc/src/sgml/xaggr.sgml
doc/src/sgml/xaggr.sgml
+9
-5
doc/src/sgml/xfunc.sgml
doc/src/sgml/xfunc.sgml
+44
-52
No files found.
doc/src/sgml/ecpg.sgml
View file @
934c2134
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.5
3 2003/10/17 18:57:00 tgl
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.5
4 2003/11/12 22:47:47 petere
Exp $
-->
<chapter id="ecpg">
...
...
@@ -284,7 +284,7 @@ EXEC SQL COMMIT;
</para>
<para>
Single-row
S
elect:
Single-row
s
elect:
<programlisting>
EXEC SQL SELECT foo INTO :FooBar FROM table1 WHERE ascii = 'doodad';
</programlisting>
...
...
@@ -359,7 +359,7 @@ EXEC SQL AT <replaceable>connection-name</replaceable> SELECT ...;
The second option is to execute a statement to switch the current
connection. That statement is:
<programlisting>
SET CONNECTION <replaceable>connection-name</replaceable>;
EXEC SQL
SET CONNECTION <replaceable>connection-name</replaceable>;
</programlisting>
This option is particularly convenient if many statements are to be
executed on the same connection.
...
...
@@ -392,7 +392,7 @@ SET CONNECTION <replaceable>connection-name</replaceable>;
write the name of a C variable into the SQL statement, prefixed by
a colon. For example:
<programlisting>
INSERT INTO sometable VALUES (:v1, 'foo', :v2);
EXEC SQL
INSERT INTO sometable VALUES (:v1, 'foo', :v2);
</programlisting>
This statements refers to two C variables named
<varname>v1</varname> and <varname>v2</varname> and also uses a
...
...
@@ -592,7 +592,7 @@ EXEC SQL BEGIN DECLARE SECTION;
const char *stmt = "CREATE TABLE test1 (...);";
EXEC SQL END DECLARE SECTION;
EXECUTE IMMEDIATE :stmt;
EXEC
SQL EXEC
UTE IMMEDIATE :stmt;
</programlisting>
You may not execute statements that retrieve data (e.g.,
<command>SELECT</command>) this way.
...
...
@@ -611,9 +611,9 @@ EXEC SQL BEGIN DECLARE SECTION;
const char *stmt = "INSERT INTO test1 VALUES(?, ?);";
EXEC SQL END DECLARE SECTION;
PREPARE mystmt FROM :stmt;
EXEC SQL
PREPARE mystmt FROM :stmt;
...
EXECUTE mystmt USING 42, 'foobar';
EXEC
SQL EXEC
UTE mystmt USING 42, 'foobar';
</programlisting>
If the statement you are executing returns values, then add an
<literal>INTO</literal> clause:
...
...
@@ -624,9 +624,9 @@ int v1, v2;
VARCHAR v3;
EXEC SQL END DECLARE SECTION;
PREPARE mystmt FROM :stmt;
EXEC SQL
PREPARE mystmt FROM :stmt;
...
EXECUTE mystmt INTO v1, v2, v3 USING 37;
EXEC
SQL EXEC
UTE mystmt INTO v1, v2, v3 USING 37;
</programlisting>
An <command>EXECUTE</command> command may have an
<literal>INTO</literal> clause, a <literal>USING</literal> clause,
...
...
@@ -668,7 +668,7 @@ EXEC SQL DEALLOCATE PREPARE <replaceable>name</replaceable>;
EXEC SQL ALLOCATE DESCRIPTOR <replaceable>identifier</replaceable>;
</programlisting>
The identifier serves as the <quote>variable name</quote> of the
descriptor area.
The scope of the allocated descriptor is WHAT?.
descriptor area.
<comment>The scope of the allocated descriptor is WHAT?.</comment>
When you don't need the descriptor anymore, you should deallocate
it:
<programlisting>
...
...
doc/src/sgml/extend.sgml
View file @
934c2134
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.2
5 2003/09/11 21:42:19 momjian
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.2
6 2003/11/12 22:47:47 petere
Exp $
-->
<chapter id="extend">
...
...
@@ -105,52 +105,74 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.25 2003/09/11 21:42:19 momj
<para>
<productname>PostgreSQL</productname> data types are divided into base
types, composite types, domain
type
s, and pseudo-types.
types, composite types, domains, and pseudo-types.
</para>
<para>
Base types are those, like <type>int4</type>, that are implemented
below the level of the <acronym>SQL</> language (typically in a low-level
language such as C). They generally correspond to
what are often known as abstract data types.
<productname>PostgreSQL</productname>
can only operate on such types through functions provided
by the user and only understands the behavior of such
types to the extent that the user describes them. Base types are
further subdivided into scalar and array types. For each scalar type,
a corresponding array type is automatically created that can hold
variable-size arrays of that scalar type.
</para>
<sect2>
<title>Base Types</title>
<para>
Composite types, or row types, are created whenever the user creates a
table; it's also possible to define a <quote>stand-alone</> composite
type with no associated table. A composite type is simply a list of
base types with associated field names. A value of a composite type
is a row or record of field values. The user can access the component
fields from <acronym>SQL</> queries.
</para>
<para>
Base types are those, like <type>int4</type>, that are
implemented below the level of the <acronym>SQL</> language
(typically in a low-level language such as C). They generally
correspond to what are often known as abstract data types.
<productname>PostgreSQL</productname> can only operate on such
types through functions provided by the user and only understands
the behavior of such types to the extent that the user describes
them. Base types are further subdivided into scalar and array
types. For each scalar type, a corresponding array type is
automatically created that can hold variable-size arrays of that
scalar type.
</para>
</sect2>
<para>
A domain type is based on a particular base
type and for many purposes is interchangeable with its base type.
However, a domain may have constraints that restrict its valid values
to a subset of what the underlying base type would allow. Domains can
be created by simple <acronym>SQL</> commands.
</para>
<sect2>
<title>Composite Types</title>
<para>
Finally, there are a few <quote>pseudo-types</> for special purposes.
Pseudo-types cannot appear as fields of tables or composite types, but
they can be used to declare the argument and result types of functions.
This provides a mechanism within the type system to identify special
classes of functions. <xref
linkend="datatype-pseudotypes-table"> lists the existing
pseudo-types.
</para>
<para>
Composite types, or row types, are created whenever the user
creates a table; it's also possible to define a
<quote>stand-alone</> composite type with no associated table. A
composite type is simply a list of base types with associated
field names. A value of a composite type is a row or record of
field values. The user can access the component fields from
<acronym>SQL</> queries.
</para>
</sect2>
<sect2>
<title>Domains</title>
<para>
A domain is based on a particular base type and for many purposes
is interchangeable with its base type. However, a domain may
have constraints that restrict its valid values to a subset of
what the underlying base type would allow.
</para>
<para>
Domains can be created using the <acronym>SQL</> commands
<command>CREATE DOMAIN</command>. Their creation and use is not
discussed in this chapter.
</para>
</sect2>
<sect2>
<title>Pseudo-Types</title>
<para>
There are a few <quote>pseudo-types</> for special purposes.
Pseudo-types cannot appear as columns of tables or attributes of
composite types, but they can be used to declare the argument and
result types of functions. This provides a mechanism within the
type system to identify special classes of functions. <xref
linkend="datatype-pseudotypes-table"> lists the existing
pseudo-types.
</para>
</sect2>
<sect2 id="extend-types-polymorphic">
<title>Polymorphic Types
and Functions
</title>
<title>Polymorphic Types</title>
<indexterm zone="extend-types-polymorphic">
<primary>polymorphic type</primary>
...
...
doc/src/sgml/install-win32.sgml
View file @
934c2134
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/install-win32.sgml,v 1.1
5 2003/11/04 09:55:38
petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/install-win32.sgml,v 1.1
6 2003/11/12 22:47:47
petere Exp $
-->
<chapter id="install-win32">
...
...
@@ -109,7 +109,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/install-win32.sgml,v 1.15 2003/11/04 09:55:
<para>
<application>psql</application> is compiled as a <quote>console
application</>. As the Win
32
console windows use a different
application</>. As the Win
dows
console windows use a different
encoding than the rest of the system, you must take special care
when using 8-bit characters at the <application>psql</application>
prompt. When <application>psql</application> detects a problematic
...
...
doc/src/sgml/libpq.sgml
View file @
934c2134
This diff is collapsed.
Click to expand it.
doc/src/sgml/lobj.sgml
View file @
934c2134
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.3
1 2003/11/01 01:56:29
petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.3
2 2003/11/12 22:47:47
petere Exp $
-->
<chapter id="largeObjects">
...
...
@@ -299,7 +299,7 @@ int lo_unlink(PGconn *conn, Oid lobjId);
</sect1>
<sect1 id="lo-funcs">
<title>Server-
s
ide Functions</title>
<title>Server-
S
ide Functions</title>
<para>
There are two built-in server-side functions,
...
...
doc/src/sgml/plpgsql.sgml
View file @
934c2134
This diff is collapsed.
Click to expand it.
doc/src/sgml/plpython.sgml
View file @
934c2134
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/plpython.sgml,v 1.2
0 2003/09/12 22:17:23 tgl
Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/plpython.sgml,v 1.2
1 2003/11/12 22:47:47 petere
Exp $ -->
<chapter id="plpython">
<title>PL/Python - Python Procedural Language</title>
...
...
@@ -17,18 +17,6 @@
<literal>createlang plpythonu <replaceable>dbname</></literal>.
</para>
<note>
<para>
As of <productname>PostgreSQL</productname> 7.4,
PL/Python is only available as an <quote>untrusted</> language
(meaning it does not offer any way of restricting what users
can do in it). It has therefore been renamed to <literal>plpythonu</>.
The trusted variant <literal>plpython</> may become available again in
future, if a new secure execution mechanism is developed by the Python
community.
</para>
</note>
<tip>
<para>
If a language is installed into <literal>template1</>, all subsequently
...
...
@@ -36,6 +24,15 @@
</para>
</tip>
<para>
As of <productname>PostgreSQL</productname> 7.4, PL/Python is only
available as an <quote>untrusted</> language (meaning it does not
offer any way of restricting what users can do in it). It has
therefore been renamed to <literal>plpythonu</>. The trusted
variant <literal>plpython</> may become available again in future,
if a new secure execution mechanism is developed in Python.
</para>
<note>
<para>
Users of source packages must specially enable the build of
...
...
doc/src/sgml/pltcl.sgml
View file @
934c2134
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.2
6 2003/09/08 23:02:28
petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.2
7 2003/11/12 22:47:47
petere Exp $
-->
<chapter id="pltcl">
...
...
@@ -136,7 +136,7 @@ CREATE FUNCTION tcl_max(integer, integer) RETURNS integer AS '
<para>
As shown above,
to return a
NULL
value from a PL/Tcl function, execute
to return a
null
value from a PL/Tcl function, execute
<literal>return_null</literal>. This can be done whether the
function is strict or not.
</para>
...
...
doc/src/sgml/ref/create_function.sgml
View file @
934c2134
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.5
3 2003/10/26 04:34:05 momjian
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.5
4 2003/11/12 22:47:47 petere
Exp $
-->
<refentry id="SQL-CREATEFUNCTION">
...
...
@@ -95,7 +95,7 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable>
<para>
The data type(s) of the function's arguments (optionally
schema-qualified), if any. The argument types may be base, complex, or
domain
type
s, or copy the type of an existing column.
domains, or copy the type of an existing column.
</para>
<para>
The type of a column is referenced by writing
...
...
@@ -120,8 +120,8 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable>
<listitem>
<para>
The return data type (optionally schema-qualified). The return type
may be
specified as a base, complex, or domain type
,
or may copy the type of an existing column. See the description
may be
a base type, complex type, or a domain
,
or may
be specified to
copy the type of an existing column. See the description
under <literal>argtype</literal> above on how to reference the type
of an existing column.
</para>
...
...
doc/src/sgml/release.sgml
View file @
934c2134
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.23
7 2003/11/10 22:27:00 momjian
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.23
8 2003/11/12 22:47:47 petere
Exp $
-->
<appendix id="release">
...
...
@@ -878,12 +878,12 @@ zero-row record variable (Tom)</para></listitem>
<itemizedlist>
<listitem><para>Allow PQcmdTuples() to return row counts for MOVE and FETCH (Neil)</para></listitem>
<listitem><para>Add PQfreemem() for freeing memory on Win
32
, suggest for NOTIFY (Bruce)</para>
<listitem><para>Add PQfreemem() for freeing memory on Win
dows
, suggest for NOTIFY (Bruce)</para>
<para>
Win
32
requires that memory allocated in a library be freed by a
Win
dows
requires that memory allocated in a library be freed by a
function in the same library, hence free() doesn't work for freeing
memory allocated by libpq. PQfreemem() is the proper way to free
libpq memory, especially on Win
32
, and is recommended for other
libpq memory, especially on Win
dows
, and is recommended for other
platforms as well.
</para>
</listitem>
...
...
@@ -961,8 +961,8 @@ zero-row record variable (Tom)</para></listitem>
<listitem><para>Convert administration scripts to C (Peter)</para></listitem>
<listitem><para>Bison >= 1.85 is now required to build the PostgreSQL grammar, if building from CVS</para></listitem>
<listitem><para>Merge documentation into one book (Peter)</para></listitem>
<listitem><para>Add Win
32
compatibility functions (Bruce)</para></listitem>
<listitem><para>Allow client interfaces to compile under MinGW
/Win32
(Bruce)</para></listitem>
<listitem><para>Add Win
dows
compatibility functions (Bruce)</para></listitem>
<listitem><para>Allow client interfaces to compile under MinGW (Bruce)</para></listitem>
<listitem><para>New ereport() function for error reporting (Tom)</para></listitem>
<listitem><para>Support Intel Linux compiler (Peter)</para></listitem>
<listitem><para>Improve Linux startup scripts (Slawomir Sudnik, Darko Prenosil)</para></listitem>
...
...
@@ -1794,7 +1794,7 @@ of locale?</para></listitem>
<listitem><para>Fix for sending large queries over non-blocking connections (Bernhard Herzog)</para></listitem>
<listitem><para>Fix for libpq using timers on Win9X (David Ford)</para></listitem>
<listitem><para>Allow libpq notify to handle servers with different-length identifiers (Tom)</para></listitem>
<listitem><para>Add libpq PQescapeString() and PQescapeBytea() to Win
32
(Bruce)</para></listitem>
<listitem><para>Add libpq PQescapeString() and PQescapeBytea() to Win
dows
(Bruce)</para></listitem>
<listitem><para>Fix for SSL with non-blocking connections (Jack Bates)</para></listitem>
<listitem><para>Add libpq connection timeout parameter (Denis A Ustimenko)</para></listitem>
</itemizedlist>
...
...
@@ -1846,7 +1846,7 @@ of locale?</para></listitem>
<listitem><para>Always enable multibyte in compile, remove --enable-multibyte option (Tatsuo)</para></listitem>
<listitem><para>Always enable locale in compile, remove --enable-locale option (Peter)</para></listitem>
<listitem><para>Fix for Win9x DLL creation (Magnus Naeslund)</para></listitem>
<listitem><para>Fix for link() usage by WAL code on Win
32
, BeOS (Jason Tishler)</para></listitem>
<listitem><para>Fix for link() usage by WAL code on Win
dows
, BeOS (Jason Tishler)</para></listitem>
<listitem><para>Add sys/types.h to c.h, remove from main files (Peter, Bruce)</para></listitem>
<listitem><para>Fix AIX hang on SMP machines (Tomoyuki Niijima)</para></listitem>
<listitem><para>AIX SMP hang fix (Tomoyuki Niijima)</para></listitem>
...
...
@@ -1871,7 +1871,7 @@ of locale?</para></listitem>
<listitem><para>New Polish FAQ (Marcin Mazurek)</para></listitem>
<listitem><para>Add Posix semaphore support (Tom)</para></listitem>
<listitem><para>Document need for reindex (Bruce)</para></listitem>
<listitem><para>Rename some internal identifiers to simplify Win
32
compile (Jan, Katherine Ward)</para></listitem>
<listitem><para>Rename some internal identifiers to simplify Win
dows
compile (Jan, Katherine Ward)</para></listitem>
<listitem><para>Add documentation on computing disk space (Bruce)</para></listitem>
<listitem><para>Remove KSQO from GUC (Bruce)</para></listitem>
<listitem><para>Fix memory leak in rtree (Kenneth Been)</para></listitem>
...
...
@@ -2588,8 +2588,8 @@ of locale?</para></listitem>
<itemizedlist>
<listitem><para>Configure, dynamic loader, and shared library fixes (Peter E)</para></listitem>
<listitem><para>Fixes in QNX 4 port (Bernd Tegge)</para></listitem>
<listitem><para>Fixes in Cygwin and Win
32
ports (Jason Tishler, Gerhard Haring, Dmitry Yurtaev, Darko Prenosil, Mikhail Terekhov)</para></listitem>
<listitem><para>Fix for Win
32
socket communication failures (Magnus, Mikhail Terekhov)</para></listitem>
<listitem><para>Fixes in Cygwin and Win
dows
ports (Jason Tishler, Gerhard Haring, Dmitry Yurtaev, Darko Prenosil, Mikhail Terekhov)</para></listitem>
<listitem><para>Fix for Win
dows
socket communication failures (Magnus, Mikhail Terekhov)</para></listitem>
<listitem><para>Hurd compile fix (Oliver Elphick)</para></listitem>
<listitem><para>BeOS fixes (Cyril Velter)</para></listitem>
<listitem><para>Remove configure --enable-unicode-conversion, now enabled by multibyte (Tatsuo)</para></listitem>
...
...
@@ -3675,7 +3675,7 @@ Clean up #include in /include directory (Bruce)
Add scripts for checking includes (Bruce)
Remove un-needed #include's from *.c files (Bruce)
Change #include's to use <> and "" as appropriate (Bruce)
Enable W
IN32
compilation of libpq
Enable W
indows
compilation of libpq
Alpha spinlock fix from Uncle George <email>gatgul@voicenet.com</email>
Overhaul of optimizer data structures (Tom)
Fix to cygipc library (Yutaka Tanida)
...
...
@@ -3688,7 +3688,7 @@ New platform-specific regression handling (Tom)
Rename oid8 -> oidvector and int28 -> int2vector (Bruce)
Included all yacc and lex files into the distribution (Peter E.)
Remove lextest, no longer needed (Peter E)
Fix for libpq and psql on Win
32
(Magnus)
Fix for libpq and psql on Win
dows
(Magnus)
Internally change datetime and timespan into timestamp and interval (Thomas)
Fix for plpgsql on BSD/OS
Add SQL_ASCII test case to the regression test (Tatsuo)
...
...
@@ -3772,7 +3772,7 @@ Fixes for CASE in WHERE join clauses(Tom)
Fix BTScan abort(Tom)
Repair the check for redundant UNIQUE and PRIMARY KEY indexes(Thomas)
Improve it so that it checks for multicolumn constraints(Thomas)
Fix for Win
32
making problem with MB enabled(Hiroki Kataoka)
Fix for Win
dows
making problem with MB enabled(Hiroki Kataoka)
Allow BSD yacc and bison to compile pl code(Bruce)
Fix SET NAMES working
int8 fixes(Thomas)
...
...
@@ -4230,7 +4230,7 @@ Source Tree Changes
-------------------
Improve port matching(Tom)
Portability fixes for SunOS
Add
NT/Win32
backend port and enable dynamic loading(Magnus and Daniel Horak)
Add
Windows NT
backend port and enable dynamic loading(Magnus and Daniel Horak)
New port to Cobalt Qube(Mips) running Linux(Tatsuo)
Port to NetBSD/m68k(Mr. Mutsuki Nakajima)
Port to NetBSD/sun3(Mr. Mutsuki Nakajima)
...
...
@@ -4338,7 +4338,7 @@ Timezone fixes(Tom)
HP-UX fixes(Tom)
Use implicit type coercion for matching DEFAULT values(Thomas)
Add routines to help with single-byte (internal) character type(Thomas)
Compilation of libpq for Win
32
fixes(Magnus)
Compilation of libpq for Win
dows
fixes(Magnus)
Upgrade to PyGreSQL 2.2(D'Arcy)
</programlisting>
</para>
...
...
@@ -4523,7 +4523,7 @@ New contrib/lo code for large object orphan removal(Peter)
New psql command "SET CLIENT_ENCODING TO 'encoding'" for multibytes
feature, see /doc/README.mb(Tatsuo)
/contrib/noupdate code to revoke update permission on a column
libpq can now be compiled on
win32
(Magnus)
libpq can now be compiled on
Windows
(Magnus)
Add PQsetdbLogin() in libpq
New 8-byte integer type, checked by configure for OS support(Thomas)
Better support for quoted table/column names(Thomas)
...
...
@@ -4586,7 +4586,7 @@ New setval() command to set sequence value(Massimo)
Auto-remove unix socket file on start-up if no postmaster running(Massimo)
Conditional trace package(Massimo)
New UNLISTEN command(Massimo)
psql and libpq now compile under
win32
using win32.mak(Magnus)
psql and libpq now compile under
Windows
using win32.mak(Magnus)
Lo_read no longer stores trailing NULL(Bruce)
Identifiers are now truncated to 31 characters internally(Bruce)
Createuser options now availble on the command line
...
...
@@ -5551,7 +5551,7 @@ new OS-specific template files(Marc)
no more need to edit Makefile.global(Marc)
re-arrange include files(Marc)
nextstep patches (Gregor Hoffleit)
removed W
IN32
-specific code(Bruce)
removed W
indows
-specific code(Bruce)
removed postmaster -e option, now only postgres -e option (Bruce)
merge duplicate library code in front/backends(Martin)
now works with eBones, international Kerberos(Jun)
...
...
doc/src/sgml/typeconv.sgml
View file @
934c2134
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/typeconv.sgml,v 1.3
7 2003/11/04 09:55:39
petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/typeconv.sgml,v 1.3
8 2003/11/12 22:47:47
petere Exp $
-->
<chapter Id="typeconv">
...
...
@@ -289,7 +289,7 @@ candidate remains, use it; else continue to the next step.
<step performance="required">
<para>
Run through all candidates and keep those with the most exact matches
on input types. (Domain
type
s are considered the same as their base type
on input types. (Domains are considered the same as their base type
for this purpose.) Keep all candidates if none have any exact matches.
If only one candidate remains, use it; else continue to the next step.
</para>
...
...
@@ -542,7 +542,7 @@ candidate remains, use it; else continue to the next step.
<step performance="required">
<para>
Run through all candidates and keep those with the most exact matches
on input types. (Domain
type
s are considered the same as their base type
on input types. (Domains are considered the same as their base type
for this purpose.) Keep all candidates if none have any exact matches.
If only one candidate remains, use it; else continue to the next step.
</para>
...
...
doc/src/sgml/xaggr.sgml
View file @
934c2134
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/xaggr.sgml,v 1.2
2 2003/08/31 17:32:20
petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/xaggr.sgml,v 1.2
3 2003/11/12 22:47:47
petere Exp $
-->
<sect1 id="xaggr">
...
...
@@ -140,16 +140,20 @@ CREATE AGGREGATE array_accum (
<programlisting>
SELECT attrelid::regclass, array_accum(attname)
FROM pg_attribute WHERE attnum > 0
AND attrelid = 'pg_user'::regclass GROUP BY attrelid;
FROM pg_attribute
WHERE attnum > 0 AND attrelid = 'pg_user'::regclass
GROUP BY attrelid;
attrelid | array_accum
----------+-----------------------------------------------------------------------------
pg_user | {usename,usesysid,usecreatedb,usesuper,usecatupd,passwd,valuntil,useconfig}
(1 row)
SELECT attrelid::regclass, array_accum(atttypid)
FROM pg_attribute WHERE attnum > 0
AND attrelid = 'pg_user'::regclass GROUP BY attrelid;
FROM pg_attribute
WHERE attnum > 0 AND attrelid = 'pg_user'::regclass
GROUP BY attrelid;
attrelid | array_accum
----------+------------------------------
pg_user | {19,23,16,16,16,25,702,1009}
...
...
doc/src/sgml/xfunc.sgml
View file @
934c2134
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.7
7 2003/11/01 01:56:29
petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.7
8 2003/11/12 22:47:47
petere Exp $
-->
<sect1 id="xfunc">
...
...
@@ -392,9 +392,9 @@ SELECT name(emp) AS youngster
result of the first function to it:
<screen>
CREATE FUNCTION getname(emp) RETURNS text AS
'SELECT $1.name;'
LANGUAGE SQL;
CREATE FUNCTION getname(emp) RETURNS text AS
'
SELECT $1.name;
'
LANGUAGE SQL;
SELECT getname(new_emp());
getname
...
...
@@ -538,12 +538,12 @@ SELECT name, listchildren(name) FROM nodes;
<para>
<acronym>SQL</acronym> functions may be declared to accept and
return the
<quote>polymorphic</> types
<type>any
element</type> and <type>anyarray</type>.
See <xref linkend="extend-types-polymorphic"> for a more detailed explanation
of polymorphic functions. Here is a polymorphic function
<function>make_array</function> that builds up an array from two
arbitrary data type elements:
return the
polymorphic types <type>anyelement</type> and
<type>any
array</type>. See <xref
linkend="extend-types-polymorphic"> for a more detailed
explanation of polymorphic functions. Here is a polymorphic
function <function>make_array</function> that builds up an array
from two
arbitrary data type elements:
<screen>
CREATE FUNCTION make_array(anyelement, anyelement) RETURNS anyarray AS '
SELECT ARRAY[$1, $2];
...
...
@@ -567,7 +567,7 @@ SELECT make_array(1, 2) AS intarray, make_array('a'::text, 'b') AS textarray;
Without the typecast, you will get errors like this:
<screen>
<computeroutput>
ERROR: could not determine
ANYARRAY/ANYELEMENT type because input is UNKNOWN
ERROR: could not determine
"anyarray"/"anyelement" type because input has type "unknown"
</computeroutput>
</screen>
</para>
...
...
@@ -576,7 +576,7 @@ ERROR: could not determine ANYARRAY/ANYELEMENT type because input is UNKNOWN
It is permitted to have polymorphic arguments with a deterministic
return type, but the converse is not. For example:
<screen>
CREATE FUNCTION is_greater(anyelement, anyelement) RETURNS bool AS '
CREATE FUNCTION is_greater(anyelement, anyelement) RETURNS bool
ean
AS '
SELECT $1 > $2;
' LANGUAGE SQL;
...
...
@@ -589,8 +589,8 @@ SELECT is_greater(1, 2);
CREATE FUNCTION invalid_func() RETURNS anyelement AS '
SELECT 1;
' LANGUAGE SQL;
ERROR: cannot determine result datatype
DETAIL: A function returning
ANYARRAY or ANYELEMENT
must have at least one argument of either type.
ERROR: cannot determine result data
type
DETAIL: A function returning
"anyarray" or "anyelement"
must have at least one argument of either type.
</screen>
</para>
</sect2>
...
...
@@ -758,15 +758,13 @@ CREATE FUNCTION square_root(double precision) RETURNS double precision
that fails as well, the load will fail.
</para>
<note>
<para>
The user ID the <productname>PostgreSQL</productname> server runs
as must be able to traverse the path to the file you intend to
load. Making the file or a higher-level directory not readable
and/or not executable by the <systemitem>postgres</systemitem> user is a
common mistake.
</para>
</note>
<para>
The user ID the <productname>PostgreSQL</productname> server runs
as must be able to traverse the path to the file you intend to
load. Making the file or a higher-level directory not readable
and/or not executable by the <systemitem>postgres</systemitem>
user is a common mistake.
</para>
<para>
In any case, the file name that is given in the
...
...
@@ -785,16 +783,14 @@ CREATE FUNCTION square_root(double precision) RETURNS double precision
</para>
</note>
<note>
<para>
After it is used for the first time, a dynamically loaded object
file is retained in memory. Future calls in the same session to the
function(s) in that file will only incur the small overhead of a symbol
table lookup. If you need to force a reload of an object file, for
example after recompiling it, use the <command>LOAD</> command or
begin a fresh session.
</para>
</note>
<para>
After it is used for the first time, a dynamically loaded object
file is retained in memory. Future calls in the same session to
the function(s) in that file will only incur the small overhead of
a symbol table lookup. If you need to force a reload of an object
file, for example after recompiling it, use the <command>LOAD</>
command or begin a fresh session.
</para>
<para>
It is recommended to locate shared libraries either relative to
...
...
@@ -805,17 +801,15 @@ CREATE FUNCTION square_root(double precision) RETURNS double precision
command <literal>pg_config --pkglibdir</literal>.
</para>
<note>
<para>
Before <productname>PostgreSQL</productname> release 7.2, only exact
absolute paths to object files could be specified in <command>CREATE
FUNCTION</>. This approach is now deprecated since it makes the
function definition unnecessarily unportable. It's best to specify
just the shared library name with no path nor extension, and let
the search mechanism provide that information instead.
</para>
</note>
<para>
Before <productname>PostgreSQL</productname> release 7.2, only
exact absolute paths to object files could be specified in
<command>CREATE FUNCTION</>. This approach is now deprecated
since it makes the function definition unnecessarily unportable.
It's best to specify just the shared library name with no path nor
extension, and let the search mechanism provide that information
instead.
</para>
</sect2>
<sect2 id="xfunc-c-basetype">
...
...
@@ -1685,8 +1679,7 @@ c_overpaid(PG_FUNCTION_ARGS)
<function>c_overpaid</function> in SQL:
<programlisting>
CREATE FUNCTION c_overpaid(emp, integer)
RETURNS boolean
CREATE FUNCTION c_overpaid(emp, integer) RETURNS boolean
AS '<replaceable>DIRECTORY</replaceable>/funcs', 'c_overpaid'
LANGUAGE C;
</programlisting>
...
...
@@ -2111,7 +2104,7 @@ CREATE OR REPLACE FUNCTION testpassbyval(integer, integer) RETURNS SETOF __testp
<para>
C-language functions may be declared to accept and
return the
<quote>polymorphic</>
types
return the
polymorphic
types
<type>anyelement</type> and <type>anyarray</type>.
See <xref linkend="extend-types-polymorphic"> for a more detailed explanation
of polymorphic functions. When function arguments or return types
...
...
@@ -2178,14 +2171,13 @@ make_array(PG_FUNCTION_ARGS)
<function>make_array</function> in SQL:
<programlisting>
CREATE FUNCTION make_array(anyelement)
RETURNS anyarray
CREATE FUNCTION make_array(anyelement) RETURNS anyarray
AS '<replaceable>DIRECTORY</replaceable>/funcs', 'make_array'
LANGUAGE
'C'
STRICT;
LANGUAGE
C
STRICT;
</programlisting>
Note the use of
STRICT; this is essential since the code is not
bothering to test for a NULL
input.
Note the use of
<literal>STRICT</literal>; this is essential
since the code is not bothering to test for a null
input.
</para>
</sect2>
</sect1>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment