~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/html/server-programming.html

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
2
<HTML
 
3
><HEAD
 
4
><TITLE
 
5
>Server Programming</TITLE
 
6
><META
 
7
NAME="GENERATOR"
 
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
 
9
REV="MADE"
 
10
HREF="mailto:pgsql-docs@postgresql.org"><LINK
 
11
REL="HOME"
 
12
TITLE="PostgreSQL 9.1beta1 Documentation"
 
13
HREF="index.html"><LINK
 
14
REL="PREVIOUS"
 
15
TITLE="views"
 
16
HREF="infoschema-views.html"><LINK
 
17
REL="NEXT"
 
18
TITLE="Extending SQL"
 
19
HREF="extend.html"><LINK
 
20
REL="STYLESHEET"
 
21
TYPE="text/css"
 
22
HREF="stylesheet.css"><META
 
23
HTTP-EQUIV="Content-Type"
 
24
CONTENT="text/html; charset=ISO-8859-1"><META
 
25
NAME="creation"
 
26
CONTENT="2011-04-27T21:20:33"></HEAD
 
27
><BODY
 
28
CLASS="PART"
 
29
><DIV
 
30
CLASS="NAVHEADER"
 
31
><TABLE
 
32
SUMMARY="Header navigation table"
 
33
WIDTH="100%"
 
34
BORDER="0"
 
35
CELLPADDING="0"
 
36
CELLSPACING="0"
 
37
><TR
 
38
><TH
 
39
COLSPAN="5"
 
40
ALIGN="center"
 
41
VALIGN="bottom"
 
42
><A
 
43
HREF="index.html"
 
44
>PostgreSQL 9.1beta1 Documentation</A
 
45
></TH
 
46
></TR
 
47
><TR
 
48
><TD
 
49
WIDTH="10%"
 
50
ALIGN="left"
 
51
VALIGN="top"
 
52
><A
 
53
TITLE="views"
 
54
HREF="infoschema-views.html"
 
55
ACCESSKEY="P"
 
56
>Prev</A
 
57
></TD
 
58
><TD
 
59
WIDTH="10%"
 
60
ALIGN="left"
 
61
VALIGN="top"
 
62
><A
 
63
TITLE="Client Interfaces"
 
64
HREF="client-interfaces.html"
 
65
>Fast Backward</A
 
66
></TD
 
67
><TD
 
68
WIDTH="60%"
 
69
ALIGN="center"
 
70
VALIGN="bottom"
 
71
></TD
 
72
><TD
 
73
WIDTH="10%"
 
74
ALIGN="right"
 
75
VALIGN="top"
 
76
><A
 
77
TITLE="Reference"
 
78
HREF="reference.html"
 
79
>Fast Forward</A
 
80
></TD
 
81
><TD
 
82
WIDTH="10%"
 
83
ALIGN="right"
 
84
VALIGN="top"
 
85
><A
 
86
TITLE="Extending SQL"
 
87
HREF="extend.html"
 
88
ACCESSKEY="N"
 
89
>Next</A
 
90
></TD
 
91
></TR
 
92
></TABLE
 
93
><HR
 
94
ALIGN="LEFT"
 
95
WIDTH="100%"></DIV
 
96
><DIV
 
97
CLASS="PART"
 
98
><A
 
99
NAME="SERVER-PROGRAMMING"
 
100
></A
 
101
><DIV
 
102
CLASS="TITLEPAGE"
 
103
><H1
 
104
CLASS="TITLE"
 
105
>V. Server Programming</H1
 
106
><DIV
 
107
CLASS="PARTINTRO"
 
108
><A
 
109
NAME="AEN49384"
 
110
></A
 
111
><P
 
112
>    This part is about extending the server functionality with
 
113
    user-defined functions, data types, triggers, etc.  These are
 
114
    advanced topics which should probably be approached only after all
 
115
    the other user documentation about <SPAN
 
116
CLASS="PRODUCTNAME"
 
117
>PostgreSQL</SPAN
 
118
> has
 
119
    been understood.  Later chapters in this part describe the server-side
 
120
    programming languages available in the
 
121
    <SPAN
 
122
CLASS="PRODUCTNAME"
 
123
>PostgreSQL</SPAN
 
124
> distribution as well as
 
