Commit bf1dd3ec authored by Bruce Momjian's avatar Bruce Momjian

Update FAQ's for release.

parent bafe9e50
This diff is collapsed.
Developer's Frequently Asked Questions (FAQ) for PostgreSQL
Last updated: Fri Oct 2 15:21:32 EDT 1998
Last updated: Mon Feb 22 17:15:06 EST 1999
Current maintainer: Bruce Momjian (maillist@candle.pha.pa.us)
......@@ -67,7 +67,7 @@ s
Third, you need to get mkid from ftp.postgresql.org. By running
tools/make_mkid, an archive of source symbols can be created that can
be rapidly queried like grep or edited.
be rapidly queried like grep or edited. Others prefer glimpse.
make_diff has tools to create patch diff files that can be applied to
the distribution.
......@@ -105,22 +105,72 @@ s
We do this because this allows a consistent way to pass data inside
the backend in a flexible way. Every node has a NodeTag which
specifies what type of data is inside the Node. Lists are lists of
Nodes. lfirst(), lnext(), and foreach() are used to get, skip, and
traverse through Lists.
specifies what type of data is inside the Node. Lists are groups of
Nodes chained together as a forward-linked list.
Here are some of the List manipulation commands:
lfirst(i)
return the data at list element i.
lnext(i)
return the next list element after i.
foreach(i, list)
loop through list, assigning each list element to i. It is
important to note that i is a List *, not the data in the List
element. You need to use lfirst(i) to get at the data. Here is
a typical code snipped that loops through a List containing Var
*'s and processes each one:
List *i, *list;
foreach(i, list)
{
Var *var = lfirst(i);
/* process var here */
}
lcons(node, list)
add node to the front of list, or create a new list with node
if list is NIL.
lappend(list, node)
add node to the end of list. This is more expensive that lcons.
nconc(list1, list2)
Concat list2 on to the end of list1.
length(list)
return the length of the list.
nth(i, list)
return the i'th element in list.
lconsi, ...
There are integer versions of these: lconsi, lappendi, nthi.
List's containing integers instead of Node pointers are used to
hold list of relation object id's and other integer quantities.
You can print nodes easily inside gdb. First, to disable output
truncation:
truncation when you use the gdb print command:
(gdb) set print elements 0
You may then use either of the next two commands to print out List,
Node, and structure contents. The first prints in a short format, and
the second in a long format:
Instead of printing values in gdb format, you can use the next two
commands to print out List, Node, and structure contents in a verbose
format that is easier to understand. List's are unrolled into nodes,
and nodes are printed in detail. The first prints in a short format,
and the second in a long format:
(gdb) call print(any_pointer)
(gdb) call pprint(any_pointer)
The output appears in the postmaster log file, or on your screen if
you are running a backend directly without a postmaster.
5) How do I add a feature or fix a bug?
The source code is over 250,000 lines. Many problems/features are
......@@ -197,7 +247,7 @@ s
} NameData;
typedef NameData *Name;
Table, column, type, function, and view names that come in to the
Table, column, type, function, and view names that come into the
backend via user queries are stored as variable-length,
null-terminated character strings.
......@@ -244,12 +294,12 @@ s
While scans automatically lock/unlock rows from the buffer cache, with
heap_fetch(), you must pass a Buffer pointer, and ReleaseBuffer() it
when completed. Once you have the row, you can get data that is common
to all tuples, like t_ctid and t_oid, by mererly accessing the
to all tuples, like t_self and t_oid, by mererly accessing the
HeapTuple structure entries. If you need a table-specific column, you
should take the HeapTuple pointer, and use the GETSTRUCT() macro to
access the table-specific start of the tuple. You then cast the
pointer as a Form_pg_proc pointer if you are accessing the pg_proc
table, or TypeTupleForm if you are accessing pg_type. You can then
table, or Form_pg_type if you are accessing pg_type. You can then
access the columns by using a structure pointer:
((Form_pg_class) GETSTRUCT(tuple))->relnatts
......@@ -258,7 +308,7 @@ s
is to use heap_tuplemodify() and pass it your palloc'ed tuple, and the
values you want changed. It returns another palloc'ed tuple, which you
pass to heap_replace(). You can delete tuples by passing the tuple's
t_ctid to heap_destroy(). Remember, tuples can be either system cache
t_self to heap_destroy(). Remember, tuples can be either system cache
versions, which may go away soon after you get them, buffer cache
version, which will go away when you heap_getnext(), heap_endscan, or
ReleaseBuffer(), in the heap_fetch() case. Or it may be a palloc'ed
......
=======================================================
Frequently Asked Questions (FAQ) for PostgreSQL V6.4
HP-UX Specific
......
This diff is collapsed.
=======================================================
Frequently Asked Questions (FAQ) for PostgreSQL >= V6.1
Linux Specific
......@@ -46,7 +47,8 @@ Questions answered:
fails with a message like:
In file included from /usr/include/sys/sem.h:8,
from ipc.c:37:
/usr/include/asm/bitops.h:32: warning: no previous prototype for Set_bit'
/usr/include/asm/bitops.h:32: warning: no previous prototype for Set_bi
t'
....
make: *** [ipc.o] Error 1
1.17) When compiling postgres, gcc reports signal 11 and aborts.
......@@ -159,7 +161,8 @@ Section 1: Compiling PostgreSQL
RedHat now have a new ld.so RPM package on their FTP site.
Simply grab:
ftp://ftp.redhat.com/pub/redhat/devel/i386/RedHat/RPMS/ld.so-1.7.14-4.i386.rpm
ftp://ftp.redhat.com/pub/redhat/devel/i386/RedHat/RPMS/ld.so-1.
7.14-4.i386.rpm
Install the RPM file in the usual way and off you go!
......@@ -381,7 +384,7 @@ Section 1: Compiling PostgreSQL
1.15) [REDHAT] Can I get PostgreSQL as an RPM?
Yes! Michal Mosiewicz <mimo@lodz.pdi.net>
Yes! Michal Mosiewicz
(http://www.pdi.lodz.pl/~mimo) has kindly put together an RPM
for PostgreSQL V6.0 on Intel architectures which he has uploaded to
ftp://ftp.redhat.org/pub/Incoming/Postgres-6.0-1.i386.rpm
......@@ -393,7 +396,8 @@ Section 1: Compiling PostgreSQL
fails with a message like:
In file included from /usr/include/sys/sem.h:8,
from ipc.c:37:
/usr/include/asm/bitops.h:32: warning: no previous prototype for Set_bit'
/usr/include/asm/bitops.h:32: warning: no previous prototype for Set_bi
t'
....
make: *** [ipc.o] Error 1
......@@ -429,7 +433,7 @@ Section 1: Compiling PostgreSQL
1.18) Can I install 6.1.1 under MkLinux?
Tatsuo Ishii <t-ishii@sra.co.jp> has done this under
Tatsuo Ishii has done this under
MkLinux DR2.1 update2 after a small patch available from:
ftp://ftp.sra.co.jp/pub/cmd/postgres/6.1.1/mklinux.patch.gz
......@@ -620,7 +624,7 @@ Section 3: Runtime Problems
There's a sample file in contrib/linux/postgres.init
Here's another sample file supplied by John Robinson
<john@intelligent.co.uk> which you should modify as needed:
which you should modify as needed:
#!/bin/sh
#
......@@ -644,7 +648,8 @@ case "$1" in
echo -n "Starting postgres Postmaster daemon:"
if [ -z "`pidofproc postmaster`" ]
then
su postgres -c "/usr/local/pgsql/bin/postmaster -D /home/postgreSQL/data -p 5432 &"
su postgres -c "/usr/local/pgsql/bin/postmaster -D /home/postgr
eSQL/data -p 5432 &"
echo -n " postmaster"
else
echo -n " (already running)"
......@@ -673,7 +678,7 @@ exit 0
This is due to a bug in regression scripts which only happens
on linux boxes. There are two workarounds as far as I know
(information from Tatsuo Ishii <t-ishii@sra.co.jp>):
(information from Tatsuo Ishii ):
1. change following in regress.sh:
time postgres -texecutor -tplanner -Q bench < bench.sql
......@@ -682,7 +687,8 @@ exit 0
2. after running the test, remove a line at the very end of
bench.out something like:
85.86user 114.47system 4:49.20elapsed 69%CPU (0avgtext+0avgdata 0maxresident)k
85.86user 114.47system 4:49.20elapsed 69%CPU (0avgtext+0avgdata
0maxresident)k
then type:
sh ./perquery < bench.out > & bench.out.perquery
......@@ -693,8 +699,10 @@ exit 0
select '4 hours'::timespan;
returning '3 hours 59 minutes 60 seconds'?
You are running the new glibc2 libraries and have a version earlier than
2.0.7. It is a math rounding problem in the library. Upgrade your library.
You are running the new glibc2 libraries and have a version earlier tha
n
2.0.7. It is a math rounding problem in the library. Upgrade your libra
ry.
----------------------------------------------------------------------------
Dr. Andrew C.R. Martin University College London
EMAIL: (Work) martin@biochem.ucl.ac.uk (Home) andrew@stagleys.demon.co.uk
......
This diff is collapsed.
......@@ -280,6 +280,8 @@ Fix GROUP BY in INSERT INTO table SELECT * FROM table2(Jan)
Fix for computations in views(Jan)
Fix for aggregates on array indexes(Tom)
Fix for DEFAULT handles single quotes in value requiring too many quotes
Fix security problem with non-super users importing/exporting large objects(Tom)
Rollback of transaction that creates table cleaned up properly(Tom)
Enhancements
------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment