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
1e5eb160
Commit
1e5eb160
authored
Jan 22, 2005
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change -> and <- to use proper ampersand markups.
HEAD and 8.0.X.
parent
082283b9
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
64 additions
and
64 deletions
+64
-64
doc/src/sgml/cvs.sgml
doc/src/sgml/cvs.sgml
+2
-2
doc/src/sgml/indexcost.sgml
doc/src/sgml/indexcost.sgml
+2
-2
doc/src/sgml/plhandler.sgml
doc/src/sgml/plhandler.sgml
+2
-2
doc/src/sgml/release.sgml
doc/src/sgml/release.sgml
+7
-7
doc/src/sgml/rules.sgml
doc/src/sgml/rules.sgml
+24
-24
doc/src/sgml/spi.sgml
doc/src/sgml/spi.sgml
+5
-5
doc/src/sgml/trigger.sgml
doc/src/sgml/trigger.sgml
+15
-15
doc/src/sgml/xfunc.sgml
doc/src/sgml/xfunc.sgml
+7
-7
No files found.
doc/src/sgml/cvs.sgml
View file @
1e5eb160
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/cvs.sgml,v 1.3
0 2005/01/06 01:49:22 tgl
Exp $
$PostgreSQL: pgsql/doc/src/sgml/cvs.sgml,v 1.3
1 2005/01/22 22:06:17 momjian
Exp $
-->
-->
<appendix id="cvs">
<appendix id="cvs">
...
@@ -214,7 +214,7 @@ $ cvs checkout -r REL6_4 tc
...
@@ -214,7 +214,7 @@ $ cvs checkout -r REL6_4 tc
<programlisting>
<programlisting>
file1 file2 file3 file4 file5
file1 file2 file3 file4 file5
1.1 1.1 1.1 1.1 /--1.1*
<
-*- TAG
1.1 1.1 1.1 1.1 /--1.1*
<
-*- TAG
1.2*- 1.2 1.2 -1.2*-
1.2*- 1.2 1.2 -1.2*-
1.3 \- 1.3*- 1.3 / 1.3
1.3 \- 1.3*- 1.3 / 1.3
1.4 \ 1.4 / 1.4
1.4 \ 1.4 / 1.4
...
...
doc/src/sgml/indexcost.sgml
View file @
1e5eb160
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/indexcost.sgml,v 2.1
8 2003/11/29 19:51:37 pgsql
Exp $
$PostgreSQL: pgsql/doc/src/sgml/indexcost.sgml,v 2.1
9 2005/01/22 22:06:17 momjian
Exp $
-->
-->
<chapter id="indexcost">
<chapter id="indexcost">
...
@@ -205,7 +205,7 @@ amcostestimate (Query *root,
...
@@ -205,7 +205,7 @@ amcostestimate (Query *root,
<programlisting>
<programlisting>
*indexSelectivity = clauselist_selectivity(root, indexQuals,
*indexSelectivity = clauselist_selectivity(root, indexQuals,
rel-
>
relid, JOIN_INNER);
rel-
>
relid, JOIN_INNER);
</programlisting>
</programlisting>
</para>
</para>
</step>
</step>
...
...
doc/src/sgml/plhandler.sgml
View file @
1e5eb160
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/plhandler.sgml,v 1.
4 2005/01/05 23:42:03 tgl
Exp $
$PostgreSQL: pgsql/doc/src/sgml/plhandler.sgml,v 1.
5 2005/01/22 22:06:17 momjian
Exp $
-->
-->
<chapter id="plhandler">
<chapter id="plhandler">
...
@@ -121,7 +121,7 @@ plsample_call_handler(PG_FUNCTION_ARGS)
...
@@ -121,7 +121,7 @@ plsample_call_handler(PG_FUNCTION_ARGS)
/*
/*
* Called as a trigger procedure
* Called as a trigger procedure
*/
*/
TriggerData *trigdata = (TriggerData *) fcinfo-
>
context;
TriggerData *trigdata = (TriggerData *) fcinfo-
>
context;
retval = ...
retval = ...
}
}
...
...
doc/src/sgml/release.sgml
View file @
1e5eb160
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.32
1 2005/01/15 21:11:46 tgl
Exp $
$PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.32
2 2005/01/22 22:06:17 momjian
Exp $
-->
-->
<appendix id="release">
<appendix id="release">
...
@@ -7138,7 +7138,7 @@ Added documentation to tarball.
...
@@ -7138,7 +7138,7 @@ Added documentation to tarball.
<programlisting>
<programlisting>
Fix many CLUSTER failures (Tom)
Fix many CLUSTER failures (Tom)
Allow ALTER TABLE RENAME works on indexes (Tom)
Allow ALTER TABLE RENAME works on indexes (Tom)
Fix plpgsql to handle datetime-
>timestamp and timespan->
interval (Bruce)
Fix plpgsql to handle datetime-
>timestamp and timespan->
interval (Bruce)
New configure --with-setproctitle switch to use setproctitle() (Marc, Bruce)
New configure --with-setproctitle switch to use setproctitle() (Marc, Bruce)
Fix the off by one errors in ResultSet from 6.5.3, and more.
Fix the off by one errors in ResultSet from 6.5.3, and more.
jdbc ResultSet fixes (Joseph Shraibman)
jdbc ResultSet fixes (Joseph Shraibman)
...
@@ -8017,7 +8017,7 @@ Add Win1250 (Czech) support (Pavel Behal)
...
@@ -8017,7 +8017,7 @@ Add Win1250 (Czech) support (Pavel Behal)
<programlisting>
<programlisting>
Bug Fixes
Bug Fixes
---------
---------
Fix text
<->float8 and text<->
float4 conversion functions(Thomas)
Fix text
<->float8 and text<->
float4 conversion functions(Thomas)
Fix for creating tables with mixed-case constraints(Billy)
Fix for creating tables with mixed-case constraints(Billy)
Change exp()/pow() behavior to generate error on underflow/overflow(Jan)
Change exp()/pow() behavior to generate error on underflow/overflow(Jan)
Fix bug in pg_dump -z
Fix bug in pg_dump -z
...
@@ -9225,7 +9225,7 @@ Check explicitly for points and polygons contained within polygons
...
@@ -9225,7 +9225,7 @@ Check explicitly for points and polygons contained within polygons
using an axis-crossing algorithm(Thomas)
using an axis-crossing algorithm(Thomas)
Add routine to convert circle-box(Thomas)
Add routine to convert circle-box(Thomas)
Merge conflicting operators for different geometric data types(Thomas)
Merge conflicting operators for different geometric data types(Thomas)
Replace distance operator "<===>" with "
<->
"(Thomas)
Replace distance operator "<===>" with "
<->
"(Thomas)
Replace "above" operator "!^" with ">^" and "below" operator "!|" with "<^"(Thomas)
Replace "above" operator "!^" with ">^" and "below" operator "!|" with "<^"(Thomas)
Add routines for text trimming on both ends, substring, and string position(Thomas)
Add routines for text trimming on both ends, substring, and string position(Thomas)
Added conversion routines circle(box) and poly(circle)(Thomas)
Added conversion routines circle(box) and poly(circle)(Thomas)
...
@@ -10093,9 +10093,9 @@ more compliant to the SQL-92 standard):
...
@@ -10093,9 +10093,9 @@ more compliant to the SQL-92 standard):
char(N), varchar(N), date and time.
char(N), varchar(N), date and time.
The following are aliases to existing postgres types:
The following are aliases to existing postgres types:
smallint -
>
int2
smallint -
>
int2
integer, int -
>
int4
integer, int -
>
int4
float, real -
>
float4
float, real -
>
float4
char(N) and varchar(N) are implemented as truncated text types. In
char(N) and varchar(N) are implemented as truncated text types. In
addition, char(N) does blank-padding.
addition, char(N) does blank-padding.
* single-quote (') is used for quoting string literals; '' (in addition to
* single-quote (') is used for quoting string literals; '' (in addition to
...
...
doc/src/sgml/rules.sgml
View file @
1e5eb160
<!-- $PostgreSQL: pgsql/doc/src/sgml/rules.sgml,v 1.3
7 2004/12/30 03:13:56 tgl
Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/rules.sgml,v 1.3
8 2005/01/22 22:06:27 momjian
Exp $ -->
<Chapter Id="rules">
<Chapter Id="rules">
<Title>The Rule System</Title>
<Title>The Rule System</Title>
...
@@ -1565,26 +1565,26 @@ UPDATE shoelace_data
...
@@ -1565,26 +1565,26 @@ UPDATE shoelace_data
<literallayout class="monospaced">
<literallayout class="monospaced">
Nested Loop
Nested Loop
-
>
Merge Join
-
>
Merge Join
-
>
Seq Scan
-
>
Seq Scan
-
>
Sort
-
>
Sort
-
>
Seq Scan on s
-
>
Seq Scan on s
-
>
Seq Scan
-
>
Seq Scan
-
>
Sort
-
>
Sort
-
>
Seq Scan on shoelace_arrive
-
>
Seq Scan on shoelace_arrive
-
>
Seq Scan on shoelace_data
-
>
Seq Scan on shoelace_data
</literallayout>
</literallayout>
while omitting the extra range table entry would result in a
while omitting the extra range table entry would result in a
<literallayout class="monospaced">
<literallayout class="monospaced">
Merge Join
Merge Join
-
>
Seq Scan
-
>
Seq Scan
-
>
Sort
-
>
Sort
-
>
Seq Scan on s
-
>
Seq Scan on s
-
>
Seq Scan
-
>
Seq Scan
-
>
Sort
-
>
Sort
-
>
Seq Scan on shoelace_arrive
-
>
Seq Scan on shoelace_arrive
</literallayout>
</literallayout>
which produces exactly the same entries in the log table. Thus,
which produces exactly the same entries in the log table. Thus,
...
@@ -1943,8 +1943,8 @@ DELETE FROM software WHERE computer.hostname = 'mypc.local.net'
...
@@ -1943,8 +1943,8 @@ DELETE FROM software WHERE computer.hostname = 'mypc.local.net'
<literallayout class="monospaced">
<literallayout class="monospaced">
Nestloop
Nestloop
-
>
Index Scan using comp_hostidx on computer
-
>
Index Scan using comp_hostidx on computer
-
>
Index Scan using soft_hostidx on software
-
>
Index Scan using soft_hostidx on software
</literallayout>
</literallayout>
So there would be not that much difference in speed between
So there would be not that much difference in speed between
...
@@ -1973,9 +1973,9 @@ DELETE FROM software WHERE computer.hostname >= 'old' AND computer.hostname < 'o
...
@@ -1973,9 +1973,9 @@ DELETE FROM software WHERE computer.hostname >= 'old' AND computer.hostname < 'o
<literallayout class="monospaced">
<literallayout class="monospaced">
Hash Join
Hash Join
-
>
Seq Scan on software
-
>
Seq Scan on software
-
>
Hash
-
>
Hash
-
>
Index Scan using comp_hostidx on computer
-
>
Index Scan using comp_hostidx on computer
</literallayout>
</literallayout>
The other possible command is
The other possible command is
...
@@ -1989,8 +1989,8 @@ DELETE FROM computer WHERE hostname ~ '^old';
...
@@ -1989,8 +1989,8 @@ DELETE FROM computer WHERE hostname ~ '^old';
<literallayout class="monospaced">
<literallayout class="monospaced">
Nestloop
Nestloop
-
>
Index Scan using comp_hostidx on computer
-
>
Index Scan using comp_hostidx on computer
-
>
Index Scan using soft_hostidx on software
-
>
Index Scan using soft_hostidx on software
</literallayout>
</literallayout>
This shows, that the planner does not realize that the
This shows, that the planner does not realize that the
...
@@ -2030,8 +2030,8 @@ DELETE FROM software WHERE computer.manufacurer = 'bim'
...
@@ -2030,8 +2030,8 @@ DELETE FROM software WHERE computer.manufacurer = 'bim'
<ProgramListing>
<ProgramListing>
Nestloop
Nestloop
-
>
Index Scan using comp_manufidx on computer
-
>
Index Scan using comp_manufidx on computer
-
>
Index Scan using soft_hostidx on software
-
>
Index Scan using soft_hostidx on software
</ProgramListing>
</ProgramListing>
In any of these cases, the extra commands from the rule system
In any of these cases, the extra commands from the rule system
...
...
doc/src/sgml/spi.sgml
View file @
1e5eb160
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.3
7 2004/12/30 21:45:37 tgl
Exp $
$PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.3
8 2005/01/22 22:06:27 momjian
Exp $
-->
-->
<chapter id="spi">
<chapter id="spi">
...
@@ -2931,19 +2931,19 @@ execq(text *sql, int cnt)
...
@@ -2931,19 +2931,19 @@ execq(text *sql, int cnt)
*/
*/
if (ret == SPI_OK_SELECT && SPI_processed > 0)
if (ret == SPI_OK_SELECT && SPI_processed > 0)
{
{
TupleDesc tupdesc = SPI_tuptable-
>
tupdesc;
TupleDesc tupdesc = SPI_tuptable-
>
tupdesc;
SPITupleTable *tuptable = SPI_tuptable;
SPITupleTable *tuptable = SPI_tuptable;
char buf[8192];
char buf[8192];
int i, j;
int i, j;
for (j = 0; j < proc; j++)
for (j = 0; j < proc; j++)
{
{
HeapTuple tuple = tuptable-
>
vals[j];
HeapTuple tuple = tuptable-
>
vals[j];
for (i = 1, buf[0] = 0; i <= tupdesc-
>
natts; i++)
for (i = 1, buf[0] = 0; i <= tupdesc-
>
natts; i++)
snprintf(buf + strlen (buf), sizeof(buf) - strlen(buf), " %s%s",
snprintf(buf + strlen (buf), sizeof(buf) - strlen(buf), " %s%s",
SPI_getvalue(tuple, tupdesc, i),
SPI_getvalue(tuple, tupdesc, i),
(i == tupdesc-
>
natts) ? " " : " |");
(i == tupdesc-
>
natts) ? " " : " |");
elog (INFO, "EXECQ: %s", buf);
elog (INFO, "EXECQ: %s", buf);
}
}
}
}
...
...
doc/src/sgml/trigger.sgml
View file @
1e5eb160
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/trigger.sgml,v 1.
39 2004/12/30 03:13:56 tgl
Exp $
$PostgreSQL: pgsql/doc/src/sgml/trigger.sgml,v 1.
40 2005/01/22 22:06:27 momjian
Exp $
-->
-->
<chapter id="triggers">
<chapter id="triggers">
...
@@ -271,10 +271,10 @@ CALLED_AS_TRIGGER(fcinfo)
...
@@ -271,10 +271,10 @@ CALLED_AS_TRIGGER(fcinfo)
</programlisting>
</programlisting>
which expands to
which expands to
<programlisting>
<programlisting>
((fcinfo)-
>context != NULL && IsA((fcinfo)->
context, TriggerData))
((fcinfo)-
>context != NULL && IsA((fcinfo)->
context, TriggerData))
</programlisting>
</programlisting>
If this returns true, then it is safe to cast
If this returns true, then it is safe to cast
<literal>fcinfo-
>
context</> to type <literal>TriggerData
<literal>fcinfo-
>
context</> to type <literal>TriggerData
*</literal> and make use of the pointed-to
*</literal> and make use of the pointed-to
<structname>TriggerData</> structure. The function must
<structname>TriggerData</> structure. The function must
<emphasis>not</emphasis> alter the <structname>TriggerData</>
<emphasis>not</emphasis> alter the <structname>TriggerData</>
...
@@ -393,8 +393,8 @@ typedef struct TriggerData
...
@@ -393,8 +393,8 @@ typedef struct TriggerData
A pointer to a structure describing the relation that the trigger fired for.
A pointer to a structure describing the relation that the trigger fired for.
Look at <filename>utils/rel.h</> for details about
Look at <filename>utils/rel.h</> for details about
this structure. The most interesting things are
this structure. The most interesting things are
<literal>tg_relation-
>
rd_att</> (descriptor of the relation
<literal>tg_relation-
>
rd_att</> (descriptor of the relation
tuples) and <literal>tg_relation-
>rd_rel->
relname</>
tuples) and <literal>tg_relation-
>rd_rel->
relname</>
(relation name; the type is not <type>char*</> but
(relation name; the type is not <type>char*</> but
<type>NameData</>; use
<type>NameData</>; use
<literal>SPI_getrelname(tg_relation)</> to get a <type>char*</> if you
<literal>SPI_getrelname(tg_relation)</> to get a <type>char*</> if you
...
@@ -541,7 +541,7 @@ PG_FUNCTION_INFO_V1(trigf);
...
@@ -541,7 +541,7 @@ PG_FUNCTION_INFO_V1(trigf);
Datum
Datum
trigf(PG_FUNCTION_ARGS)
trigf(PG_FUNCTION_ARGS)
{
{
TriggerData *trigdata = (TriggerData *) fcinfo-
>
context;
TriggerData *trigdata = (TriggerData *) fcinfo-
>
context;
TupleDesc tupdesc;
TupleDesc tupdesc;
HeapTuple rettuple;
HeapTuple rettuple;
char *when;
char *when;
...
@@ -554,22 +554,22 @@ trigf(PG_FUNCTION_ARGS)
...
@@ -554,22 +554,22 @@ trigf(PG_FUNCTION_ARGS)
elog(ERROR, "trigf: not called by trigger manager");
elog(ERROR, "trigf: not called by trigger manager");
/* tuple to return to executor */
/* tuple to return to executor */
if (TRIGGER_FIRED_BY_UPDATE(trigdata-
>
tg_event))
if (TRIGGER_FIRED_BY_UPDATE(trigdata-
>
tg_event))
rettuple = trigdata-
>
tg_newtuple;
rettuple = trigdata-
>
tg_newtuple;
else
else
rettuple = trigdata-
>
tg_trigtuple;
rettuple = trigdata-
>
tg_trigtuple;
/* check for null values */
/* check for null values */
if (!TRIGGER_FIRED_BY_DELETE(trigdata-
>
tg_event)
if (!TRIGGER_FIRED_BY_DELETE(trigdata-
>
tg_event)
&& TRIGGER_FIRED_BEFORE(trigdata-
>
tg_event))
&& TRIGGER_FIRED_BEFORE(trigdata-
>
tg_event))
checknull = true;
checknull = true;
if (TRIGGER_FIRED_BEFORE(trigdata-
>
tg_event))
if (TRIGGER_FIRED_BEFORE(trigdata-
>
tg_event))
when = "before";
when = "before";
else
else
when = "after ";
when = "after ";
tupdesc = trigdata-
>tg_relation->
rd_att;
tupdesc = trigdata-
>tg_relation->
rd_att;
/* connect to SPI manager */
/* connect to SPI manager */
if ((ret = SPI_connect()) < 0)
if ((ret = SPI_connect()) < 0)
...
@@ -582,8 +582,8 @@ trigf(PG_FUNCTION_ARGS)
...
@@ -582,8 +582,8 @@ trigf(PG_FUNCTION_ARGS)
elog(NOTICE, "trigf (fired %s): SPI_exec returned %d", when, ret);
elog(NOTICE, "trigf (fired %s): SPI_exec returned %d", when, ret);
/* count(*) returns int8, so be careful to convert */
/* count(*) returns int8, so be careful to convert */
i = DatumGetInt64(SPI_getbinval(SPI_tuptable-
>
vals[0],
i = DatumGetInt64(SPI_getbinval(SPI_tuptable-
>
vals[0],
SPI_tuptable-
>
tupdesc,
SPI_tuptable-
>
tupdesc,
1,
1,
&isnull));
&isnull));
...
...
doc/src/sgml/xfunc.sgml
View file @
1e5eb160
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.9
6 2005/01/14 21:46:09 jurka
Exp $
$PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.9
7 2005/01/22 22:06:27 momjian
Exp $
-->
-->
<sect1 id="xfunc">
<sect1 id="xfunc">
...
@@ -1482,8 +1482,8 @@ makepoint(Point *pointx, Point *pointy)
...
@@ -1482,8 +1482,8 @@ makepoint(Point *pointx, Point *pointy)
{
{
Point *new_point = (Point *) palloc(sizeof(Point));
Point *new_point = (Point *) palloc(sizeof(Point));
new_point-
>x = pointx->
x;
new_point-
>x = pointx->
x;
new_point-
>y = pointy->
y;
new_point-
>y = pointy->
y;
return new_point;
return new_point;
}
}
...
@@ -1665,8 +1665,8 @@ makepoint(PG_FUNCTION_ARGS)
...
@@ -1665,8 +1665,8 @@ makepoint(PG_FUNCTION_ARGS)
Point *pointy = PG_GETARG_POINT_P(1);
Point *pointy = PG_GETARG_POINT_P(1);
Point *new_point = (Point *) palloc(sizeof(Point));
Point *new_point = (Point *) palloc(sizeof(Point));
new_point-
>x = pointx->
x;
new_point-
>x = pointx->
x;
new_point-
>y = pointy->
y;
new_point-
>y = pointy->
y;
PG_RETURN_POINT_P(new_point);
PG_RETURN_POINT_P(new_point);
}
}
...
@@ -2447,7 +2447,7 @@ my_set_returning_function(PG_FUNCTION_ARGS)
...
@@ -2447,7 +2447,7 @@ my_set_returning_function(PG_FUNCTION_ARGS)
if (SRF_IS_FIRSTCALL())
if (SRF_IS_FIRSTCALL())
{
{
funcctx = SRF_FIRSTCALL_INIT();
funcctx = SRF_FIRSTCALL_INIT();
oldcontext = MemoryContextSwitchTo(funcctx-
>
multi_call_memory_ctx);
oldcontext = MemoryContextSwitchTo(funcctx-
>
multi_call_memory_ctx);
/* One-time setup code appears here: */
/* One-time setup code appears here: */
<replaceable>user code</replaceable>
<replaceable>user code</replaceable>
<replaceable>if returning composite</replaceable>
<replaceable>if returning composite</replaceable>
...
@@ -2503,7 +2503,7 @@ testpassbyval(PG_FUNCTION_ARGS)
...
@@ -2503,7 +2503,7 @@ testpassbyval(PG_FUNCTION_ARGS)
funcctx = SRF_FIRSTCALL_INIT();
funcctx = SRF_FIRSTCALL_INIT();
/* switch to memory context appropriate for multiple function calls */
/* switch to memory context appropriate for multiple function calls */
oldcontext = MemoryContextSwitchTo(funcctx-
>
multi_call_memory_ctx);
oldcontext = MemoryContextSwitchTo(funcctx-
>
multi_call_memory_ctx);
/* total number of tuples to be returned */
/* total number of tuples to be returned */
funcctx->max_calls = PG_GETARG_UINT32(0);
funcctx->max_calls = PG_GETARG_UINT32(0);
...
...
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