125
    general issues concerning server-side programming languages.  It
 
126
    is essential to read at least the earlier sections of <A
 
127
HREF="extend.html"
 
128
>Chapter 35</A
 
129
> (covering functions) before diving into the
 
130
    material about server-side programming languages.
 
131
   </P
 
132
></DIV
 
133
><DIV
 
134
CLASS="TOC"
 
135
><DL
 
136
><DT
 
137
><B
 
138
>Table of Contents</B
 
139
></DT
 
140
><DT
 
141
>35. <A
 
142
HREF="extend.html"
 
143
>Extending <ACRONYM
 
144
CLASS="ACRONYM"
 
145
>SQL</ACRONYM
 
146
></A
 
147
></DT
 
148
><DD
 
149
><DL
 
150
><DT
 
151
>35.1. <A
 
152
HREF="extend-how.html"
 
153
>How Extensibility Works</A
 
154
></DT
 
155
><DT
 
156
>35.2. <A
 
157
HREF="extend-type-system.html"
 
158
>The <SPAN
 
159
CLASS="PRODUCTNAME"
 
160
>PostgreSQL</SPAN
 
161
> Type System</A
 
162
></DT
 
163
><DT
 
164
>35.3. <A
 
165
HREF="xfunc.html"
 
166
>User-defined Functions</A
 
167
></DT
 
168
><DT
 
169
>35.4. <A
 
170
HREF="xfunc-sql.html"
 
171
>Query Language (<ACRONYM
 
172
CLASS="ACRONYM"
 
173
>SQL</ACRONYM
 
174
>) Functions</A
 
175
></DT
 
176
><DT
 
177
>35.5. <A
 
178
HREF="xfunc-overload.html"
 
179
>Function Overloading</A
 
180
></DT
 
181
><DT
 
182
>35.6. <A
 
183
HREF="xfunc-volatility.html"
 
184
>Function Volatility Categories</A
 
185
></DT
 
186
><DT
 
187
>35.7. <A
 
188
HREF="xfunc-pl.html"
 
189
>Procedural Language Functions</A
 
190
></DT
 
191
><DT
 
192
>35.8. <A
 
193
HREF="xfunc-internal.html"
 
194
>Internal Functions</A
 
195
></DT
 
196
><DT
 
197
>35.9. <A
 
198
HREF="xfunc-c.html"
 
199
>C-Language Functions</A
 
200
></DT
 
201
><DT
 
202
>35.10. <A
 
203
HREF="xaggr.html"
 
204
>User-defined Aggregates</A
 
205
></DT
 
206
><DT
 
207
>35.11. <A
 
208
HREF="xtypes.html"
 
209
>User-defined Types</A
 
210
></DT
 
211
><DT
 
212
>35.12. <A
 
213
HREF="xoper.html"
 
214
>User-defined Operators</A
 
215
></DT
 
216
><DT
 
217
>35.13. <A
 
218
HREF="xoper-optimization.html"
 
219
>Operator Optimization Information</A
 
220
></DT
 
221
><DT
 
222
>35.14. <A
 
223
HREF="xindex.html"
 
224
>Interfacing Extensions To Indexes</A
 
225
></DT
 
226
><DT
 
227
>35.15. <A
 
228
HREF="extend-extensions.html"
 
229
>Packaging Related Objects into an Extension</A
 
230
></DT
 
231
><DT
 
232
>35.16. <A
 
233
HREF="extend-pgxs.html"
 
234
>Extension Building Infrastructure</A
 
235
></DT
 
236
></DL
 
237
></DD
 
238
><DT
 
239
>36. <A
 
240
HREF="triggers.html"
 
241
>Triggers</A
 
242
></DT
 
243
><DD
 
244
><DL
 
245
><DT
 
246
>36.1. <A
 
247
HREF="trigger-definition.html"
 
248
>Overview of Trigger Behavior</A
 
249
></DT
 
250
><DT
 
251
>36.2. <A
 
252
HREF="trigger-datachanges.html"
 
253
>Visibility of Data Changes</A
 
254
></DT
 
255
><DT
 
256
>36.3. <A
 
257
HREF="trigger-interface.html"
 
258
>Writing Trigger Functions in C</A
 
259
></DT
 
260
><DT
 
261
>36.4. <A
 
