PostgreSQL

Скачать в pdf «PostgreSQL»


You are pfree’ing something that was not palloc’ed. Beware of mixing malloc/free and palloc/pfree,


5.3)    How can I contribute some nifty new types and functions to POSTGRESQL?


Send your extensions to the pgsql-hackers mailing list, and they will eventually end up in the contrib/ subdirectory.


5.4)    How do I write a C function to return a tuple?


This requires wizardry so extreme that the authors have never tried it, though in principle it can be done.


5.5)    I have changed a source file. Why does the recompile not see the change?


The Makefiles do not have the proper dependencies for include files. You have to do a make clean and then another make.

Appendix В

Installation


Getting PostgreSQL


The PostgreSQL software is distributed in several formats:


•    Tar-gzipped file with a file extension of .tar.gz


•    Prepackaged file with a file extension of .rpm


•    Another prepackaged format


•    Cd-ROM


Because so many formats exist, this appendix will cover only the general steps needed to install PostgreSQL. Each distribution comes with an install or readme file with more specific instructions.


Creating the PostgreSQL User


It is best to create a separate user to own the PostgreSQL files and processes that will be installed. The user name is typically postgres.


Configuration


Many distributions use a configure command that allows users to choose various options before compiling and installing the software.


Compilation


PostgreSQL is usually distributed in source code format. As a consequence, C source code must be compiled into a format that is understood by the CPU. This process is usually handled by a compiler, often called cc or gee. Several distribution formats automatically perform these steps for the user.

Скачать в pdf «PostgreSQL»