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
69cf3356
Commit
69cf3356
authored
Aug 24, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation updates to reflect TOAST and new-style fmgr.
parent
0813fcbc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
20 deletions
+15
-20
doc/src/sgml/trigger.sgml
doc/src/sgml/trigger.sgml
+4
-3
doc/src/sgml/xtypes.sgml
doc/src/sgml/xtypes.sgml
+11
-17
No files found.
doc/src/sgml/trigger.sgml
View file @
69cf3356
...
@@ -509,12 +509,13 @@ trigf(PG_FUNCTION_ARGS)
...
@@ -509,12 +509,13 @@ trigf(PG_FUNCTION_ARGS)
</para>
</para>
<para>
<para>
Now, compile and
Now, compile and create the trigger function:
create table ttest (x int4):
<programlisting>
<programlisting>
create function trigf () returns opaque as
create function trigf () returns opaque as
'...path_to_so' language 'c';
'...path_to_so' language 'newC';
create table ttest (x int4);
</programlisting>
</programlisting>
<programlisting>
<programlisting>
...
...
doc/src/sgml/xtypes.sgml
View file @
69cf3356
...
@@ -55,7 +55,7 @@ complex_in(char *str)
...
@@ -55,7 +55,7 @@ complex_in(char *str)
double x, y;
double x, y;
Complex *result;
Complex *result;
if (sscanf(str, " ( %lf , %lf )", &x, &y) != 2) {
if (sscanf(str, " ( %lf , %lf )", &x, &y) != 2) {
elog(
NOTICE, "complex_in: error in parsing
elog(
ERROR, "complex_in: error in parsing %s", str);
return NULL;
return NULL;
}
}
result = (Complex *)palloc(sizeof(Complex));
result = (Complex *)palloc(sizeof(Complex));
...
@@ -138,22 +138,16 @@ CREATE TYPE complex (
...
@@ -138,22 +138,16 @@ CREATE TYPE complex (
<title>Large Objects</title>
<title>Large Objects</title>
<para>
<para>
The types discussed to this point are all "small"
If the values of your datatype might exceed a few hundred bytes in
objects -- that is, they are smaller than 8KB in size.
size (in internal form), you should be careful to mark them TOASTable.
<note>
To do this, the internal representation must follow the standard
<para>
layout for variable-length data: the first four bytes must be an int32
1024 longwords == 8192 bytes. In fact, the type must be considerably smaller than 8192 bytes,
containing the total length in bytes of the datum (including itself).
since the <productname>Postgres</productname> tuple
Then, all your functions that accept values of the type must be careful
and page overhead must also fit into this 8KB limitation.
to call pg_detoast_datum() on the supplied values --- after checking
The actual value that fits depends on the machine architecture.
that the value is not NULL, if your function is not strict. Finally,
</para>
select the appropriate storage option when giving the CREATE TYPE
</note>
command.
If you require a larger type for something like a document
retrieval system or for storing bitmaps, you will
need to use the <productname>Postgres</productname> large object
interface, or will need to recompile the
<productname>Postgres</productname> backend to use internal
storage blocks greater than 8kbytes..
</para>
</para>
</sect2>
</sect2>
</sect1>
</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