262
HREF="trigger-example.html"
 
263
>A Complete Trigger Example</A
 
264
></DT
 
265
></DL
 
266
></DD
 
267
><DT
 
268
>37. <A
 
269
HREF="rules.html"
 
270
>The Rule System</A
 
271
></DT
 
272
><DD
 
273
><DL
 
274
><DT
 
275
>37.1. <A
 
276
HREF="querytree.html"
 
277
>The Query Tree</A
 
278
></DT
 
279
><DT
 
280
>37.2. <A
 
281
HREF="rules-views.html"
 
282
>Views and the Rule System</A
 
283
></DT
 
284
><DT
 
285
>37.3. <A
 
286
HREF="rules-update.html"
 
287
>Rules on <TT
 
288
CLASS="COMMAND"
 
289
>INSERT</TT
 
290
>, <TT
 
291
CLASS="COMMAND"
 
292
>UPDATE</TT
 
293
>, and <TT
 
294
CLASS="COMMAND"
 
295
>DELETE</TT
 
296
></A
 
297
></DT
 
298
><DT
 
299
>37.4. <A
 
300
HREF="rules-privileges.html"
 
301
>Rules and Privileges</A
 
302
></DT
 
303
><DT
 
304
>37.5. <A
 
305
HREF="rules-status.html"
 
306
>Rules and Command Status</A
 
307
></DT
 
308
><DT
 
309
>37.6. <A
 
310
HREF="rules-triggers.html"
 
311
>Rules Versus Triggers</A
 
312
></DT
 
313
></DL
 
314
></DD
 
315
><DT
 
316
>38. <A
 
317
HREF="xplang.html"
 
318
>Procedural Languages</A
 
319
></DT
 
320
><DD
 
321
><DL
 
322
><DT
 
323
>38.1. <A
 
324
HREF="xplang-install.html"
 
325
>Installing Procedural Languages</A
 
326
></DT
 
327
></DL
 
328
></DD
 
329
><DT
 
330
>39. <A
 
331
HREF="plpgsql.html"
 
332
><SPAN
 
333
CLASS="APPLICATION"
 
334
>PL/pgSQL</SPAN
 
335
> - <ACRONYM
 
336
CLASS="ACRONYM"
 
337
>SQL</ACRONYM
 
338
> Procedural Language</A
 
339
></DT
 
340
><DD
 
341
><DL
 
342
><DT
 
343
>39.1. <A
 
344
HREF="plpgsql-overview.html"
 
345
>Overview</A
 
346
></DT
 
347
><DT
 
348
>39.2. <A
 
349
HREF="plpgsql-structure.html"
 
350
>Structure of <SPAN
 
351
CLASS="APPLICATION"
 
352
>PL/pgSQL</SPAN
 
353
></A
 
354
></DT
 
355
><DT
 
356
>39.3. <A
 
357
HREF="plpgsql-declarations.html"
 
358
>Declarations</A
 
359
></DT
 
360
><DT
 
361
>39.4. <A
 
362
HREF="plpgsql-expressions.html"
 
363
>Expressions</A
 
364
></DT
 
365
><DT
 
366
>39.5. <A
 
367
HREF="plpgsql-statements.html"
 
368
>Basic Statements</A
 
369
></DT
 
370
><DT
 
371
>39.6. <A
 
372
HREF="plpgsql-control-structures.html"
 
373
>Control Structures</A
 
374
></DT
 
375
><DT
 
376
>39.7. <A
 
377
HREF="plpgsql-cursors.html"
 
378
>Cursors</A
 
379
></DT
 
380
><DT
 
381
>39.8. <A
 
382
HREF="plpgsql-errors-and-messages.html"
 
383
>Errors and Messages</A
 
384
></DT
 
385
><DT
 
386
>39.9. <A
 
387
HREF="plpgsql-trigger.html"
 
388
>Trigger Procedures</A
 
389
></DT
 
390
><DT
 
391
>39.10. <A
 
392
HREF="plpgsql-implementation.html"
 
393
><SPAN
 
394
CLASS="APPLICATION"
 
395
>PL/pgSQL</SPAN
 
396
> Under the Hood</A
 
397
></DT
 
398
><DT
 
399
>39.11. <A
 
400
HREF="plpgsql-development-tips.html"
 
401
>Tips for Developing in <SPAN
 
402
CLASS="APPLICATION"
 
403
>PL/pgSQL</SPAN
 
404
></A
 
405
></DT
 
406
><DT
 
407
>39.12. <A
 
408
HREF="plpgsql-porting.html"
 
409
>Porting from <SPAN
 
410
CLASS="PRODUCTNAME"
 
411
>Oracle</SPAN
 
412
> PL/SQL</A
 
413
></DT
 
414
></DL
 
415
></DD
 
416
><DT
 
417
>40. <A
 
418
HREF="pltcl.html"
 
419
>PL/Tcl - Tcl Procedural Language</A
 
420
></DT
 
421
><DD
 
422
><DL
 
423
><DT
 
424
>40.1. <A
 
425
HREF="pltcl-overview.html"
 
426
>Overview</A
 
427
></DT
 
428
><DT
 
429
>40.2. <A
 
430
HREF="pltcl-functions.html"
 
431
>PL/Tcl Functions and Arguments</A
 
432
></DT
 
433
><DT
 
434
>40.3. <A
 
435
HREF="pltcl-data.html"
 
436
>Data Values in PL/Tcl</A
 
437
></DT
 
438
><DT
 
439
>40.4. <A
 
440
HREF="pltcl-global.html"
 
441
>Global Data in PL/Tcl</A
 
442
></DT
 
443
><DT
 
444
>40.5. <A
 
445
HREF="pltcl-dbaccess.html"
 
446
>Database Access from PL/Tcl</A
 
447
></DT
 
448
><DT
 
449
>40.6. <A
 
450
HREF="pltcl-trigger.html"
 
451
>Trigger Procedures in PL/Tcl</A
 
452
></DT
 
453
><DT
 
454
>40.7. <A
 
455
HREF="pltcl-unknown.html"
 
456
>Modules and the <CODE
 
457
CLASS="FUNCTION"
 
458
>unknown</CODE
 
459
> Command</A
 
460
></DT
 
461
><DT
 
462
>40.8. <A
 
463
HREF="pltcl-procnames.html"
 
464
>Tcl Procedure Names</A
 
465
></DT
 
466
></DL
 
467
></DD
 
468
><DT
 
469
>41. <A
 
470
HREF="plperl.html"
 
471
>PL/Perl - Perl Procedural Language</A
 
472
></DT
 
473
><DD
 
474
><DL
 
475
><DT
 
476
>41.1. <A
 
477
HREF="plperl-funcs.html"
 
478
>PL/Perl Functions and Arguments</A
 
479
></DT
 
480
><DT
 
481
>41.2. <A
 
482
HREF="plperl-data.html"
 
483
>Data Values in PL/Perl</A
 
484
></DT
 
485
><DT
 
486
>41.3. <A
 
487
HREF="plperl-builtins.html"
 
488
>Built-in Functions</A
 
489
></DT
 
490
><DT
 
491
>41.4. <A
 
492
HREF="plperl-global.html"
 
493
>Global Values in PL/Perl</A
 
494
></DT
 
495
><DT
 
496
>41.5. <A
 
497
HREF="plperl-trusted.html"
 
498
>Trusted and Untrusted PL/Perl</A
 
499
></DT
 
500
><DT
 
501
>41.6. <A
 
502
HREF="plperl-triggers.html"
 
503
>PL/Perl Triggers</A
 
504
></DT
 
505
><DT
 
506
>41.7. <A
 
507
HREF="plperl-under-the-hood.html"
 
508
>PL/Perl Under the Hood</A
 
509
></DT
 
510
></DL
 
511
></DD
 
512
><DT
 
513
>42. <A
 
514
HREF="plpython.html"
 
515
>PL/Python - Python Procedural Language</A
 
516
></DT
 
517
><DD
 
518
><DL
 
519
><DT
 
520
>42.1. <A
 
521
HREF="plpython-python23.html"
 
522
>Python 2 vs. Python 3</A
 
523
></DT
 
524
><DT
 
525
>42.2. <A
 
526
HREF="plpython-funcs.html"
 
527
>PL/Python Functions</A
 
528
></DT
 
529
><DT
 
530
>42.3. <A
 
531
HREF="plpython-data.html"
 
532
>Data Values</A
 
