|
1 | 1 |
|
2 | 2 | Frequently Asked Questions (FAQ) for PostgreSQL |
3 | 3 |
|
4 | | - Last updated: Sat Jan 29 23:25:05 EST 2005 |
| 4 | + Last updated: Sat Jan 29 23:44:48 EST 2005 |
5 | 5 |
|
6 | 6 | Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us) |
7 | 7 |
|
|
481 | 481 | may not be duplicated. |
482 | 482 |
|
483 | 483 | If postmaster is running, start psql in one window, then find the PID |
484 | | - of the postgres process used by psql using |
485 | | -SELECT pg_backend_pid() |
486 | | - |
487 | | - . Use a debugger to attach to the postgres PID. You can set |
488 | | - breakpoints in the debugger and issue queries from psql. If you are |
489 | | - debugging postgres startup, you can set PGOPTIONS="-W n", then start |
490 | | - psql. This will cause startup to delay for n seconds so you can attach |
491 | | - to the process with the debugger, set any breakpoints, and continue |
492 | | - through the startup sequence. |
493 | | - |
494 | | - There are several |
495 | | -log_* |
496 | | - |
497 | | - server configuration variables that enable printing of process |
498 | | - statistics which can be very useful for debugging and performance |
499 | | - measurements. |
| 484 | + of the postgres process used by psql using SELECT pg_backend_pid(). |
| 485 | + Use a debugger to attach to the postgres PID. You can set breakpoints |
| 486 | + in the debugger and issue queries from psql. If you are debugging |
| 487 | + postgres startup, you can set PGOPTIONS="-W n", then start psql. This |
| 488 | + will cause startup to delay for n seconds so you can attach to the |
| 489 | + process with the debugger, set any breakpoints, and continue through |
| 490 | + the startup sequence. |
| 491 | + |
| 492 | + There are several log_* server configuration variables that enable |
| 493 | + printing of process statistics which can be very useful for debugging |
| 494 | + and performance measurements. |
500 | 495 |
|
501 | 496 | You can also compile with profiling to see what functions are taking |
502 | 497 | execution time. The backend profile files will be deposited in the |
@@ -725,11 +720,8 @@ log_* |
725 | 720 | section 4.10. |
726 | 721 | * The default C locale must be used during initdb because it is not |
727 | 722 | possible to know the next-greater character in a non-C locale. You |
728 | | - can create a special |
729 | | -text_pattern_ops |
730 | | - index for such cases that work only for |
731 | | -LIKE |
732 | | - indexing. |
| 723 | + can create a special text_pattern_ops index for such cases that |
| 724 | + work only for LIKE indexing. |
733 | 725 |
|
734 | 726 | In pre-8.0 releases, indexes often can not be used unless the data |
735 | 727 | types exactly match the index's column types. This is particularly |
@@ -919,7 +911,7 @@ BYTEA bytea variable-length byte array (null-byte safe) |
919 | 911 | 4.17) How do I create a column that will default to the current time? |
920 | 912 |
|
921 | 913 | Use CURRENT_TIMESTAMP: |
922 | | -CREATE TABLE test (x int, modtime timestamp DEFAULT CURRENT_TIMESTAMP ); |
| 914 | +CREATE TABLE test (x int, modtime timestamp DEFAULT CURRENT_TIMESTAMP ); |
923 | 915 |
|
924 | 916 | 4.18) How do I perform an outer join? |
925 | 917 |
|
|