533
></DT
 
534
><DT
 
535
>42.4. <A
 
536
HREF="plpython-sharing.html"
 
537
>Sharing Data</A
 
538
></DT
 
539
><DT
 
540
>42.5. <A
 
541
HREF="plpython-do.html"
 
542
>Anonymous Code Blocks</A
 
543
></DT
 
544
><DT
 
545
>42.6. <A
 
546
HREF="plpython-trigger.html"
 
547
>Trigger Functions</A
 
548
></DT
 
549
><DT
 
550
>42.7. <A
 
551
HREF="plpython-database.html"
 
552
>Database Access</A
 
553
></DT
 
554
><DT
 
555
>42.8. <A
 
556
HREF="plpython-subtransaction.html"
 
557
>Explicit Subtransactions</A
 
558
></DT
 
559
><DT
 
560
>42.9. <A
 
561
HREF="plpython-util.html"
 
562
>Utility Functions</A
 
563
></DT
 
564
><DT
 
565
>42.10. <A
 
566
HREF="plpython-envar.html"
 
567
>Environment Variables</A
 
568
></DT
 
569
></DL
 
570
></DD
 
571
><DT
 
572
>43. <A
 
573
HREF="spi.html"
 
574
>Server Programming Interface</A
 
575
></DT
 
576
><DD
 
577
><DL
 
578
><DT
 
579
>43.1. <A
 
580
HREF="spi-interface.html"
 
581
>Interface Functions</A
 
582
></DT
 
583
><DT
 
584
>43.2. <A
 
585
HREF="spi-interface-support.html"
 
586
>Interface Support Functions</A
 
587
></DT
 
588
><DT
 
589
>43.3. <A
 
590
HREF="spi-memory.html"
 
591
>Memory Management</A
 
592
></DT
 
593
><DT
 
594
>43.4. <A
 
595
HREF="spi-visibility.html"
 
596
>Visibility of Data Changes</A
 
597
></DT
 
598
><DT
 
599
>43.5. <A
 
600
HREF="spi-examples.html"
 
601
>Examples</A
 
602
></DT
 
603
></DL
 
604
></DD
 
605
></DL
 
606
></DIV
 
607
></DIV
 
608
></DIV
 
609
><DIV
 
610
CLASS="NAVFOOTER"
 
611
><HR
 
612
ALIGN="LEFT"
 
613
WIDTH="100%"><TABLE
 
614
SUMMARY="Footer navigation table"
 
615
WIDTH="100%"
 
616
BORDER="0"
 
617
CELLPADDING="0"
 
618
CELLSPACING="0"
 
619
><TR
 
620
><TD
 
621
WIDTH="33%"
 
622
ALIGN="left"
 
623
VALIGN="top"
 
624
><A
 
625
HREF="infoschema-views.html"
 
626
ACCESSKEY="P"
 
627
>Prev</A
 
628
></TD
 
629
><TD
 
630
WIDTH="34%"
 
631
ALIGN="center"
 
632
VALIGN="top"
 
633
><A
 
634
HREF="index.html"
 
635
ACCESSKEY="H"
 
636
>Home</A
 
637
></TD
 
638
><TD
 
639
WIDTH="33%"
 
640
ALIGN="right"
 
641
VALIGN="top"
 
642
><A
 
643
HREF="extend.html"
 
644
ACCESSKEY="N"
 
645
>Next</A
 
646
></TD
 
647
></TR
 
648
><TR
 
649
><TD
 
650
WIDTH="33%"
 
651
ALIGN="left"
 
652
VALIGN="top"
 
653
><TT
 
654
CLASS="LITERAL"
 
655
>views</TT
 
656
></TD
 
657
><TD
 
658
WIDTH="34%"
 
659
ALIGN="center"
 
660
VALIGN="top"
 
661
>&nbsp;</TD
 
662
><TD
 
663
WIDTH="33%"
 
664
ALIGN="right"
 
665
VALIGN="top"
 
666
>Extending <ACRONYM
 
667
CLASS="ACRONYM"
 
668
>SQL</ACRONYM
 
669
></TD
 
670
></TR
 
671
></TABLE
 
672
></DIV
 
673
></BODY
 
674
></HTML
 
675
>
 
 
b'\\ No newline at end of file'