head	1.465;
access;
symbols
	REL7_4_29:1.238.2.10
	REL8_0_25:1.292.4.24
	REL8_1_21:1.362.2.15
	REL8_2_17:1.402.2.8
	REL8_3_11:1.450
	REL7_4_28:1.238.2.10
	REL8_0_24:1.292.4.24
	REL8_1_20:1.362.2.15
	REL8_2_16:1.402.2.8
	REL8_3_10:1.450
	REL7_4_27:1.238.2.10
	REL8_0_23:1.292.4.24
	REL8_1_19:1.362.2.15
	REL8_2_15:1.402.2.8
	REL8_3_9:1.450
	REL7_4_26:1.238.2.10
	REL8_0_22:1.292.4.24
	REL8_1_18:1.362.2.15
	REL8_2_14:1.402.2.8
	REL8_3_8:1.450
	REL7_4_25:1.238.2.10
	REL8_0_21:1.292.4.24
	REL8_1_17:1.362.2.15
	REL8_2_13:1.402.2.8
	REL8_3_7:1.450
	REL7_4_24:1.238.2.10
	REL8_0_20:1.292.4.24
	REL8_1_16:1.362.2.15
	REL8_2_12:1.402.2.8
	REL8_3_6:1.450
	REL7_4_23:1.238.2.10
	REL8_0_19:1.292.4.24
	REL8_1_15:1.362.2.15
	REL8_2_11:1.402.2.8
	REL8_3_5:1.450
	REL7_4_22:1.238.2.10
	REL8_0_18:1.292.4.24
	REL8_1_14:1.362.2.15
	REL8_2_10:1.402.2.8
	REL8_3_4:1.450
	REL7_4_21:1.238.2.10
	REL8_0_17:1.292.4.24
	REL8_1_13:1.362.2.15
	REL8_2_9:1.402.2.8
	REL8_3_3:1.450
	REL7_4_20:1.238.2.10
	REL8_0_16:1.292.4.24
	REL8_1_12:1.362.2.15
	REL8_2_8:1.402.2.8
	REL8_3_2:1.450
	REL8_2_7:1.402.2.8
	REL8_3_1:1.450
	REL8_3_STABLE:1.450.0.2
	REL8_3_0:1.450
	REL8_3_RC2:1.449
	REL7_3_21:1.193.2.11
	REL7_4_19:1.238.2.10
	REL8_0_15:1.292.4.24
	REL8_1_11:1.362.2.15
	REL8_2_6:1.402.2.8
	REL8_3_RC1:1.448
	REL8_3_BETA4:1.446
	REL8_3_BETA3:1.444
	REL8_3_BETA2:1.441
	REL8_3_BETA1:1.433
	REL7_3_20:1.193.2.11
	REL7_4_18:1.238.2.10
	REL8_0_14:1.292.4.24
	REL8_1_10:1.362.2.15
	REL8_2_5:1.402.2.8
	REL7_3_19:1.193.2.10
	REL7_4_17:1.238.2.9
	REL8_0_13:1.292.4.23
	REL8_1_9:1.362.2.14
	REL8_2_4:1.402.2.7
	REL8_0_12:1.292.4.22
	REL8_1_8:1.362.2.13
	REL8_2_3:1.402.2.6
	REL7_3_18:1.193.2.9
	REL7_4_16:1.238.2.8
	REL8_0_11:1.292.4.22
	REL8_1_7:1.362.2.13
	REL8_2_2:1.402.2.4
	REL8_0_10:1.292.4.22
	REL8_1_6:1.362.2.13
	REL8_2_1:1.402.2.3
	REL7_4_15:1.238.2.8
	REL7_3_17:1.193.2.9
	REL8_2_STABLE:1.402.0.2
	REL8_2_0:1.402
	REL8_2_RC1:1.401
	REL8_2_BETA3:1.399
	REL8_2_BETA2:1.399
	REL8_1_5:1.362.2.12
	REL8_0_9:1.292.4.21
	REL7_4_14:1.238.2.7
	REL7_3_16:1.193.2.8
	REL8_2_BETA1:1.397
	REL7_3_15:1.193.2.7
	REL7_4_13:1.238.2.6
	REL8_0_8:1.292.4.20
	REL8_1_4:1.362.2.10
	REL7_3_14:1.193.2.6
	REL7_4_12:1.238.2.5
	REL8_0_7:1.292.4.19
	REL8_1_3:1.362.2.4
	REL7_3_13:1.193.2.5
	REL7_4_11:1.238.2.4
	REL8_0_6:1.292.4.18
	REL8_1_2:1.362.2.3
	REL7_3_12:1.193.2.4
	REL7_4_10:1.238.2.3
	REL8_0_5:1.292.4.17
	REL8_1_1:1.362.2.2
	REL8_1_STABLE:1.362.0.2
	REL8_1_0:1.362
	REL8_1_0RC1:1.361
	REL8_1_0BETA4:1.361
	REL8_1_0BETA3:1.361
	REL7_3_11:1.193.2.4
	REL7_4_9:1.238.2.3
	REL8_0_4:1.292.4.14
	REL8_1_0BETA2:1.358
	REL8_1_0BETA1:1.356
	REL7_2_8:1.146.2.3
	REL7_3_10:1.193.2.4
	REL7_4_8:1.238.2.3
	REL8_0_3:1.292.4.12
	REL8_0_2:1.292.4.11
	REL7_2_7:1.146.2.3
	REL7_3_9:1.193.2.4
	REL7_4_7:1.238.2.3
	REL8_0_1:1.292.4.5
	REL8_0_STABLE:1.292.0.4
	REL8_0_0:1.292.0.2
	REL8_0_0RC5:1.286
	REL8_0_0RC4:1.284
	REL8_0_0RC3:1.281
	REL8_0_0RC2:1.278
	REL8_0_0RC1:1.273
	REL8_0_0BETA5:1.271
	REL8_0_0BETA4:1.269
	REL7_4_6:1.238.2.3
	REL7_3_8:1.193.2.4
	REL7_2_6:1.146.2.3
	REL8_0_0BETA3:1.269
	REL8_0_0BETA2:1.268
	REL7_2_5:1.146.2.3
	REL7_4_5:1.238.2.3
	REL7_3_7:1.193.2.4
	REL7_4_4:1.238.2.3
	REL8_0_0BETA1:1.265
	REL7_4_3:1.238.2.3
	REL7_4_2:1.238.2.3
	REL7_3_6:1.193.2.4
	REL7_4_1:1.238.2.3
	REL7_3_5:1.193.2.4
	REL7_4:1.238.2.2
	REL7_4_RC2:1.238
	REL7_4_STABLE:1.238.0.2
	REL7_4_RC1:1.238
	REL7_4_BETA5:1.237
	REL7_4_BETA4:1.232
	REL7_4_BETA3:1.232
	REL7_4_BETA2:1.225
	WIN32_DEV:1.225.0.2
	REL7_4_BETA1:1.225
	REL7_3_4:1.193.2.4
	REL7_3_2:1.193.2.2
	REL7_2_4:1.146.2.3
	REL7_3_STABLE:1.193.0.2
	REL7_2_3:1.146.2.3
	REL7_2_STABLE:1.146.0.2
	REL7_2:1.143
	REL7_2_RC2:1.140
	REL7_2_RC1:1.139
	REL7_2_BETA5:1.139
	REL7_2_BETA4:1.132
	REL7_2_BETA3:1.124
	REL7_2_BETA2:1.123
	REL7_2_BETA1:1.123
	REL7_1_2:1.104.2.1
	REL7_1_STABLE:1.104.0.2
	REL7_1_BETA:1.74
	REL7_1_BETA3:1.75
	REL7_1_BETA2:1.75
	REL7_1:1.101
	REL7_0_PATCHES:1.40.0.2
	REL7_0:1.40
	REL6_5_PATCHES:1.38.0.2
	REL6_5:1.38
	REL6_4:1.33.0.2
	release-6-3:1.29
	SUPPORT:1.1.1.1
	PG95-DIST:1.1.1;
locks; strict;
comment	@# @;


1.465
date	2009.04.07.21.20.49;	author momjian;	state dead;
branches;
next	1.464;

1.464
date	2009.01.01.17.23.32;	author momjian;	state Exp;
branches;
next	1.463;

1.463
date	2008.09.23.20.20.07;	author momjian;	state Exp;
branches;
next	1.462;

1.462
date	2008.08.23.01.55.35;	author momjian;	state Exp;
branches;
next	1.461;

1.461
date	2008.08.16.00.32.35;	author momjian;	state Exp;
branches;
next	1.460;

1.460
date	2008.06.26.03.54.28;	author momjian;	state Exp;
branches;
next	1.459;

1.459
date	2008.06.26.03.02.27;	author momjian;	state Exp;
branches;
next	1.458;

1.458
date	2008.04.25.14.34.26;	author momjian;	state Exp;
branches;
next	1.457;

1.457
date	2008.04.25.14.28.51;	author momjian;	state Exp;
branches;
next	1.456;

1.456
date	2008.04.24.19.58.31;	author momjian;	state Exp;
branches;
next	1.455;

1.455
date	2008.04.16.20.57.18;	author momjian;	state Exp;
branches;
next	1.454;

1.454
date	2008.04.09.01.04.08;	author momjian;	state Exp;
branches;
next	1.453;

1.453
date	2008.04.09.00.44.07;	author momjian;	state Exp;
branches;
next	1.452;

1.452
date	2008.03.03.16.22.55;	author momjian;	state Exp;
branches;
next	1.451;

1.451
date	2008.03.03.15.55.26;	author momjian;	state Exp;
branches;
next	1.450;

1.450
date	2008.02.01.02.55.41;	author momjian;	state Exp;
branches;
next	1.449;

1.449
date	2008.01.14.20.39.29;	author momjian;	state Exp;
branches;
next	1.448;

1.448
date	2008.01.01.19.45.45;	author momjian;	state Exp;
branches;
next	1.447;

1.447
date	2007.12.10.00.32.24;	author momjian;	state Exp;
branches;
next	1.446;

1.446
date	2007.11.16.15.53.57;	author momjian;	state Exp;
branches;
next	1.445;

1.445
date	2007.11.16.15.50.31;	author momjian;	state Exp;
branches;
next	1.444;

1.444
date	2007.11.14.03.39.53;	author momjian;	state Exp;
branches;
next	1.443;

1.443
date	2007.11.14.03.37.29;	author momjian;	state Exp;
branches;
next	1.442;

1.442
date	2007.10.29.17.22.20;	author momjian;	state Exp;
branches;
next	1.441;

1.441
date	2007.10.26.19.04.37;	author momjian;	state Exp;
branches;
next	1.440;

1.440
date	2007.10.17.17.34.51;	author momjian;	state Exp;
branches;
next	1.439;

1.439
date	2007.10.13.03.37.12;	author momjian;	state Exp;
branches;
next	1.438;

1.438
date	2007.10.09.20.13.11;	author momjian;	state Exp;
branches;
next	1.437;

1.437
date	2007.10.09.20.08.03;	author momjian;	state Exp;
branches;
next	1.436;

1.436
date	2007.10.09.19.55.36;	author momjian;	state Exp;
branches;
next	1.435;

1.435
date	2007.10.09.03.20.08;	author momjian;	state Exp;
branches;
next	1.434;

1.434
date	2007.10.09.01.28.24;	author momjian;	state Exp;
branches;
next	1.433;

1.433
date	2007.09.27.06.14.46;	author momjian;	state Exp;
branches;
next	1.432;

1.432
date	2007.09.26.20.36.50;	author momjian;	state Exp;
branches;
next	1.431;

1.431
date	2007.09.14.18.39.58;	author momjian;	state Exp;
branches;
next	1.430;

1.430
date	2007.09.14.18.38.44;	author momjian;	state Exp;
branches;
next	1.429;

1.429
date	2007.09.14.18.29.59;	author momjian;	state Exp;
branches;
next	1.428;

1.428
date	2007.09.11.17.34.12;	author momjian;	state Exp;
branches;
next	1.427;

1.427
date	2007.04.24.21.29.42;	author momjian;	state Exp;
branches;
next	1.426;

1.426
date	2007.04.24.21.28.54;	author momjian;	state Exp;
branches;
next	1.425;

1.425
date	2007.04.20.13.48.21;	author momjian;	state Exp;
branches;
next	1.424;

1.424
date	2007.04.19.03.05.10;	author momjian;	state Exp;
branches;
next	1.423;

1.423
date	2007.04.04.19.26.58;	author momjian;	state Exp;
branches;
next	1.422;

1.422
date	2007.03.20.17.43.56;	author momjian;	state Exp;
branches;
next	1.421;

1.421
date	2007.02.23.19.06.22;	author momjian;	state Exp;
branches;
next	1.420;

1.420
date	2007.02.21.22.54.11;	author momjian;	state Exp;
branches;
next	1.419;

1.419
date	2007.02.21.19.48.01;	author momjian;	state Exp;
branches;
next	1.418;

1.418
date	2007.02.21.16.09.01;	author momjian;	state Exp;
branches;
next	1.417;

1.417
date	2007.02.21.16.08.05;	author momjian;	state Exp;
branches;
next	1.416;

1.416
date	2007.02.21.15.07.35;	author momjian;	state Exp;
branches;
next	1.415;

1.415
date	2007.02.21.03.50.56;	author momjian;	state Exp;
branches;
next	1.414;

1.414
date	2007.02.09.03.43.22;	author momjian;	state Exp;
branches;
next	1.413;

1.413
date	2007.02.07.03.16.21;	author momjian;	state Exp;
branches;
next	1.412;

1.412
date	2007.02.06.18.36.26;	author momjian;	state Exp;
branches;
next	1.411;

1.411
date	2007.02.06.18.33.20;	author momjian;	state Exp;
branches;
next	1.410;

1.410
date	2007.02.06.18.31.26;	author momjian;	state Exp;
branches;
next	1.409;

1.409
date	2007.01.30.22.37.15;	author momjian;	state Exp;
branches;
next	1.408;

1.408
date	2007.01.05.22.19.18;	author momjian;	state Exp;
branches;
next	1.407;

1.407
date	2007.01.05.20.40.29;	author momjian;	state Exp;
branches;
next	1.406;

1.406
date	2006.12.11.22.46.02;	author momjian;	state Exp;
branches;
next	1.405;

1.405
date	2006.12.11.22.44.52;	author momjian;	state Exp;
branches;
next	1.404;

1.404
date	2006.12.05.23.13.40;	author momjian;	state Exp;
branches;
next	1.403;

1.403
date	2006.12.02.12.15.49;	author momjian;	state Exp;
branches;
next	1.402;

1.402
date	2006.12.02.04.12.10;	author momjian;	state Exp;
branches
	1.402.2.1;
next	1.401;

1.401
date	2006.11.22.04.17.03;	author momjian;	state Exp;
branches;
next	1.400;

1.400
date	2006.11.21.15.38.09;	author momjian;	state Exp;
branches;
next	1.399;

1.399
date	2006.10.14.23.08.46;	author momjian;	state Exp;
branches;
next	1.398;

1.398
date	2006.10.10.00.28.31;	author momjian;	state Exp;
branches;
next	1.397;

1.397
date	2006.08.18.16.27.40;	author momjian;	state Exp;
branches;
next	1.396;

1.396
date	2006.08.18.16.26.58;	author momjian;	state Exp;
branches;
next	1.395;

1.395
date	2006.08.11.18.47.56;	author momjian;	state Exp;
branches;
next	1.394;

1.394
date	2006.08.08.19.05.23;	author momjian;	state Exp;
branches;
next	1.393;

1.393
date	2006.06.18.19.33.30;	author momjian;	state Exp;
branches;
next	1.392;

1.392
date	2006.06.07.21.23.01;	author momjian;	state Exp;
branches;
next	1.391;

1.391
date	2006.06.04.00.17.43;	author momjian;	state Exp;
branches;
next	1.390;

1.390
date	2006.06.04.00.13.42;	author momjian;	state Exp;
branches;
next	1.389;

1.389
date	2006.05.23.15.51.07;	author momjian;	state Exp;
branches;
next	1.388;

1.388
date	2006.05.23.15.47.43;	author momjian;	state Exp;
branches;
next	1.387;

1.387
date	2006.05.23.15.22.20;	author momjian;	state Exp;
branches;
next	1.386;

1.386
date	2006.05.19.03.52.41;	author momjian;	state Exp;
branches;
next	1.385;

1.385
date	2006.04.13.12.20.30;	author momjian;	state Exp;
branches;
next	1.384;

1.384
date	2006.04.13.12.14.40;	author momjian;	state Exp;
branches;
next	1.383;

1.383
date	2006.04.13.12.09.07;	author momjian;	state Exp;
branches;
next	1.382;

1.382
date	2006.04.12.20.03.53;	author momjian;	state Exp;
branches;
next	1.381;

1.381
date	2006.04.12.18.56.16;	author momjian;	state Exp;
branches;
next	1.380;

1.380
date	2006.04.03.03.40.19;	author momjian;	state Exp;
branches;
next	1.379;

1.379
date	2006.04.03.03.39.22;	author momjian;	state Exp;
branches;
next	1.378;

1.378
date	2006.03.05.15.58.19;	author momjian;	state Exp;
branches;
next	1.377;

1.377
date	2006.02.25.04.28.54;	author momjian;	state Exp;
branches;
next	1.376;

1.376
date	2006.02.24.14.59.54;	author momjian;	state Exp;
branches;
next	1.375;

1.375
date	2006.02.12.17.15.56;	author momjian;	state Exp;
branches;
next	1.374;

1.374
date	2006.01.05.03.55.13;	author momjian;	state Exp;
branches;
next	1.373;

1.373
date	2005.12.08.22.26.18;	author momjian;	state Exp;
branches;
next	1.372;

1.372
date	2005.11.22.16.26.59;	author momjian;	state Exp;
branches;
next	1.371;

1.371
date	2005.11.22.15.31.22;	author momjian;	state Exp;
branches;
next	1.370;

1.370
date	2005.11.22.15.21.54;	author momjian;	state Exp;
branches;
next	1.369;

1.369
date	2005.11.22.15.16.49;	author momjian;	state Exp;
branches;
next	1.368;

1.368
date	2005.11.22.15.12.51;	author momjian;	state Exp;
branches;
next	1.367;

1.367
date	2005.11.22.15.04.25;	author momjian;	state Exp;
branches;
next	1.366;

1.366
date	2005.11.21.21.01.16;	author momjian;	state Exp;
branches;
next	1.365;

1.365
date	2005.11.21.20.54.26;	author momjian;	state Exp;
branches;
next	1.364;

1.364
date	2005.11.21.20.51.38;	author momjian;	state Exp;
branches;
next	1.363;

1.363
date	2005.11.21.20.44.11;	author momjian;	state Exp;
branches;
next	1.362;

1.362
date	2005.11.05.01.35.18;	author momjian;	state Exp;
branches
	1.362.2.1;
next	1.361;

1.361
date	2005.10.05.11.24.54;	author momjian;	state Exp;
branches;
next	1.360;

1.360
date	2005.09.28.11.45.52;	author momjian;	state Exp;
branches;
next	1.359;

1.359
date	2005.09.16.18.07.34;	author momjian;	state Exp;
branches;
next	1.358;

1.358
date	2005.09.01.16.18.51;	author momjian;	state Exp;
branches;
next	1.357;

1.357
date	2005.09.01.16.18.07;	author momjian;	state Exp;
branches;
next	1.356;

1.356
date	2005.08.11.13.22.06;	author momjian;	state Exp;
branches;
next	1.355;

1.355
date	2005.08.10.19.30.04;	author momjian;	state Exp;
branches;
next	1.354;

1.354
date	2005.07.29.14.05.12;	author momjian;	state Exp;
branches;
next	1.353;

1.353
date	2005.05.30.13.11.05;	author momjian;	state Exp;
branches;
next	1.352;

1.352
date	2005.05.09.17.15.14;	author momjian;	state Exp;
branches;
next	1.351;

1.351
date	2005.05.05.01.42.04;	author momjian;	state Exp;
branches;
next	1.350;

1.350
date	2005.05.05.01.23.51;	author momjian;	state Exp;
branches;
next	1.349;

1.349
date	2005.05.02.20.11.25;	author momjian;	state Exp;
branches;
next	1.348;

1.348
date	2005.04.30.03.53.17;	author momjian;	state Exp;
branches;
next	1.347;

1.347
date	2005.04.30.03.52.23;	author momjian;	state Exp;
branches;
next	1.346;

1.346
date	2005.04.24.12.01.22;	author momjian;	state Exp;
branches;
next	1.345;

1.345
date	2005.04.24.11.57.19;	author momjian;	state Exp;
branches;
next	1.344;

1.344
date	2005.04.24.11.48.51;	author momjian;	state Exp;
branches;
next	1.343;

1.343
date	2005.04.24.11.27.51;	author momjian;	state Exp;
branches;
next	1.342;

1.342
date	2005.04.24.11.22.44;	author momjian;	state Exp;
branches;
next	1.341;

1.341
date	2005.04.23.20.51.44;	author momjian;	state Exp;
branches;
next	1.340;

1.340
date	2005.04.23.18.59.16;	author momjian;	state Exp;
branches;
next	1.339;

1.339
date	2005.04.23.18.57.23;	author momjian;	state Exp;
branches;
next	1.338;

1.338
date	2005.04.23.15.22.56;	author momjian;	state Exp;
branches;
next	1.337;

1.337
date	2005.03.15.22.38.22;	author momjian;	state Exp;
branches;
next	1.336;

1.336
date	2005.03.11.21.42.53;	author momjian;	state Exp;
branches;
next	1.335;

1.335
date	2005.02.25.04.18.26;	author momjian;	state Exp;
branches;
next	1.334;

1.334
date	2005.02.25.00.45.29;	author momjian;	state Exp;
branches;
next	1.333;

1.333
date	2005.02.25.00.32.55;	author momjian;	state Exp;
branches;
next	1.332;

1.332
date	2005.02.25.00.32.15;	author momjian;	state Exp;
branches;
next	1.331;

1.331
date	2005.02.15.04.35.30;	author momjian;	state Exp;
branches;
next	1.330;

1.330
date	2005.02.15.04.03.41;	author momjian;	state Exp;
branches;
next	1.329;

1.329
date	2005.02.15.04.02.16;	author momjian;	state Exp;
branches;
next	1.328;

1.328
date	2005.02.02.17.44.21;	author momjian;	state Exp;
branches;
next	1.327;

1.327
date	2005.02.02.13.41.14;	author momjian;	state Exp;
branches;
next	1.326;

1.326
date	2005.02.01.21.11.04;	author momjian;	state Exp;
branches;
next	1.325;

1.325
date	2005.02.01.02.40.45;	author momjian;	state Exp;
branches;
next	1.324;

1.324
date	2005.02.01.02.35.43;	author momjian;	state Exp;
branches;
next	1.323;

1.323
date	2005.02.01.02.31.55;	author momjian;	state Exp;
branches;
next	1.322;

1.322
date	2005.02.01.01.41.36;	author momjian;	state Exp;
branches;
next	1.321;

1.321
date	2005.02.01.01.36.13;	author momjian;	state Exp;
branches;
next	1.320;

1.320
date	2005.02.01.00.19.12;	author momjian;	state Exp;
branches;
next	1.319;

1.319
date	2005.01.31.22.59.04;	author momjian;	state Exp;
branches;
next	1.318;

1.318
date	2005.01.31.22.57.59;	author momjian;	state Exp;
branches;
next	1.317;

1.317
date	2005.01.31.22.57.14;	author momjian;	state Exp;
branches;
next	1.316;

1.316
date	2005.01.31.20.40.42;	author momjian;	state Exp;
branches;
next	1.315;

1.315
date	2005.01.31.02.45.19;	author momjian;	state Exp;
branches;
next	1.314;

1.314
date	2005.01.31.02.42.47;	author momjian;	state Exp;
branches;
next	1.313;

1.313
date	2005.01.31.02.39.58;	author momjian;	state Exp;
branches;
next	1.312;

1.312
date	2005.01.31.02.19.07;	author momjian;	state Exp;
branches;
next	1.311;

1.311
date	2005.01.31.02.16.52;	author momjian;	state Exp;
branches;
next	1.310;

1.310
date	2005.01.31.02.09.18;	author momjian;	state Exp;
branches;
next	1.309;

1.309
date	2005.01.31.01.59.35;	author momjian;	state Exp;
branches;
next	1.308;

1.308
date	2005.01.31.01.53.41;	author momjian;	state Exp;
branches;
next	1.307;

1.307
date	2005.01.31.01.37.47;	author momjian;	state Exp;
branches;
next	1.306;

1.306
date	2005.01.31.01.26.17;	author momjian;	state Exp;
branches;
next	1.305;

1.305
date	2005.01.30.04.45.01;	author momjian;	state Exp;
branches;
next	1.304;

1.304
date	2005.01.30.04.25.19;	author momjian;	state Exp;
branches;
next	1.303;

1.303
date	2005.01.30.04.20.47;	author momjian;	state Exp;
branches;
next	1.302;

1.302
date	2005.01.30.04.16.05;	author momjian;	state Exp;
branches;
next	1.301;

1.301
date	2005.01.30.04.06.19;	author momjian;	state Exp;
branches;
next	1.300;

1.300
date	2005.01.30.04.05.11;	author momjian;	state Exp;
branches;
next	1.299;

1.299
date	2005.01.30.04.02.53;	author momjian;	state Exp;
branches;
next	1.298;

1.298
date	2005.01.30.04.00.14;	author momjian;	state Exp;
branches;
next	1.297;

1.297
date	2005.01.30.03.52.46;	author momjian;	state Exp;
branches;
next	1.296;

1.296
date	2005.01.30.02.22.04;	author momjian;	state Exp;
branches;
next	1.295;

1.295
date	2005.01.30.02.06.20;	author momjian;	state Exp;
branches;
next	1.294;

1.294
date	2005.01.19.19.45.45;	author momjian;	state Exp;
branches;
next	1.293;

1.293
date	2005.01.19.03.12.30;	author momjian;	state Exp;
branches;
next	1.292;

1.292
date	2005.01.17.04.27.21;	author momjian;	state Exp;
branches
	1.292.4.1;
next	1.291;

1.291
date	2005.01.17.03.02.21;	author momjian;	state Exp;
branches;
next	1.290;

1.290
date	2005.01.17.02.40.53;	author momjian;	state Exp;
branches;
next	1.289;

1.289
date	2005.01.15.22.51.09;	author momjian;	state Exp;
branches;
next	1.288;

1.288
date	2005.01.15.22.44.17;	author momjian;	state Exp;
branches;
next	1.287;

1.287
date	2005.01.15.05.19.00;	author momjian;	state Exp;
branches;
next	1.286;

1.286
date	2005.01.09.19.44.25;	author momjian;	state Exp;
branches;
next	1.285;

1.285
date	2005.01.08.03.58.59;	author momjian;	state Exp;
branches;
next	1.284;

1.284
date	2005.01.04.14.25.15;	author momjian;	state Exp;
branches;
next	1.283;

1.283
date	2005.01.04.03.44.49;	author momjian;	state Exp;
branches;
next	1.282;

1.282
date	2005.01.04.03.43.27;	author momjian;	state Exp;
branches;
next	1.281;

1.281
date	2004.12.24.17.19.22;	author momjian;	state Exp;
branches;
next	1.280;

1.280
date	2004.12.24.17.13.51;	author momjian;	state Exp;
branches;
next	1.279;

1.279
date	2004.12.24.16.02.36;	author momjian;	state Exp;
branches;
next	1.278;

1.278
date	2004.12.18.04.13.20;	author momjian;	state Exp;
branches;
next	1.277;

1.277
date	2004.12.16.01.07.42;	author momjian;	state Exp;
branches;
next	1.276;

1.276
date	2004.12.16.00.01.08;	author momjian;	state Exp;
branches;
next	1.275;

1.275
date	2004.12.15.03.11.18;	author momjian;	state Exp;
branches;
next	1.274;

1.274
date	2004.12.10.18.01.59;	author momjian;	state Exp;
branches;
next	1.273;

1.273
date	2004.11.28.04.56.03;	author momjian;	state Exp;
branches;
next	1.272;

1.272
date	2004.11.27.05.15.19;	author momjian;	state Exp;
branches;
next	1.271;

1.271
date	2004.11.20.22.28.38;	author momjian;	state Exp;
branches;
next	1.270;

1.270
date	2004.11.14.21.33.08;	author momjian;	state Exp;
branches;
next	1.269;

1.269
date	2004.09.01.03.28.15;	author momjian;	state Exp;
branches;
next	1.268;

1.268
date	2004.08.26.03.18.25;	author momjian;	state Exp;
branches;
next	1.267;

1.267
date	2004.08.23.21.51.53;	author momjian;	state Exp;
branches;
next	1.266;

1.266
date	2004.08.23.16.16.43;	author momjian;	state Exp;
branches;
next	1.265;

1.265
date	2004.07.30.16.51.58;	author momjian;	state Exp;
branches;
next	1.264;

1.264
date	2004.07.27.03.27.38;	author momjian;	state Exp;
branches;
next	1.263;

1.263
date	2004.07.19.20.28.42;	author momjian;	state Exp;
branches;
next	1.262;

1.262
date	2004.07.12.03.58.30;	author momjian;	state Exp;
branches;
next	1.261;

1.261
date	2004.07.12.01.37.00;	author momjian;	state Exp;
branches;
next	1.260;

1.260
date	2004.07.12.01.10.16;	author momjian;	state Exp;
branches;
next	1.259;

1.259
date	2004.07.12.00.18.57;	author momjian;	state Exp;
branches;
next	1.258;

1.258
date	2004.06.04.04.09.40;	author momjian;	state Exp;
branches;
next	1.257;

1.257
date	2004.03.29.05.07.19;	author momjian;	state Exp;
branches;
next	1.256;

1.256
date	2004.03.12.13.51.57;	author momjian;	state Exp;
branches;
next	1.255;

1.255
date	2004.02.08.03.16.31;	author momjian;	state Exp;
branches;
next	1.254;

1.254
date	2004.02.08.03.09.12;	author momjian;	state Exp;
branches;
next	1.253;

1.253
date	2004.01.26.05.33.24;	author momjian;	state Exp;
branches;
next	1.252;

1.252
date	2004.01.25.04.56.25;	author momjian;	state Exp;
branches;
next	1.251;

1.251
date	2004.01.25.02.28.43;	author momjian;	state Exp;
branches;
next	1.250;

1.250
date	2004.01.23.14.41.57;	author momjian;	state Exp;
branches;
next	1.249;

1.249
date	2004.01.06.21.44.07;	author momjian;	state Exp;
branches;
next	1.248;

1.248
date	2004.01.05.00.54.24;	author momjian;	state Exp;
branches;
next	1.247;

1.247
date	2003.11.30.04.54.07;	author momjian;	state Exp;
branches;
next	1.246;

1.246
date	2003.11.30.04.35.51;	author momjian;	state Exp;
branches;
next	1.245;

1.245
date	2003.11.30.04.34.10;	author momjian;	state Exp;
branches;
next	1.244;

1.244
date	2003.11.28.20.09.30;	author momjian;	state Exp;
branches;
next	1.243;

1.243
date	2003.11.19.16.50.48;	author momjian;	state Exp;
branches;
next	1.242;

1.242
date	2003.11.16.04.41.12;	author momjian;	state Exp;
branches;
next	1.241;

1.241
date	2003.11.10.22.47.35;	author momjian;	state Exp;
branches;
next	1.240;

1.240
date	2003.11.10.21.56.08;	author momjian;	state Exp;
branches;
next	1.239;

1.239
date	2003.11.07.17.02.09;	author momjian;	state Exp;
branches;
next	1.238;

1.238
date	2003.10.29.20.20.11;	author momjian;	state Exp;
branches
	1.238.2.1;
next	1.237;

1.237
date	2003.10.10.21.27.13;	author momjian;	state Exp;
branches;
next	1.236;

1.236
date	2003.10.05.14.25.29;	author momjian;	state Exp;
branches;
next	1.235;

1.235
date	2003.10.05.03.52.08;	author momjian;	state Exp;
branches;
next	1.234;

1.234
date	2003.10.04.02.37.04;	author momjian;	state Exp;
branches;
next	1.233;

1.233
date	2003.10.04.01.39.51;	author momjian;	state Exp;
branches;
next	1.232;

1.232
date	2003.09.09.22.43.06;	author momjian;	state Exp;
branches;
next	1.231;

1.231
date	2003.09.09.18.25.44;	author momjian;	state Exp;
branches;
next	1.230;

1.230
date	2003.09.07.22.02.54;	author momjian;	state Exp;
branches;
next	1.229;

1.229
date	2003.09.07.22.01.41;	author momjian;	state Exp;
branches;
next	1.228;

1.228
date	2003.09.05.16.43.13;	author momjian;	state Exp;
branches;
next	1.227;

1.227
date	2003.09.01.16.47.58;	author momjian;	state Exp;
branches;
next	1.226;

1.226
date	2003.08.30.03.19.45;	author momjian;	state Exp;
branches;
next	1.225;

1.225
date	2003.07.25.22.07.44;	author momjian;	state Exp;
branches
	1.225.2.1;
next	1.224;

1.224
date	2003.07.23.16.55.47;	author momjian;	state Exp;
branches;
next	1.223;

1.223
date	2003.07.23.04.11.20;	author momjian;	state Exp;
branches;
next	1.222;

1.222
date	2003.07.20.21.52.45;	author momjian;	state Exp;
branches;
next	1.221;

1.221
date	2003.06.06.22.20.40;	author momjian;	state Exp;
branches;
next	1.220;

1.220
date	2003.05.31.02.25.11;	author momjian;	state Exp;
branches;
next	1.219;

1.219
date	2003.05.28.04.35.28;	author momjian;	state Exp;
branches;
next	1.218;

1.218
date	2003.05.26.19.25.20;	author momjian;	state Exp;
branches;
next	1.217;

1.217
date	2003.04.22.18.03.00;	author momjian;	state Exp;
branches;
next	1.216;

1.216
date	2003.04.21.14.54.15;	author momjian;	state Exp;
branches;
next	1.215;

1.215
date	2003.04.16.18.56.24;	author momjian;	state Exp;
branches;
next	1.214;

1.214
date	2003.03.17.19.53.08;	author momjian;	state Exp;
branches;
next	1.213;

1.213
date	2003.03.17.19.47.28;	author momjian;	state Exp;
branches;
next	1.212;

1.212
date	2003.03.17.16.33.11;	author momjian;	state Exp;
branches;
next	1.211;

1.211
date	2003.03.07.05.49.10;	author momjian;	state Exp;
branches;
next	1.210;

1.210
date	2003.02.18.17.23.08;	author momjian;	state Exp;
branches;
next	1.209;

1.209
date	2003.02.18.16.37.29;	author momjian;	state Exp;
branches;
next	1.208;

1.208
date	2003.02.18.05.07.42;	author momjian;	state Exp;
branches;
next	1.207;

1.207
date	2003.02.18.05.07.03;	author momjian;	state Exp;
branches;
next	1.206;

1.206
date	2003.02.14.14.03.10;	author momjian;	state Exp;
branches;
next	1.205;

1.205
date	2003.02.14.13.59.00;	author momjian;	state Exp;
branches;
next	1.204;

1.204
date	2003.02.14.04.07.45;	author momjian;	state Exp;
branches;
next	1.203;

1.203
date	2003.01.27.06.25.03;	author momjian;	state Exp;
branches;
next	1.202;

1.202
date	2003.01.26.02.43.55;	author momjian;	state Exp;
branches;
next	1.201;

1.201
date	2003.01.17.17.15.14;	author momjian;	state Exp;
branches;
next	1.200;

1.200
date	2003.01.12.18.36.22;	author momjian;	state Exp;
branches;
next	1.199;

1.199
date	2003.01.12.14.58.46;	author momjian;	state Exp;
branches;
next	1.198;

1.198
date	2003.01.12.05.16.12;	author momjian;	state Exp;
branches;
next	1.197;

1.197
date	2002.12.18.04.56.30;	author momjian;	state Exp;
branches;
next	1.196;

1.196
date	2002.12.18.04.39.48;	author momjian;	state Exp;
branches;
next	1.195;

1.195
date	2002.12.16.18.40.32;	author momjian;	state Exp;
branches;
next	1.194;

1.194
date	2002.12.05.05.47.44;	author momjian;	state Exp;
branches;
next	1.193;

1.193
date	2002.10.21.00.47.44;	author momjian;	state Exp;
branches
	1.193.2.1;
next	1.192;

1.192
date	2002.10.20.02.58.56;	author momjian;	state Exp;
branches;
next	1.191;

1.191
date	2002.10.17.23.34.10;	author momjian;	state Exp;
branches;
next	1.190;

1.190
date	2002.10.14.03.15.33;	author momjian;	state Exp;
branches;
next	1.189;

1.189
date	2002.10.14.02.50.27;	author momjian;	state Exp;
branches;
next	1.188;

1.188
date	2002.10.11.17.55.17;	author momjian;	state Exp;
branches;
next	1.187;

1.187
date	2002.10.11.05.02.24;	author momjian;	state Exp;
branches;
next	1.186;

1.186
date	2002.10.10.03.15.19;	author momjian;	state Exp;
branches;
next	1.185;

1.185
date	2002.10.01.03.28.56;	author momjian;	state Exp;
branches;
next	1.184;

1.184
date	2002.08.26.01.05.43;	author momjian;	state Exp;
branches;
next	1.183;

1.183
date	2002.08.22.23.20.51;	author momjian;	state Exp;
branches;
next	1.182;

1.182
date	2002.08.22.23.20.24;	author momjian;	state Exp;
branches;
next	1.181;

1.181
date	2002.08.22.15.31.07;	author momjian;	state Exp;
branches;
next	1.180;

1.180
date	2002.07.30.15.05.16;	author momjian;	state Exp;
branches;
next	1.179;

1.179
date	2002.07.30.01.35.29;	author momjian;	state Exp;
branches;
next	1.178;

1.178
date	2002.07.29.23.56.52;	author momjian;	state Exp;
branches;
next	1.177;

1.177
date	2002.07.11.16.38.08;	author momjian;	state Exp;
branches;
next	1.176;

1.176
date	2002.07.11.16.35.55;	author momjian;	state Exp;
branches;
next	1.175;

1.175
date	2002.07.04.19.26.10;	author momjian;	state Exp;
branches;
next	1.174;

1.174
date	2002.06.25.03.35.13;	author momjian;	state Exp;
branches;
next	1.173;

1.173
date	2002.06.25.03.32.31;	author momjian;	state Exp;
branches;
next	1.172;

1.172
date	2002.06.25.01.45.57;	author momjian;	state Exp;
branches;
next	1.171;

1.171
date	2002.06.23.21.16.29;	author momjian;	state Exp;
branches;
next	1.170;

1.170
date	2002.06.21.02.01.04;	author momjian;	state Exp;
branches;
next	1.169;

1.169
date	2002.06.11.10.36.16;	author momjian;	state Exp;
branches;
next	1.168;

1.168
date	2002.06.11.10.29.53;	author momjian;	state Exp;
branches;
next	1.167;

1.167
date	2002.06.11.02.22.41;	author momjian;	state Exp;
branches;
next	1.166;

1.166
date	2002.06.10.20.45.06;	author momjian;	state Exp;
branches;
next	1.165;

1.165
date	2002.06.10.19.49.59;	author momjian;	state Exp;
branches;
next	1.164;

1.164
date	2002.06.10.19.47.56;	author momjian;	state Exp;
branches;
next	1.163;

1.163
date	2002.04.27.03.04.08;	author momjian;	state Exp;
branches;
next	1.162;

1.162
date	2002.04.18.04.45.10;	author momjian;	state Exp;
branches;
next	1.161;

1.161
date	2002.04.18.02.48.19;	author momjian;	state Exp;
branches;
next	1.160;

1.160
date	2002.04.09.14.53.54;	author momjian;	state Exp;
branches;
next	1.159;

1.159
date	2002.04.09.14.22.32;	author momjian;	state Exp;
branches;
next	1.158;

1.158
date	2002.04.09.03.22.11;	author momjian;	state Exp;
branches;
next	1.157;

1.157
date	2002.03.18.19.35.09;	author momjian;	state Exp;
branches;
next	1.156;

1.156
date	2002.03.05.06.28.25;	author momjian;	state Exp;
branches;
next	1.155;

1.155
date	2002.03.03.18.35.46;	author momjian;	state Exp;
branches;
next	1.154;

1.154
date	2002.03.03.16.02.26;	author momjian;	state Exp;
branches;
next	1.153;

1.153
date	2002.02.27.04.52.18;	author momjian;	state Exp;
branches;
next	1.152;

1.152
date	2002.02.25.20.29.13;	author momjian;	state Exp;
branches;
next	1.151;

1.151
date	2002.02.21.22.56.14;	author momjian;	state Exp;
branches;
next	1.150;

1.150
date	2002.02.21.22.19.30;	author momjian;	state Exp;
branches;
next	1.149;

1.149
date	2002.02.21.20.14.59;	author momjian;	state Exp;
branches;
next	1.148;

1.148
date	2002.02.21.20.13.38;	author momjian;	state Exp;
branches;
next	1.147;

1.147
date	2002.02.18.05.09.00;	author momjian;	state Exp;
branches;
next	1.146;

1.146
date	2002.02.14.17.14.56;	author momjian;	state Exp;
branches
	1.146.2.1;
next	1.145;

1.145
date	2002.02.12.17.18.10;	author momjian;	state Exp;
branches;
next	1.144;

1.144
date	2002.02.12.17.14.54;	author momjian;	state Exp;
branches;
next	1.143;

1.143
date	2002.02.02.21.46.44;	author momjian;	state Exp;
branches;
next	1.142;

1.142
date	2002.02.02.20.34.33;	author momjian;	state Exp;
branches;
next	1.141;

1.141
date	2002.02.02.20.34.16;	author momjian;	state Exp;
branches;
next	1.140;

1.140
date	2002.01.22.20.24.13;	author momjian;	state Exp;
branches;
next	1.139;

1.139
date	2002.01.10.23.41.49;	author momjian;	state Exp;
branches;
next	1.138;

1.138
date	2002.01.10.23.35.19;	author momjian;	state Exp;
branches;
next	1.137;

1.137
date	2002.01.10.23.34.14;	author momjian;	state Exp;
branches;
next	1.136;

1.136
date	2002.01.10.23.33.35;	author momjian;	state Exp;
branches;
next	1.135;

1.135
date	2002.01.10.23.32.11;	author momjian;	state Exp;
branches;
next	1.134;

1.134
date	2002.01.10.23.07.07;	author momjian;	state Exp;
branches;
next	1.133;

1.133
date	2002.01.04.05.44.45;	author momjian;	state Exp;
branches;
next	1.132;

1.132
date	2001.12.05.05.41.13;	author momjian;	state Exp;
branches;
next	1.131;

1.131
date	2001.12.05.05.38.51;	author momjian;	state Exp;
branches;
next	1.130;

1.130
date	2001.12.05.05.33.48;	author momjian;	state Exp;
branches;
next	1.129;

1.129
date	2001.12.04.07.12.08;	author momjian;	state Exp;
branches;
next	1.128;

1.128
date	2001.12.04.07.09.53;	author momjian;	state Exp;
branches;
next	1.127;

1.127
date	2001.11.28.21.11.39;	author momjian;	state Exp;
branches;
next	1.126;

1.126
date	2001.11.28.00.37.03;	author momjian;	state Exp;
branches;
next	1.125;

1.125
date	2001.11.27.20.25.45;	author momjian;	state Exp;
branches;
next	1.124;

1.124
date	2001.11.12.07.38.57;	author momjian;	state Exp;
branches;
next	1.123;

1.123
date	2001.10.14.23.27.30;	author momjian;	state Exp;
branches;
next	1.122;

1.122
date	2001.10.13.05.27.04;	author momjian;	state Exp;
branches;
next	1.121;

1.121
date	2001.10.13.03.53.45;	author momjian;	state Exp;
branches;
next	1.120;

1.120
date	2001.10.13.03.37.41;	author momjian;	state Exp;
branches;
next	1.119;

1.119
date	2001.10.13.01.32.47;	author momjian;	state Exp;
branches;
next	1.118;

1.118
date	2001.09.23.00.07.50;	author momjian;	state Exp;
branches;
next	1.117;

1.117
date	2001.09.07.01.24.18;	author momjian;	state Exp;
branches;
next	1.116;

1.116
date	2001.09.04.15.40.18;	author momjian;	state Exp;
branches;
next	1.115;

1.115
date	2001.08.24.14.07.48;	author petere;	state Exp;
branches;
next	1.114;

1.114
date	2001.08.21.11.05.54;	author momjian;	state Exp;
branches;
next	1.113;

1.113
date	2001.08.20.20.37.18;	author momjian;	state Exp;
branches;
next	1.112;

1.112
date	2001.07.11.01.01.55;	author momjian;	state Exp;
branches;
next	1.111;

1.111
date	2001.06.18.18.56.03;	author momjian;	state Exp;
branches;
next	1.110;

1.110
date	2001.06.11.16.27.52;	author momjian;	state Exp;
branches;
next	1.109;

1.109
date	2001.06.09.14.40.41;	author momjian;	state Exp;
branches;
next	1.108;

1.108
date	2001.05.30.23.00.41;	author momjian;	state Exp;
branches;
next	1.107;

1.107
date	2001.05.30.22.58.00;	author momjian;	state Exp;
branches;
next	1.106;

1.106
date	2001.05.22.21.50.33;	author momjian;	state Exp;
branches;
next	1.105;

1.105
date	2001.05.11.01.33.01;	author momjian;	state Exp;
branches;
next	1.104;

1.104
date	2001.04.27.00.55.49;	author momjian;	state Exp;
branches
	1.104.2.1;
next	1.103;

1.103
date	2001.04.27.00.22.58;	author momjian;	state Exp;
branches;
next	1.102;

1.102
date	2001.04.27.00.21.43;	author momjian;	state Exp;
branches;
next	1.101;

1.101
date	2001.04.09.19.28.01;	author momjian;	state Exp;
branches;
next	1.100;

1.100
date	2001.04.08.22.57.38;	author momjian;	state Exp;
branches;
next	1.99;

1.99
date	2001.03.13.14.41.08;	author momjian;	state Exp;
branches;
next	1.98;

1.98
date	2001.03.08.16.52.10;	author momjian;	state Exp;
branches;
next	1.97;

1.97
date	2001.02.15.22.21.23;	author momjian;	state Exp;
branches;
next	1.96;

1.96
date	2001.02.15.22.15.09;	author momjian;	state Exp;
branches;
next	1.95;

1.95
date	2001.02.07.16.33.31;	author momjian;	state Exp;
branches;
next	1.94;

1.94
date	2001.02.07.16.32.46;	author momjian;	state Exp;
branches;
next	1.93;

1.93
date	2001.02.06.04.28.49;	author momjian;	state Exp;
branches;
next	1.92;

1.92
date	2001.02.05.17.37.43;	author momjian;	state Exp;
branches;
next	1.91;

1.91
date	2001.01.29.01.23.35;	author momjian;	state Exp;
branches;
next	1.90;

1.90
date	2001.01.28.17.42.12;	author momjian;	state Exp;
branches;
next	1.89;

1.89
date	2001.01.28.17.39.43;	author momjian;	state Exp;
branches;
next	1.88;

1.88
date	2001.01.28.15.18.45;	author momjian;	state Exp;
branches;
next	1.87;

1.87
date	2001.01.27.20.19.33;	author momjian;	state Exp;
branches;
next	1.86;

1.86
date	2001.01.27.04.38.54;	author momjian;	state Exp;
branches;
next	1.85;

1.85
date	2001.01.27.04.35.16;	author momjian;	state Exp;
branches;
next	1.84;

1.84
date	2001.01.24.19.42.45;	author momjian;	state Exp;
branches;
next	1.83;

1.83
date	2001.01.23.01.11.06;	author momjian;	state Exp;
branches;
next	1.82;

1.82
date	2001.01.23.01.00.54;	author momjian;	state Exp;
branches;
next	1.81;

1.81
date	2001.01.22.17.20.11;	author momjian;	state Exp;
branches;
next	1.80;

1.80
date	2001.01.22.16.35.33;	author momjian;	state Exp;
branches;
next	1.79;

1.79
date	2001.01.22.06.27.38;	author momjian;	state Exp;
branches;
next	1.78;

1.78
date	2001.01.22.05.55.09;	author momjian;	state Exp;
branches;
next	1.77;

1.77
date	2001.01.21.22.16.55;	author momjian;	state Exp;
branches;
next	1.76;

1.76
date	2001.01.21.05.01.56;	author momjian;	state Exp;
branches;
next	1.75;

1.75
date	2000.12.09.04.29.38;	author momjian;	state Exp;
branches;
next	1.74;

1.74
date	2000.11.30.18.46.42;	author tgl;	state Exp;
branches;
next	1.73;

1.73
date	2000.10.17.04.21.29;	author momjian;	state Exp;
branches;
next	1.72;

1.72
date	2000.10.12.21.21.26;	author momjian;	state Exp;
branches;
next	1.71;

1.71
date	2000.10.12.17.33.31;	author momjian;	state Exp;
branches;
next	1.70;

1.70
date	2000.10.12.03.12.40;	author momjian;	state Exp;
branches;
next	1.69;

1.69
date	2000.10.09.20.21.00;	author momjian;	state Exp;
branches;
next	1.68;

1.68
date	2000.10.09.07.38.53;	author momjian;	state Exp;
branches;
next	1.67;

1.67
date	2000.10.05.05.14.58;	author momjian;	state Exp;
branches;
next	1.66;

1.66
date	2000.10.05.04.58.23;	author momjian;	state Exp;
branches;
next	1.65;

1.65
date	2000.10.05.04.57.27;	author momjian;	state Exp;
branches;
next	1.64;

1.64
date	2000.10.05.04.52.17;	author momjian;	state Exp;
branches;
next	1.63;

1.63
date	2000.10.05.04.49.11;	author momjian;	state Exp;
branches;
next	1.62;

1.62
date	2000.09.30.03.04.38;	author momjian;	state Exp;
branches;
next	1.61;

1.61
date	2000.09.12.15.47.20;	author momjian;	state Exp;
branches;
next	1.60;

1.60
date	2000.09.08.19.15.22;	author momjian;	state Exp;
branches;
next	1.59;

1.59
date	2000.08.27.19.25.31;	author momjian;	state Exp;
branches;
next	1.58;

1.58
date	2000.08.27.03.55.19;	author momjian;	state Exp;
branches;
next	1.57;

1.57
date	2000.08.26.18.20.53;	author momjian;	state Exp;
branches;
next	1.56;

1.56
date	2000.07.27.20.26.54;	author momjian;	state Exp;
branches;
next	1.55;

1.55
date	2000.07.27.19.22.19;	author momjian;	state Exp;
branches;
next	1.54;

1.54
date	2000.07.27.16.55.32;	author momjian;	state Exp;
branches;
next	1.53;

1.53
date	2000.07.26.19.19.59;	author momjian;	state Exp;
branches;
next	1.52;

1.52
date	2000.07.26.16.54.56;	author momjian;	state Exp;
branches;
next	1.51;

1.51
date	2000.07.26.02.20.01;	author momjian;	state Exp;
branches;
next	1.50;

1.50
date	2000.07.20.20.31.37;	author momjian;	state Exp;
branches;
next	1.49;

1.49
date	2000.07.20.20.13.14;	author momjian;	state Exp;
branches;
next	1.48;

1.48
date	2000.07.20.17.48.36;	author momjian;	state Exp;
branches;
next	1.47;

1.47
date	2000.07.20.17.45.32;	author momjian;	state Exp;
branches;
next	1.46;

1.46
date	2000.07.20.17.44.18;	author momjian;	state Exp;
branches;
next	1.45;

1.45
date	2000.07.20.17.43.22;	author momjian;	state Exp;
branches;
next	1.44;

1.44
date	2000.07.20.17.40.38;	author momjian;	state Exp;
branches;
next	1.43;

1.43
date	2000.06.24.01.51.14;	author momjian;	state Exp;
branches;
next	1.42;

1.42
date	2000.06.13.08.07.50;	author momjian;	state Exp;
branches;
next	1.41;

1.41
date	2000.06.09.12.20.14;	author momjian;	state Exp;
branches;
next	1.40;

1.40
date	2000.03.23.06.30.49;	author momjian;	state Exp;
branches
	1.40.2.1;
next	1.39;

1.39
date	99.09.28.05.09.56;	author momjian;	state Exp;
branches;
next	1.38;

1.38
date	99.07.10.16.28.00;	author momjian;	state Exp;
branches
	1.38.2.1;
next	1.37;

1.37
date	99.06.05.18.30.43;	author momjian;	state Exp;
branches;
next	1.36;

1.36
date	99.06.05.18.24.55;	author momjian;	state Exp;
branches;
next	1.35;

1.35
date	99.06.05.03.43.03;	author momjian;	state Exp;
branches;
next	1.34;

1.34
date	98.11.28.23.12.50;	author tgl;	state Exp;
branches;
next	1.33;

1.33
date	98.10.24.04.43.37;	author momjian;	state Exp;
branches
	1.33.2.1;
next	1.32;

1.32
date	98.08.30.04.01.31;	author momjian;	state Exp;
branches;
next	1.31;

1.31
date	98.04.26.04.17.22;	author momjian;	state Exp;
branches;
next	1.30;

1.30
date	98.04.15.16.50.32;	author momjian;	state Exp;
branches;
next	1.29;

1.29
date	98.03.01.05.41.01;	author momjian;	state Exp;
branches;
next	1.28;

1.28
date	98.02.28.15.08.12;	author momjian;	state Exp;
branches;
next	1.27;

1.27
date	98.02.27.22.01.47;	author momjian;	state Exp;
branches;
next	1.26;

1.26
date	98.02.18.15.55.43;	author momjian;	state Exp;
branches;
next	1.25;

1.25
date	98.02.01.21.20.23;	author momjian;	state Exp;
branches;
next	1.24;

1.24
date	97.10.16.04.13.28;	author momjian;	state Exp;
branches;
next	1.23;

1.23
date	97.10.02.18.17.55;	author vadim;	state Exp;
branches;
next	1.22;

1.22
date	97.09.30.03.01.36;	author momjian;	state Exp;
branches;
next	1.21;

1.21
date	97.09.14.02.09.06;	author momjian;	state Exp;
branches;
next	1.20;

1.20
date	97.09.04.05.34.47;	author momjian;	state Exp;
branches;
next	1.19;

1.19
date	97.07.29.14.17.48;	author momjian;	state Exp;
branches;
next	1.18;

1.18
date	97.07.28.22.37.37;	author momjian;	state Exp;
branches;
next	1.17;

1.17
date	97.07.28.02.08.10;	author momjian;	state Exp;
branches;
next	1.16;

1.16
date	97.07.21.22.29.28;	author momjian;	state Exp;
branches;
next	1.15;

1.15
date	97.07.16.02.20.51;	author momjian;	state Exp;
branches;
next	1.14;

1.14
date	97.07.15.01.02.05;	author momjian;	state Exp;
branches;
next	1.13;

1.13
date	97.07.14.21.18.25;	author momjian;	state Exp;
branches;
next	1.12;

1.12
date	97.07.14.16.47.36;	author momjian;	state Exp;
branches;
next	1.11;

1.11
date	97.07.14.16.37.36;	author momjian;	state Exp;
branches;
next	1.10;

1.10
date	97.07.13.19.59.53;	author momjian;	state Exp;
branches;
next	1.9;

1.9
date	97.06.11.14.57.30;	author momjian;	state Exp;
branches;
next	1.8;

1.8
date	97.05.14.03.20.23;	author momjian;	state Exp;
branches;
next	1.7;

1.7
date	97.03.06.22.59.47;	author momjian;	state Exp;
branches;
next	1.6;

1.6
date	97.02.27.15.05.21;	author momjian;	state Exp;
branches;
next	1.5;

1.5
date	97.01.29.05.26.46;	author momjian;	state Exp;
branches;
next	1.4;

1.4
date	96.12.26.22.15.11;	author momjian;	state Exp;
branches;
next	1.3;

1.3
date	96.10.14.12.12.08;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	96.10.03.17.15.56;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	96.08.18.22.14.16;	author scrappy;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.08.18.22.14.16;	author scrappy;	state Exp;
branches;
next	;

1.33.2.1
date	98.12.18.05.25.54;	author momjian;	state Exp;
branches;
next	;

1.38.2.1
date	99.09.13.00.20.48;	author momjian;	state Exp;
branches;
next	1.38.2.2;

1.38.2.2
date	99.09.28.05.10.18;	author momjian;	state Exp;
branches;
next	1.38.2.3;

1.38.2.3
date	99.10.12.15.35.06;	author momjian;	state Exp;
branches;
next	;

1.40.2.1
date	2000.06.09.12.20.59;	author momjian;	state Exp;
branches;
next	1.40.2.2;

1.40.2.2
date	2000.06.24.01.51.33;	author momjian;	state Exp;
branches;
next	1.40.2.3;

1.40.2.3
date	2000.11.03.03.42.54;	author momjian;	state Exp;
branches;
next	;

1.104.2.1
date	2001.05.11.01.34.40;	author momjian;	state Exp;
branches;
next	;

1.146.2.1
date	2002.03.13.20.53.14;	author momjian;	state Exp;
branches;
next	1.146.2.2;

1.146.2.2
date	2002.03.18.23.04.10;	author momjian;	state Exp;
branches;
next	1.146.2.3;

1.146.2.3
date	2002.10.01.03.34.28;	author momjian;	state Exp;
branches;
next	;

1.193.2.1
date	2002.12.18.04.41.05;	author momjian;	state Exp;
branches;
next	1.193.2.2;

1.193.2.2
date	2002.12.18.20.39.31;	author momjian;	state Exp;
branches;
next	1.193.2.3;

1.193.2.3
date	2003.02.14.14.05.51;	author momjian;	state Exp;
branches;
next	1.193.2.4;

1.193.2.4
date	2003.07.23.04.09.44;	author momjian;	state Exp;
branches;
next	1.193.2.5;

1.193.2.5
date	2006.01.05.03.59.20;	author momjian;	state Exp;
branches;
next	1.193.2.6;

1.193.2.6
date	2006.02.12.18.50.05;	author momjian;	state Exp;
branches;
next	1.193.2.7;

1.193.2.7
date	2006.05.21.20.28.21;	author momjian;	state Exp;
branches;
next	1.193.2.8;

1.193.2.8
date	2006.10.09.23.38.14;	author momjian;	state Exp;
branches;
next	1.193.2.9;

1.193.2.9
date	2007.01.05.20.52.58;	author momjian;	state Exp;
branches;
next	1.193.2.10;

1.193.2.10
date	2007.04.19.04.04.14;	author momjian;	state Exp;
branches;
next	1.193.2.11;

1.193.2.11
date	2007.09.11.17.36.33;	author momjian;	state Exp;
branches;
next	;

1.225.2.1
date	2003.09.07.04.36.40;	author momjian;	state Exp;
branches;
next	;

1.238.2.1
date	2003.11.14.17.54.15;	author momjian;	state Exp;
branches;
next	1.238.2.2;

1.238.2.2
date	2003.11.16.04.51.23;	author momjian;	state Exp;
branches;
next	1.238.2.3;

1.238.2.3
date	2003.12.13.16.57.36;	author momjian;	state Exp;
branches;
next	1.238.2.4;

1.238.2.4
date	2006.01.05.03.59.47;	author momjian;	state Exp;
branches;
next	1.238.2.5;

1.238.2.5
date	2006.02.12.18.50.26;	author momjian;	state Exp;
branches;
next	1.238.2.6;

1.238.2.6
date	2006.05.21.20.28.25;	author momjian;	state Exp;
branches;
next	1.238.2.7;

1.238.2.7
date	2006.10.09.23.38.33;	author momjian;	state Exp;
branches;
next	1.238.2.8;

1.238.2.8
date	2007.01.05.20.53.11;	author momjian;	state Exp;
branches;
next	1.238.2.9;

1.238.2.9
date	2007.04.19.04.04.30;	author momjian;	state Exp;
branches;
next	1.238.2.10;

1.238.2.10
date	2007.09.11.17.36.45;	author momjian;	state Exp;
branches;
next	;

1.292.4.1
date	2005.01.19.03.15.28;	author momjian;	state Exp;
branches;
next	1.292.4.2;

1.292.4.2
date	2005.01.19.19.53.58;	author momjian;	state Exp;
branches;
next	1.292.4.3;

1.292.4.3
date	2005.01.30.04.22.49;	author momjian;	state Exp;
branches;
next	1.292.4.4;

1.292.4.4
date	2005.01.30.04.26.39;	author momjian;	state Exp;
branches;
next	1.292.4.5;

1.292.4.5
date	2005.01.30.04.45.23;	author momjian;	state Exp;
branches;
next	1.292.4.6;

1.292.4.6
date	2005.02.01.02.41.51;	author momjian;	state Exp;
branches;
next	1.292.4.7;

1.292.4.7
date	2005.02.02.13.41.57;	author momjian;	state Exp;
branches;
next	1.292.4.8;

1.292.4.8
date	2005.02.02.17.44.50;	author momjian;	state Exp;
branches;
next	1.292.4.9;

1.292.4.9
date	2005.02.25.00.33.45;	author momjian;	state Exp;
branches;
next	1.292.4.10;

1.292.4.10
date	2005.03.11.21.47.34;	author momjian;	state Exp;
branches;
next	1.292.4.11;

1.292.4.11
date	2005.04.01.16.42.58;	author momjian;	state Exp;
branches;
next	1.292.4.12;

1.292.4.12
date	2005.05.09.17.24.03;	author momjian;	state Exp;
branches;
next	1.292.4.13;

1.292.4.13
date	2005.06.03.18.17.53;	author momjian;	state Exp;
branches;
next	1.292.4.14;

1.292.4.14
date	2005.09.22.22.14.09;	author momjian;	state Exp;
branches;
next	1.292.4.15;

1.292.4.15
date	2005.10.04.14.18.43;	author momjian;	state Exp;
branches;
next	1.292.4.16;

1.292.4.16
date	2005.10.05.11.27.09;	author momjian;	state Exp;
branches;
next	1.292.4.17;

1.292.4.17
date	2005.11.05.01.36.41;	author momjian;	state Exp;
branches;
next	1.292.4.18;

1.292.4.18
date	2006.01.05.04.00.26;	author momjian;	state Exp;
branches;
next	1.292.4.19;

1.292.4.19
date	2006.02.12.18.50.44;	author momjian;	state Exp;
branches;
next	1.292.4.20;

1.292.4.20
date	2006.05.21.20.28.35;	author momjian;	state Exp;
branches;
next	1.292.4.21;

1.292.4.21
date	2006.10.09.23.38.43;	author momjian;	state Exp;
branches;
next	1.292.4.22;

1.292.4.22
date	2007.01.05.20.53.30;	author momjian;	state Exp;
branches;
next	1.292.4.23;

1.292.4.23
date	2007.04.19.04.04.41;	author momjian;	state Exp;
branches;
next	1.292.4.24;

1.292.4.24
date	2007.09.11.17.36.56;	author momjian;	state Exp;
branches;
next	;

1.362.2.1
date	2005.12.08.21.37.53;	author momjian;	state Exp;
branches;
next	1.362.2.2;

1.362.2.2
date	2005.12.08.22.31.07;	author momjian;	state Exp;
branches;
next	1.362.2.3;

1.362.2.3
date	2006.01.05.04.02.24;	author momjian;	state Exp;
branches;
next	1.362.2.4;

1.362.2.4
date	2006.02.12.17.17.38;	author momjian;	state Exp;
branches;
next	1.362.2.5;

1.362.2.5
date	2006.02.24.15.00.48;	author momjian;	state Exp;
branches;
next	1.362.2.6;

1.362.2.6
date	2006.02.25.04.30.05;	author momjian;	state Exp;
branches;
next	1.362.2.7;

1.362.2.7
date	2006.04.05.22.56.11;	author momjian;	state Exp;
branches;
next	1.362.2.8;

1.362.2.8
date	2006.04.13.11.42.34;	author momjian;	state Exp;
branches;
next	1.362.2.9;

1.362.2.9
date	2006.05.19.03.34.49;	author momjian;	state Exp;
branches;
next	1.362.2.10;

1.362.2.10
date	2006.05.19.03.57.17;	author momjian;	state Exp;
branches;
next	1.362.2.11;

1.362.2.11
date	2006.10.09.23.39.03;	author momjian;	state Exp;
branches;
next	1.362.2.12;

1.362.2.12
date	2006.10.10.00.29.13;	author momjian;	state Exp;
branches;
next	1.362.2.13;

1.362.2.13
date	2007.01.05.20.53.48;	author momjian;	state Exp;
branches;
next	1.362.2.14;

1.362.2.14
date	2007.04.19.04.04.50;	author momjian;	state Exp;
branches;
next	1.362.2.15;

1.362.2.15
date	2007.09.11.17.37.08;	author momjian;	state Exp;
branches;
next	;

1.402.2.1
date	2006.12.03.16.43.05;	author momjian;	state Exp;
branches;
next	1.402.2.2;

1.402.2.2
date	2006.12.11.22.48.07;	author momjian;	state Exp;
branches;
next	1.402.2.3;

1.402.2.3
date	2007.01.05.20.55.28;	author momjian;	state Exp;
branches;
next	1.402.2.4;

1.402.2.4
date	2007.02.01.04.56.40;	author momjian;	state Exp;
branches;
next	1.402.2.5;

1.402.2.5
date	2007.02.06.18.38.04;	author momjian;	state Exp;
branches;
next	1.402.2.6;

1.402.2.6
date	2007.02.07.03.16.59;	author momjian;	state Exp;
branches;
next	1.402.2.7;

1.402.2.7
date	2007.04.19.03.07.22;	author momjian;	state Exp;
branches;
next	1.402.2.8;

1.402.2.8
date	2007.09.11.17.37.29;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.465
log
@Remove FAQ and FAQ_DEV ASCII and HTML files from CVS;  now on the wiki.

Per-language files kept for transator usage.
@
text
@
                Frequently Asked Questions (FAQ) for PostgreSQL
                                       
   Last updated: Tue Sep 23 16:19:49 EDT 2008
   
   Current maintainer: Bruce Momjian (bruce@@momjian.us)
   
   The most recent version of this document can be viewed at
   http://www.postgresql.org/files/documentation/faqs/FAQ.html.
   
   Platform-specific questions are answered at
   http://www.postgresql.org/docs/faq/.
     _________________________________________________________________
   
                             General Questions
                                      
   1.1) What is PostgreSQL? How is it pronounced? What is Postgres?
   1.2) Who controls PostgreSQL?
   1.3) What is the copyright of PostgreSQL?
   1.4) What platforms does PostgreSQL support?
   1.5) Where can I get PostgreSQL?
   1.6) What is the most recent release?
   1.7) Where can I get support?
   1.8) How do I submit a bug report?
   1.9) How do I find out about known bugs or missing features?
   1.10) What documentation is available?
   1.11) How can I learn SQL?
   1.12) How do I submit a patch or join the development team?
   1.13) How does PostgreSQL compare to other DBMSs? Can PostgreSQL be
   embedded?
   1.14) Will PostgreSQL handle recent daylight saving time changes in
   various countries?
   1.15) How do I unsubscribe from the PostgreSQL email lists? How do I
   avoid receiving duplicate emails?
   
                           User Client Questions
                                      
   2.1) What interfaces are available for PostgreSQL?
   2.2) What tools are available for using PostgreSQL with Web pages?
   2.3) Does PostgreSQL have a graphical user interface?
   
                          Administrative Questions
                                      
   3.1) How do I install PostgreSQL somewhere other than
   /usr/local/pgsql?
   3.2) How do I control connections from other hosts?
   3.3) How do I tune the database engine for better performance?
   3.4) What debugging features are available?
   3.5) Why do I get "Sorry, too many clients" when trying to connect?
   3.6 What is the upgrade process for PostgreSQL?
   3.7) What computer hardware should I use?
   
                           Operational Questions
                                      
   4.1) How do I SELECT only the first few rows of a query? A random row?
   4.2) How do I find out what tables, indexes, databases, and users are
   defined? How do I see the queries used by psql to display them?
   4.3) How do you change a column's data type?
   4.4) What is the maximum size for a row, a table, and a database?
   4.5) How much database disk space is required to store data from a
   typical text file?
   4.6) Why are my queries slow? Why don't they use my indexes?
   4.7) How do I see how the query optimizer is evaluating my query?
   4.8) How do I perform regular expression searches and case-insensitive
   regular expression searches? How do I use an index for
   case-insensitive searches?
   4.9) In a query, how do I detect if a field is NULL? How do I
   concatenate possible NULLs? How can I sort on whether a field is NULL
   or not?
   4.10) What is the difference between the various character types?
   4.11.1) How do I create a serial/auto-incrementing field?
   4.11.2) How do I get the value of a SERIAL insert?
   4.11.3) Doesn't currval() lead to a race condition with other users?
   4.11.4) Why aren't my sequence numbers reused on transaction abort?
   Why are there gaps in the numbering of my sequence/SERIAL column?
   4.12) What is an OID? What is a CTID?
   4.13) Why do I get the error "ERROR: Memory exhausted in
   AllocSetAlloc()"?
   4.14) How do I tell what PostgreSQL version I am running?
   4.15) How do I create a column that will default to the current time?
   4.16) How do I perform an outer join?
   4.17) How do I perform queries using multiple databases?
   4.18) How do I return multiple rows or columns from a function?
   4.19) Why do I get "relation with OID ##### does not exist" errors
   when accessing temporary tables in PL/PgSQL functions?
   4.20) What replication solutions are available?
   4.21) Why are my table and column names not recognized in my query?
   Why is capitalization not preserved?
     _________________________________________________________________
   
                             General Questions
                                      
  1.1) What is PostgreSQL? How is it pronounced? What is Postgres?
  
   PostgreSQL is pronounced Post-Gres-Q-L. (For those curious about how
   to say "PostgreSQL", an audio file is available.)
   
   PostgreSQL is an object-relational database system that has the
   features of traditional commercial database systems with enhancements
   to be found in next-generation DBMS systems. PostgreSQL is free and
   the complete source code is available.
   
   PostgreSQL development is performed by a team of mostly volunteer
   developers spread throughout the world and communicating via the
   Internet. It is a community project and is not controlled by any
   company. To get involved, see the developer's FAQ at
   http://www.postgresql.org/docs/faqs.FAQ_DEV.html
   
   Postgres is a widely-used nickname for PostgreSQL. It was the original
   name of the project at Berkeley and is strongly preferred over other
   nicknames. If you find 'PostgreSQL' hard to pronounce, call it
   'Postgres' instead.
   
  1.2) Who controls PostgreSQL?
  
   If you are looking for a PostgreSQL gatekeeper, central committee, or
   controlling company, give up --- there isn't one. We do have a core
   committee and CVS committers, but these groups are more for
   administrative purposes than control. The project is directed by the
   community of developers and users, which anyone can join. All you need
   to do is subscribe to the mailing lists and participate in the
   discussions. (See the Developer's FAQ for information on how to get
   involved in PostgreSQL development.)
   
  1.3) What is the copyright of PostgreSQL?
  
   PostgreSQL is distributed under the classic BSD license. Basically, it
   allows users to do anything they want with the code, including
   reselling binaries without the source code. The only restriction is
   that you not hold us legally liable for problems with the software.
   There is also the requirement that this copyright appear in all copies
   of the software. Here is the actual BSD license we use:
   
   PostgreSQL Data Base Management System
   
   Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
   Portions Copyright (c) 1994-1996 Regents of the University of
   California
   
   Permission to use, copy, modify, and distribute this software and its
   documentation for any purpose, without fee, and without a written
   agreement is hereby granted, provided that the above copyright notice
   and this paragraph and the following two paragraphs appear in all
   copies.
   
   IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
   FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
   INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND
   ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN
   ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   
   THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
   PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
   CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
   UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
   
  1.4) What platforms does PostgreSQL support?
  
   In general, any modern Unix-compatible platform should be able to run
   PostgreSQL. The platforms that had received explicit testing at the
   time of release are listed in the installation instructions.
   
   PostgreSQL also runs natively on Microsoft Windows NT-based operating
   systems like Win2000 SP4, WinXP, and Win2003. A prepackaged installer
   is available at http://www.postgresql.org/download/windows.
   MSDOS-based versions of Windows (Win95, Win98, WinMe) can run
   PostgreSQL using Cygwin.
   
   There is also a Novell Netware 6 port at
   http://developer.novell.com/wiki/index.php/Postgresql, and an OS/2
   (eComStation) version at
   http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&button=Search&key=postgre
   SQL&stype=all&sort=type&dir=%2F.
   
  1.5) Where can I get PostgreSQL?
  
   Via web browser, use http://www.postgresql.org/ftp/, and via ftp, use
   ftp://ftp.postgresql.org/pub/.
   
  1.6) What is the most recent release?
  
   The latest release of PostgreSQL is version 8.3.3.
   
   We plan to have a major release every year, with minor releases every
   few months.
   
  1.7) Where can I get support?
  
   The PostgreSQL community provides assistance to many of its users via
   email. The main web site to subscribe to the email lists is
   http://www.postgresql.org/community/lists/. The general or bugs lists
   are a good place to start.
   
   The major IRC channel is #postgresql on Freenode (irc.freenode.net).
   To connect you can use the Unix program irc -c '#postgresql' "$USER"
   irc.freenode.net or use any other IRC clients. A Spanish one also
   exists on the same network, (#postgresql-es), a French one,
   (#postgresqlfr), and a Brazilian one, (#postgresql-br). There is also
   a PostgreSQL channel on EFNet.
   
   A list of commercial support companies is available at
   http://www.postgresql.org/support/professional_support.
   
  1.8) How do I submit a bug report?
  
   Visit the PostgreSQL bug form at
   http://www.postgresql.org/support/submitbug. Also check out our ftp
   site ftp://ftp.postgresql.org/pub/ to see if there is a more recent
   PostgreSQL version.
   
   Bugs submitted using the bug form or posted to any PostgreSQL mailing
   list typically generates one of the following replies:
     * It is not a bug, and why
     * It is a known bug and is already on the TODO list
     * The bug has been fixed in the current release
     * The bug has been fixed but is not packaged yet in an official
       release
     * A request is made for more detailed information:
          + Operating system
          + PostgreSQL version
          + Reproducible test case
          + Debugging information
          + Debugger backtrace output
     * The bug is new. The following might happen:
          + A patch is created and will be included in the next major or
            minor release
          + The bug cannot be fixed immediately and is added to the TODO
            list
       
  1.9) How do I find out about known bugs or missing features?
  
   PostgreSQL supports an extended subset of SQL:2003. See our TODO list
   for known bugs, missing features, and future plans.
   
   A feature request usually results in one of the following replies:
     * The feature is already on the TODO list
     * The feature is not desired because:
          + It duplicates existing functionality that already follows the
            SQL standard
          + The feature would increase code complexity but add little
            benefit
          + The feature would be insecure or unreliable
     * The new feature is added to the TODO list
       
   PostgreSQL does not use a bug tracking system because we find it more
   efficient to respond directly to email and keep the TODO list
   up-to-date. In practice, bugs don't last very long in the software,
   and bugs that affect a large number of users are fixed rapidly. The
   only place to find all changes, improvements, and fixes in a
   PostgreSQL release is to read the CVS log messages. Even the release
   notes do not list every change made to the software.
   
  1.10) What documentation is available?
  
   PostgreSQL includes extensive documentation, including a large manual,
   manual pages, and some test examples. See the /doc directory. You can
   also browse the manuals online at http://www.postgresql.org/docs.
   
   There are two PostgreSQL books available online at
   http://www.postgresql.org/docs/books/awbook.html and
   http://www.commandprompt.com/ppbook/. There are a number of PostgreSQL
   books available for purchase. One of the most popular ones is by Korry
   Douglas. A list of book reviews can be found at
   http://www.postgresql.org/docs/books/. There is also a collection of
   PostgreSQL technical articles at
   http://wiki.postgresql.org/wiki/Community_Generated_Articles%2C_Guides
   %2C_and_Documentation.
   
   The command line client program psql has some \d commands to show
   information about types, operators, functions, aggregates, etc. - use
   \? to display the available commands.
   
   Our web site contains even more documentation.
   
  1.11) How can I learn SQL?
  
   First, consider the PostgreSQL-specific books mentioned above. Many of
   our users also like The Practical SQL Handbook, Bowman, Judith S., et
   al., Addison-Wesley. Others like The Complete Reference SQL, Groff et
   al., McGraw-Hill.
   
   There are also many nice tutorials available online:
     * http://www.intermedia.net/support/sql/sqltut.shtm
     * http://sqlcourse.com
     * http://www.w3schools.com/sql/default.asp
     * http://mysite.verizon.net/Graeme_Birchall/id1.html
     * http://sqlzoo.net
       
  1.12) How do I submit a patch or join the development team?
  
   See the Developer's FAQ.
   
  1.13) How does PostgreSQL compare to other DBMSs? Can PostgreSQL be embedded?
  
   There are several ways of measuring software: features, performance,
   reliability, support, and price.
   
   Features
          PostgreSQL has most features present in large commercial DBMSs,
          like transactions, subselects, triggers, views, foreign key
          referential integrity, and sophisticated locking. We have some
          features they do not have, like user-defined types,
          inheritance, rules, and multi-version concurrency control to
          reduce lock contention.
          
   Performance
          PostgreSQL's performance is comparable to other commercial and
          open source databases. It is faster for some things, slower for
          others. Our performance is usually +/-10% compared to other
          databases.
          
   Reliability
          We realize that a DBMS must be reliable, or it is worthless. We
          strive to release well-tested, stable code that has a minimum
          of bugs. Each release has at least one month of beta testing,
          and our release history shows that we can provide stable, solid
          releases that are ready for production use. We believe we
          compare favorably to other database software in this area.
          
   Support
          Our mailing lists provide contact with a large group of
          developers and users to help resolve any problems encountered.
          While we cannot guarantee a fix, commercial DBMSs do not always
          supply a fix either. Direct access to developers, the user
          community, manuals, and the source code often make PostgreSQL
          support superior to other DBMSs. There is commercial
          per-incident support available for those who need it. (See FAQ
          section 1.7.)
          
   Price
          We are free for all use, both commercial and non-commercial.
          You can add our code to your product with no limitations,
          except those outlined in our BSD-style license stated above.
          
   PostgreSQL is designed as a client/server architecture, which requires
   separate processes for each client and server, and various helper
   processes. Many embedded architectures can support such requirements.
   However, if your embedded architecture requires the database server to
   run inside the application process, you cannot use Postgres and should
   select a lighter-weight database solution.
   
  1.14) Will PostgreSQL handle recent daylight saving time changes in various
  countries?
  
   USA daylight saving time changes are included in PostgreSQL release
   8.0.[4+], and all later major releases, e.g. 8.1. Canada and Western
   Australia changes are included in 8.0.[10+], 8.1.[6+], and all later
   major releases. PostgreSQL releases prior to 8.0 use the operating
   system's timezone database for daylight saving information.
   
  1.15) How do I unsubscribe from the PostgreSQL email lists? How do I avoid
  receiving duplicate emails?
  
   The PostgreSQL Majordomo page allows subscribing or unsubscribing from
   any of the PostgreSQL email lists. (You might need to have your
   Majordomo password emailed to you to log in.)
   
   All PostgreSQL email lists are configured so a group reply goes to the
   email list and the original email author. This is done so users
   receive the quickest possible email replies. If you would prefer not
   to receive duplicate email from the list in cases where you already
   receive an email directly, check eliminatecc from the Majordomo Change
   Settings page. You can also prevent yourself from receiving copies of
   emails you post to the lists by unchecking selfcopy.
     _________________________________________________________________
   
                           User Client Questions
                                      
  2.1) What interfaces are available for PostgreSQL?
  
   The PostgreSQL install includes only the C and embedded C interfaces.
   All other interfaces are independent projects that are downloaded
   separately; being separate allows them to have their own release
   schedule and development teams.
   
   Some programming languages like PHP include an interface to
   PostgreSQL. Interfaces for languages like Perl, TCL, Python, and many
   others are available at http://pgfoundry.org.
   
  2.2) What tools are available for using PostgreSQL with Web pages?
  
   A nice introduction to Database-backed Web pages can be seen at:
   http://www.webreview.com
   
   For Web integration, PHP (http://www.php.net) is an excellent
   interface.
   
   For complex cases, many use the Perl and DBD::Pg with CGI.pm or
   mod_perl.
   
  2.3) Does PostgreSQL have a graphical user interface?
  
   There are a large number of GUI Tools that are available for
   PostgreSQL from both commercial and open source developers. A detailed
   list can be found in the Community Guide to PostgreSQL GUI Tools.
     _________________________________________________________________
   
                          Administrative Questions
                                      
  3.1) How do I install PostgreSQL somewhere other than /usr/local/pgsql?
  
   Specify the --prefix option when running configure.
   
  3.2) How do I control connections from other hosts?
  
   By default, PostgreSQL only allows connections from the local machine
   using Unix domain sockets or TCP/IP connections. Other machines will
   not be able to connect unless you modify listen_addresses in the
   postgresql.conf file, enable host-based authentication by modifying
   the $PGDATA/pg_hba.conf file, and restart the database server.
   
  3.3) How do I tune the database engine for better performance?
  
   There are three major areas for potential performance improvement:
   
   Query Changes
          This involves modifying queries to obtain better performance:
          
          + Creation of indexes, including expression and partial indexes
          + Use of COPY instead of multiple INSERTs
          + Grouping of multiple statements into a single transaction to
            reduce commit overhead
          + Use of CLUSTER when retrieving many rows from an index
          + Use of LIMIT for returning a subset of a query's output
          + Use of Prepared queries
          + Use of ANALYZE to maintain accurate optimizer statistics
          + Regular use of VACUUM or pg_autovacuum
          + Dropping of indexes during large data changes
            
   Server Configuration
          A number of postgresql.conf settings affect performance. For
          more details, see Administration Guide/Server Run-time
          Environment/Run-time Configuration for a full listing, and for
          commentary see
          http://www.varlena.com/varlena/GeneralBits/Tidbits/annotated_co
          nf_e.html and
          http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html.
          
   Hardware Selection
          The effect of hardware on performance is detailed in
          http://www.powerpostgresql.com/PerfList/ and
          http://momjian.us/main/writings/pgsql/hw_performance/index.html
          .
          
  3.4) What debugging features are available?
  
   There are many log_* server configuration variables at
   http://www.postgresql.org/docs/current/interactive/runtime-config-logg
   ing.html that enable printing of query and process statistics which
   can be very useful for debugging and performance measurements.
   
  3.5) Why do I get "Sorry, too many clients" when trying to connect?
  
   You have reached the default limit of 100 database sessions. You need
   to increase the server's limit on how many concurrent backend
   processes it can start by changing the max_connections value in
   postgresql.conf and restarting the server.
   
  3.6) What is the upgrade process for PostgreSQL?
  
   See http://www.postgresql.org/support/versioning for a general
   discussion about upgrading, and
   http://www.postgresql.org/docs/current/static/install-upgrading.html
   for specific instructions.
   
  3.7) What computer hardware should I use?
  
   Because PC hardware is mostly compatible, people tend to believe that
   all PC hardware is of equal quality. It is not. ECC RAM, SCSI, and
   quality motherboards are more reliable and have better performance
   than less expensive hardware. PostgreSQL will run on almost any
   hardware, but if reliability and performance are important it is wise
   to research your hardware options thoroughly. A disk controller with a
   battery-backed cache is also useful. Our email lists can be used to
   discuss hardware options and tradeoffs.
     _________________________________________________________________
   
                           Operational Questions
                                      
  4.1) How do I SELECT only the first few rows of a query? A random row?
  
   To retrieve only a few rows, if you know at the number of rows needed
   at the time of the SELECT use LIMIT . If an index matches the ORDER BY
   it is possible the entire query does not have to be executed. If you
   don't know the number of rows at SELECT time, use a cursor and FETCH.
   
   To SELECT a random row, use:
    SELECT col
    FROM tab
    ORDER BY random()
    LIMIT 1;

  4.2) How do I find out what tables, indexes, databases, and users are
  defined? How do I see the queries used by psql to display them?
  
   Use the \dt command to see tables in psql. For a complete list of
   commands inside psql you can use \?. Alternatively you can read the
   source code for psql in file pgsql/src/bin/psql/describe.c, it
   contains SQL commands that generate the output for psql's backslash
   commands. You can also start psql with the -E option so it will print
   out the queries it uses to execute the commands you give. PostgreSQL
   also provides an SQL compliant INFORMATION SCHEMA interface you can
   query to get information about the database.
   
   There are also system tables beginning with pg_ that describe these
   too.
   
   Use psql -l will list all databases.
   
   Also try the file pgsql/src/tutorial/syscat.source. It illustrates
   many of the SELECTs needed to get information from the database system
   tables.
   
  4.3) How do you change a column's data type?
  
   Changing the data type of a column can be done easily in 8.0 and later
   with ALTER TABLE ALTER COLUMN TYPE.
   
   In earlier releases, do this:
    BEGIN;
    ALTER TABLE tab ADD COLUMN new_col new_data_type;
    UPDATE tab SET new_col = CAST(old_col AS new_data_type);
    ALTER TABLE tab DROP COLUMN old_col;
    COMMIT;

   You might then want to do VACUUM FULL tab to reclaim the disk space
   used by the expired rows.
   
  4.4) What is the maximum size for a row, a table, and a database?
  
   These are the limits:
   
   Maximum size for a database? unlimited (32 TB databases exist)
   Maximum size for a table? 32 TB
   Maximum size for a row? 400 GB
   Maximum size for a field? 1 GB
   Maximum number of rows in a table? unlimited
   Maximum number of columns in a table? 250-1600 depending on column
   types
   Maximum number of indexes on a table? unlimited
   
   Of course, these are not actually unlimited, but limited to available
   disk space and memory/swap space. Performance may suffer when these
   values get unusually large.
   
   The maximum table size of 32 TB does not require large file support
   from the operating system. Large tables are stored as multiple 1 GB
   files so file system size limits are not important.
   
   The maximum table size, row size, and maximum number of columns can be
   quadrupled by increasing the default block size to 32k. The maximum
   table size can also be increased using table partitioning.
   
   One limitation is that indexes can not be created on columns longer
   than about 2,000 characters. Fortunately, such indexes are rarely
   needed. Uniqueness is best guaranteed by a function index of an MD5
   hash of the long column, and full text indexing allows for searching
   of words within the column.
   
  4.5) How much database disk space is required to store data from a typical
  text file?
  
   A PostgreSQL database may require up to five times the disk space to
   store data from a text file.
   
   As an example, consider a file of 100,000 lines with an integer and
   text description on each line. Suppose the text string avergages
   twenty bytes in length. The flat file would be 2.8 MB. The size of the
   PostgreSQL database file containing this data can be estimated as 5.2
   MB:
    24 bytes: each row header (approximate)
    24 bytes: one int field and one text field
   + 4 bytes: pointer on page to tuple
   ----------------------------------------
    52 bytes per row

   The data page size in PostgreSQL is 8192 bytes (8 KB), so:

   8192 bytes per page
   -------------------   =  158 rows per database page (rounded down)
     52 bytes per row

   100000 data rows
   --------------------  =  633 database pages (rounded up)
      158 rows per page

633 database pages * 8192 bytes per page  =  5,185,536 bytes (5.2 MB)

   Indexes do not require as much overhead, but do contain the data that
   is being indexed, so they can be large also.
   
   NULLs are stored as bitmaps, so they use very little space.
   
  4.6) Why are my queries slow? Why don't they use my indexes?
  
   Indexes are not used by every query. Indexes are used only if the
   table is larger than a minimum size, and the query selects only a
   small percentage of the rows in the table. This is because the random
   disk access caused by an index scan can be slower than a straight read
   through the table, or sequential scan.
   
   To determine if an index should be used, PostgreSQL must have
   statistics about the table. These statistics are collected using
   VACUUM ANALYZE, or simply ANALYZE. Using statistics, the optimizer
   knows how many rows are in the table, and can better determine if
   indexes should be used. Statistics are also valuable in determining
   optimal join order and join methods. Statistics collection should be
   performed periodically as the contents of the table change.
   
   Indexes are normally not used for ORDER BY or to perform joins. A
   sequential scan followed by an explicit sort is usually faster than an
   index scan of a large table. However, LIMIT combined with ORDER BY
   often will use an index because only a small portion of the table is
   returned.
   
   If you believe the optimizer is incorrect in choosing a sequential
   scan, use SET enable_seqscan TO 'off' and run query again to see if an
   index scan is indeed faster.
   
   When using wild-card operators such as LIKE or ~, indexes can only be
   used in certain circumstances:
     * The beginning of the search string must be anchored to the start
       of the string, i.e.
          + LIKE patterns must not start with %.
          + ~ (regular expression) patterns must start with ^.
     * The search string can not start with a character class, e.g.
       [a-e].
     * Case-insensitive searches such as ILIKE and ~* do not utilize
       indexes. Instead, use expression indexes, which are described in
       section 4.8.
     * The default C locale must be used during initdb because it is not
       possible to know the next-greatest character in a non-C locale.
       You can create a special text_pattern_ops index for such cases
       that work only for LIKE indexing. It is also possible to use full
       text indexing for word searches.
       
  4.7) How do I see how the query optimizer is evaluating my query?
  
   See the EXPLAIN manual page.
   
  4.8) How do I perform regular expression searches and case-insensitive
  regular expression searches? How do I use an index for case-insensitive
  searches?
  
   The ~ operator does regular expression matching, and ~* does
   case-insensitive regular expression matching. The case-insensitive
   variant of LIKE is called ILIKE.
   
   Case-insensitive equality comparisons are normally expressed as:
    SELECT *
    FROM tab
    WHERE lower(col) = 'abc';

   This will not use an standard index. However, if you create an
   expression index, it will be used:
    CREATE INDEX tabindex ON tab (lower(col));

   If the above index is created as UNIQUE, though the column can store
   upper and lowercase characters, it can not have identical values that
   differ only in case. To force a particular case to be stored in the
   column, use a CHECK constraint or a trigger.
   
  4.9) In a query, how do I detect if a field is NULL? How do I concatenate
  possible NULLs? How can I sort on whether a field is NULL or not?
  
   You test the column with IS NULL and IS NOT NULL, like this:
   SELECT *
   FROM tab
   WHERE col IS NULL;

   To concatentate with possible NULLs, use COALESCE(), like this:
   SELECT COALESCE(col1, '') || COALESCE(col2, '')
   FROM tab

   To sort by the NULL status, use the IS NULL and IS NOT NULL modifiers
   in your ORDER BY clause. Things that are true will sort higher than
   things that are false, so the following will put NULL entries at the
   top of the resulting list:
   SELECT *
   FROM tab
   ORDER BY (col IS NOT NULL)

  4.10) What is the difference between the various character types?
  
        Type    Internal Name                    Notes
     VARCHAR(n) varchar       size specifies maximum length, no padding
     CHAR(n)    bpchar        blank padded to the specified fixed length
     TEXT       text          no specific upper limit on length
     BYTEA      bytea         variable-length byte array (null-byte safe)
     "char"     char          one character
   
   You will see the internal name when examining system catalogs and in
   some error messages.
   
   The first four types above are "varlena" types (i.e., the first four
   bytes on disk are the length, followed by the data). Thus the actual
   space used is slightly greater than the declared size. However, long
   values are also subject to compression, so the space on disk might
   also be less than expected.
   VARCHAR(n) is best when storing variable-length strings and it limits
   how long a string can be. TEXT is for strings of unlimited length,
   with a maximum of one gigabyte.
   
   CHAR(n) is for storing strings that are all the same length. CHAR(n)
   pads with blanks to the specified length, while VARCHAR(n) only stores
   the characters supplied. BYTEA is for storing binary data,
   particularly values that include NULL bytes. All the types described
   here have similar performance characteristics.
   
  4.11.1) How do I create a serial/auto-incrementing field?
  
   PostgreSQL supports a SERIAL data type. It auto-creates a sequence.
   For example, this:
    CREATE TABLE person (
        id   SERIAL,
        name TEXT
    );

   is automatically translated into this:
    CREATE SEQUENCE person_id_seq;
    CREATE TABLE person (
        id   INT4 NOT NULL DEFAULT nextval('person_id_seq'),
        name TEXT
    );

   Automatically created sequence are named <table>_<serialcolumn>_seq,
   where table and serialcolumn are the names of the table and SERIAL
   column, respectively. See the create_sequence manual page for more
   information about sequences.
   
  4.11.2) How do I get the value of a SERIAL insert?
  
   The simplest way is to retrieve the assigned SERIAL value with
   RETURNING. Using the example table in 4.11.1, it would look like this:
    INSERT INTO person (name) VALUES ('Blaise Pascal') RETURNING id;

   You can also call nextval() and use that value in the INSERT, or call
   currval() after the INSERT.
   
  4.11.3) Doesn't currval() lead to a race condition with other users?
  
   No. currval() returns the current value assigned by your session, not
   by all sessions.
   
  4.11.4) Why aren't my sequence numbers reused on transaction abort? Why are
  there gaps in the numbering of my sequence/SERIAL column?
  
   To improve concurrency, sequence values are given out to running
   transactions as needed and are not locked until the transaction
   completes. This causes gaps in numbering from aborted transactions.
   
  4.12) What is an OID? What is a CTID?
  
   If a table is created WITH OIDS, each row gets a unique a OID. OIDs
   are automatically assigned unique 4-byte integers that are unique
   across the entire installation. However, they overflow at 4 billion,
   and then the OIDs start being duplicated. PostgreSQL uses OIDs to link
   its internal system tables together.
   
   To uniquely number rows in user tables, it is best to use SERIAL
   rather than OIDs because SERIAL sequences are unique only within a
   single table. and are therefore less likely to overflow. SERIAL8 is
   available for storing eight-byte sequence values.
   
   CTIDs are used to identify specific physical rows with block and
   offset values. CTIDs change after rows are modified or reloaded. They
   are used by index entries to point to physical rows.
   
  4.13) Why do I get the error "ERROR: Memory exhausted in AllocSetAlloc()"?
  
   You probably have run out of virtual memory on your system, or your
   kernel has a low limit for certain resources. Try this before starting
   the server:
    ulimit -d 262144
    limit datasize 256m

   Depending on your shell, only one of these may succeed, but it will
   set your process data segment limit much higher and perhaps allow the
   query to complete. This command applies to the current process, and
   all subprocesses created after the command is run. If you are having a
   problem with the SQL client because the backend is returning too much
   data, try it before starting the client.
   
  4.14) How do I tell what PostgreSQL version I am running?
  
   From psql, type SELECT version();
   
  4.15) How do I create a column that will default to the current time?
  
   Use CURRENT_TIMESTAMP:
    CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );

  4.16) How do I perform an outer join?
  
   PostgreSQL supports outer joins using the SQL standard syntax. Here
   are two examples:
    SELECT *
    FROM t1 LEFT OUTER JOIN t2 ON (t1.col = t2.col);

   or
    SELECT *
    FROM t1 LEFT OUTER JOIN t2 USING (col);

   These identical queries join t1.col to t2.col, and also return any
   unjoined rows in t1 (those with no match in t2). A RIGHT join would
   add unjoined rows of t2. A FULL join would return the matched rows
   plus all unjoined rows from t1 and t2. The word OUTER is optional and
   is assumed in LEFT, RIGHT, and FULL joins. Ordinary joins are called
   INNER joins.
   
  4.17) How do I perform queries using multiple databases?
  
   There is no way to query a database other than the current one.
   Because PostgreSQL loads database-specific system catalogs, it is
   uncertain how a cross-database query should even behave.
   
   contrib/dblink allows cross-database queries using function calls. Of
   course, a client can also make simultaneous connections to different
   databases and merge the results on the client side.
   
  4.18) How do I return multiple rows or columns from a function?
  
   It is easy using set-returning functions,
   http://wiki.postgresql.org/wiki/Return_more_than_one_row_of_data_from_
   PL/pgSQL_functions.
   
  4.19) Why do I get "relation with OID ##### does not exist" errors when
  accessing temporary tables in PL/PgSQL functions?
  
   In PostgreSQL versions < 8.3, PL/PgSQL caches function scripts, and an
   unfortunate side effect is that if a PL/PgSQL function accesses a
   temporary table, and that table is later dropped and recreated, and
   the function called again, the function will fail because the cached
   function contents still point to the old temporary table. The solution
   is to use EXECUTE for temporary table access in PL/PgSQL. This will
   cause the query to be reparsed every time.
   
   This problem does not occur in PostgreSQL 8.3 and later.
   
  4.20) What replication solutions are available?
  
   Though "replication" is a single term, there are several technologies
   for doing replication, with advantages and disadvantages for each.
   
   Master/slave replication allows a single master to receive read/write
   queries, while slaves can only accept read/SELECT queries. The most
   popular freely available master-slave PostgreSQL replication solution
   is Slony-I.
   
   Multi-master replication allows read/write queries to be sent to
   multiple replicated computers. This capability also has a severe
   impact on performance due to the need to synchronize changes between
   servers. PGCluster is the most popular such solution freely available
   for PostgreSQL.
   
   There are also commercial and hardware-based replication solutions
   available supporting a variety of replication models.
   
  4.21) Why are my table and column names not recognized in my query? Why is
  capitalization not preserved?
  
   The most common cause of unrecognized names is the use of
   double-quotes around table or column names during table creation. When
   double-quotes are used, table and column names (called identifiers)
   are stored case-sensitive, meaning you must use double-quotes when
   referencing the names in a query. Some interfaces, like pgAdmin,
   automatically double-quote identifiers during table creation. So, for
   identifiers to be recognized, you must either:
     * Avoid double-quoting identifiers when creating tables
     * Use only lowercase characters in identifiers
     * Double-quote identifiers when referencing them in queries
@


1.464
log
@Update copyright for 2009.
@
text
@@


1.463
log
@Mention battery-backed cache under hardware selection options.
@
text
@d136 1
a136 1
   Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
@


1.462
log
@Update link to developer's FAQ from main FAQ.
@
text
@d4 1
a4 1
   Last updated: Fri Aug 22 21:55:19 EDT 2008
d475 3
a477 2
   to research your hardware options thoroughly. Our email lists can be
   used to discuss hardware options and tradeoffs.
@


1.461
log
@Add new SQL training web site to FAQ:

    <LI><A href=
    "http://sqlzoo.net">http://sqlzoo.net</A>
    </LI>
@
text
@d4 1
a4 1
   Last updated: Fri Aug 15 20:32:19 EDT 2008
@


1.460
log
@More FAQ URL updates from Curtis Gallant.
@
text
@d4 1
a4 1
   Last updated: Wed Jun 25 23:54:14 EDT 2008
d289 1
@


1.459
log
@Update FAQ URLs as suggested by Curtis Gallant.
@
text
@d4 1
a4 1
   Last updated: Wed Jun 25 23:02:18 EDT 2008
d184 1
a184 1
   The latest release of PostgreSQL is version 8.3.1.
d268 2
a269 1
   http://www.postgresql.org/docs/techdocs.
d448 4
a451 3
   There are many log_* server configuration variables that enable
   printing of query and process statistics which can be very useful for
   debugging and performance measurements.
@


1.458
log
@Update wording from David Fetter.
@
text
@d4 1
a4 1
   Last updated: Fri Apr 25 10:34:17 EDT 2008
d167 7
a173 6
   is available at http://pgfoundry.org/projects/pginstaller. MSDOS-based
   versions of Windows (Win95, Win98, WinMe) can run PostgreSQL using
   Cygwin.
   
   There is also a Novell Netware 6 port at http://forge.novell.com, and
   an OS/2 (eComStation) version at
d395 1
a395 1
   list can be found in the PostgreSQL Community Documentation
d822 2
a823 1
   http://www.postgresql.org/docs/techdocs.17.
@


1.457
log
@Update to remove passive wording from FAQ, David Fetter
@
text
@d4 1
a4 1
   Last updated: Fri Apr 25 10:28:05 EDT 2008
d338 2
a339 2
   run inside the application process, you cannot use Postgres and a
   lighter-weight database solution should be selected.
@


1.456
log
@Add embedded usage mention to FAQ, per Greg Smith.
@
text
@d4 1
a4 1
   Last updated: Thu Apr 24 15:58:18 EDT 2008
d338 1
a338 1
   run inside the application process, Postgres cannot be used and a
@


1.455
log
@Update most recent release to 8.3.1.
@
text
@d4 1
a4 1
   Last updated: Wed Apr 16 16:57:09 EDT 2008
d29 2
a30 1
   1.13) How does PostgreSQL compare to other DBMSs?
d292 1
a292 1
  1.13) How does PostgreSQL compare to other DBMSs?
d334 7
@


1.454
log
@Update text FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Apr 8 21:04:00 EDT 2008
d182 1
a182 1
   The latest release of PostgreSQL is version 8.3.
@


1.453
log
@Remove mention of the Berkeley origins of the alias "Postgres" ---
seems unnecessary to mention in the FAQ, per discussion on IRC.
@
text
@d4 1
a4 1
   Last updated: Tue Apr 8 20:43:08 EDT 2008
d108 4
a111 2
   Postgres is a widely-used nickname for PostgreSQL. If you find
   'PostgreSQL' hard to pronounce, call it 'Postgres' instead.
@


1.452
log
@Fix markup.
@
text
@d4 1
a4 1
   Last updated: Mon Mar 3 11:22:50 EST 2008
d108 2
a109 4
   Postgres is a widely-used nickname for PostgreSQL. It was the original
   name of the project at Berkeley and is strongly preferred over other
   nicknames. If you find 'PostgreSQL' hard to pronounce, call it
   'Postgres' instead.
@


1.451
log
@Add new FAQ item:

    <H3 id="item1.15">1.15) How do I unsubscribe from the
    PostgreSQL email lists?  How do I avoid receiving duplicate
    emails?</H3>
@
text
@d4 1
a4 1
   Last updated: Mon Mar 3 10:55:13 EST 2008
@


1.450
log
@Update FAQ for most recent release as 8.3.
@
text
@d4 1
a4 1
   Last updated: Thu Jan 31 21:55:29 EST 2008
d32 2
d341 15
@


1.449
log
@Most recent Postgres version is 8.2.6, per report from Robert Treat.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 14 15:39:06 EST 2008
d180 1
a180 1
   The latest release of PostgreSQL is version 8.2.6.
@


1.448
log
@Update copyrights in source tree to 2008.
@
text
@d4 1
a4 1
   Last updated: Sun Dec 9 19:31:34 EST 2007
d180 1
a180 1
   The latest release of PostgreSQL is version 8.2.5.
@


1.447
log
@FAQ wording and markup fix.

Euler Taveira de Oliveira
@
text
@d133 1
a133 1
   Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
@


1.446
log
@Simplify wording.
@
text
@d4 1
a4 1
   Last updated: Fri Nov 16 10:53:50 EST 2007
d90 1
a90 1
  1.1) What is PostgreSQL? How is it pronounced?
@


1.445
log
@Add FAQ items about "Postgres" alias usage, remove old reference.
@
text
@d4 1
a4 1
   Last updated: Fri Nov 16 10:50:15 EST 2007
d106 4
a109 4
   Postgres is a widely-used nickname for the PostgreSQL database. It was
   the original name of the project at Berkeley and is strongly preferred
   over other nicknames. If you find 'PostgreSQL' hard to pronounce, call
   it 'Postgres' instead.
@


1.444
log
@Markup cleanup.
@
text
@d4 1
a4 1
   Last updated: Tue Nov 13 22:39:46 EST 2007
d17 1
a17 1
   1.1) What is PostgreSQL? How is it pronounced?
d92 2
a93 3
   PostgreSQL is pronounced Post-Gres-Q-L, but can also be referred to as
   simply Postgres, particularly in conversation. (For those curious
   about how to say "PostgreSQL", an audio file is available.)
d106 5
@


1.443
log
@Remove reference to gborg, instead reference pgfoundry.
@
text
@d4 1
a4 1
   Last updated: Tue Nov 13 22:37:19 EST 2007
@


1.442
log
@Clarify restart is of the "database" server, in FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Oct 29 13:22:07 EDT 2007
d348 1
a348 2
   others are available at http://gborg.postgresql.org in the
   Drivers/Interfaces section and via Internet search.
@


1.441
log
@Remove use of "Postgres" aliases in the FAQ in second-in-paragraph
cases.
@
text
@d4 1
a4 1
   Last updated: Fri Oct 26 14:59:45 EDT 2007
d381 1
a381 1
   the $PGDATA/pg_hba.conf file, and restart the server.
@


1.440
log
@Re-add FAQ item:

    <H3 id="item4.19">4.19) Why do I get "relation with OID #####
    does not exist" errors when accessing temporary tables in PL/PgSQL
    functions?</H3>
@
text
@d4 1
a4 1
   Last updated: Wed Oct 17 13:34:42 EDT 2007
d116 1
a116 1
   involved in Postgres development.)
d161 1
a161 1
   versions of Windows (Win95, Win98, WinMe) can run Postgres using
d203 1
a203 1
   Postgres version.
d243 3
a245 3
   only place to find all changes, improvements, and fixes in a Postgres
   release is to read the CVS log messages. Even the release notes do not
   list every change made to the software.
d538 1
a538 1
   Postgres database file containing this data can be estimated as 5.2
d546 1
a546 1
   The data page size in Postgres is 8192 bytes (8 KB), so:
@


1.439
log
@Attached some minor corrections, mainly completion of removal of
the  "relation with OID ##### does not exist" item, and some URL
corrections.

Ian Barwick
@
text
@d4 1
a4 1
   Last updated: Fri Oct 12 23:36:59 EDT 2007
d81 4
a84 2
   4.19) What replication solutions are available?
   4.20) Why are my table and column names not recognized in my query?
d795 14
a808 1
  4.19) What replication solutions are available?
d827 1
a827 1
  4.20) Why are my table and column names not recognized in my query? Why is
@


1.438
log
@Add mention of full text indexing for word searches.
@
text
@d4 1
a4 1
   Last updated: Tue Oct 9 16:13:00 EDT 2007
d103 1
a103 1
   http://www.postgresql.org/files/documentation/faqs/FAQ_DEV.html
d256 3
a258 3
   http://techdocs.postgresql.org/techdocs/bookreviews.php. There is also
   a collection of PostgreSQL technical articles at
   http://techdocs.postgresql.org/.
d268 4
a271 6
   First, consider the PostgreSQL-specific books mentioned above. Another
   one is "Teach Yourself SQL in 21 Days, Second Edition" at
   http://members.tripod.com/er4ebus/sql/index.htm. Many of our users
   like The Practical SQL Handbook, Bowman, Judith S., et al.,
   Addison-Wesley. Others like The Complete Reference SQL, Groff et al.,
   McGraw-Hill.
d791 1
a791 13
   http://www.postgresql.org/docs/techdocs.17
   .
   
  4.19) Why do I get "relation with OID ##### does not exist" errors when
  accessing temporary tables in PL/PgSQL functions?
  
   PL/PgSQL caches function scripts, and an unfortunate side effect is
   that if a PL/PgSQL function accesses a temporary table, and that table
   is later dropped and recreated, and the function called again, the
   function will fail because the cached function contents still point to
   the old temporary table. The solution is to use EXECUTE for temporary
   table access in PL/PgSQL. This will cause the query to be reparsed
   every time.
@


1.437
log
@Remove FAQ item about temp tables in plpsql having invalid oid problems,
per suggestions from Pavel Stehule.
@
text
@d4 1
a4 1
   Last updated: Tue Oct 9 16:07:30 EDT 2007
d603 2
a604 1
       that work only for LIKE indexing.
a605 4
   In pre-8.0 releases, indexes often can not be used unless the data
   types exactly match the index's column types. This was particularly
   true of int2, int8, and numeric column indexes.
   
@


1.436
log
@Update sequence FAQ items, per suggestion from Pavel Stehule.
@
text
@d4 1
a4 1
   Last updated: Tue Oct 9 15:52:10 EDT 2007
d81 2
a82 4
   4.19) Why do I get "relation with OID ##### does not exist" errors
   when accessing temporary tables in PL/PgSQL functions?
   4.20) What replication solutions are available?
   4.21) Why are my table and column names not recognized in my query?
d810 1
a810 1
  4.20) What replication solutions are available?
d829 1
a829 1
  4.21) Why are my table and column names not recognized in my query? Why is
@


1.435
log
@Typo fix.

Euler Taveira de Oliveira
@
text
@d4 1
a4 1
   Last updated: Mon Oct 8 23:19:46 EDT 2007
d700 4
a703 2
   See the create_sequence manual page for more information about
   sequences.
d707 3
a709 17
   One approach is to retrieve the next SERIAL value from the sequence
   object with the nextval() function before inserting and then insert it
   explicitly. Using the example table in 4.11.1, an example in a
   pseudo-language would look like this:
    new_id = execute("SELECT nextval('person_id_seq')");
    execute("INSERT INTO person (id, name) VALUES (new_id, 'Blaise Pascal')");

   You would then also have the new value stored in new_id for use in
   other queries (e.g., as a foreign key to the person table). Note that
   the name of the automatically created SEQUENCE object will be named
   <table>_< serialcolumn>_seq, where table and serialcolumn are the
   names of your table and your SERIAL column, respectively.
   
   Alternatively, you could retrieve the assigned SERIAL value with the
   currval() function after it was inserted by default, e.g.,
    execute("INSERT INTO person (name) VALUES ('Blaise Pascal')");
    new_id = execute("SELECT currval('person_id_seq')");
d711 3
@


1.434
log
@Clarify user of "postmaster" vs. "server" in FAQs.

Brendan Jurd
@
text
@d4 1
a4 1
   Last updated: Thu Sep 27 02:14:24 EDT 2007
d843 7
a849 7
   The most common cause of recognized names is the use of double-quotes
   around table or column names during table creation. When double-quotes
   are used, table and column names (called identifiers) are stored
   case-sensitive, meaning you must use double-quotes when referencing
   the names in a query. Some interfaces, like pgAdmin, automatically
   double-quote identifiers during table creation. So, for identifiers to
   be recognized, you must either:
@


1.433
log
@Lowercase all mentions of "PostgreSQL" in URLs, per Magnus.
@
text
@d426 2
a427 2
   You have reached the default limit is 100 database sessions. You need
   to increase the postmaster's limit on how many concurrent backend
d429 1
a429 1
   postgresql.conf and restarting the postmaster.
d756 1
a756 1
   postmaster:
@


1.432
log
@Rename "PostgreSQL" to "Postgres" in 7 places in the FAQ.
@
text
@d4 1
a4 1
   Last updated: Wed Sep 26 16:36:22 EDT 2007
d172 1
a172 1
   ftp://ftp.PostgreSQL.org/pub/.
d202 1
a202 1
   site ftp://ftp.PostgreSQL.org/pub/ to see if there is a more recent
d251 1
a251 1
   also browse the manuals online at http://www.PostgreSQL.org/docs.
d258 1
a258 1
   http://techdocs.PostgreSQL.org/techdocs/bookreviews.php. There is also
d260 1
a260 1
   http://techdocs.PostgreSQL.org/.
@


1.431
log
@Fix markup.
@
text
@d4 1
a4 1
   Last updated: Fri Sep 14 14:39:54 EDT 2007
d116 1
a116 1
   involved in PostgreSQL development.)
d161 1
a161 1
   versions of Windows (Win95, Win98, WinMe) can run PostgreSQL using
d203 1
a203 1
   PostgreSQL version.
d243 3
a245 3
   only place to find all changes, improvements, and fixes in a
   PostgreSQL release is to read the CVS log messages. Even the release
   notes do not list every change made to the software.
d540 1
a540 1
   PostgreSQL database file containing this data can be estimated as 5.2
d548 1
a548 1
   The data page size in PostgreSQL is 8192 bytes (8 KB), so:
@


1.430
log
@Update pronunciation FAQ item.
@
text
@d4 1
a4 1
   Last updated: Fri Sep 14 14:38:35 EDT 2007
d94 1
a94 3
   about how to say "PostgreSQL", an
   href="http://www.postgresql.org/files/postgresql.mp3">audio file
   is available.)
@


1.429
log
@Update to mention alternate project name is "Postgres".
@
text
@d4 1
a4 1
   Last updated: Fri Sep 14 14:29:40 EDT 2007
d93 4
a96 2
   simply Postgres. An audio file is available in MP3 format for those
   would like to hear the pronunciation.
@


1.428
log
@Upcoming most recent release will be 8.2.5.
@
text
@d4 1
a4 1
   Last updated: Tue Sep 11 13:34:02 EDT 2007
d92 3
a94 3
   PostgreSQL is pronounced Post-Gres-Q-L, and is also sometimes referred
   to as just Postgres. An audio file is available in MP3 format for
   those would like to hear the pronunciation.
@


1.427
log
@Fix typo.
@
text
@d4 1
a4 1
   Last updated: Tue Apr 24 17:29:38 EDT 2007
d176 1
a176 1
   The latest release of PostgreSQL is version 8.2.4.
@


1.426
log
@Update FAQ item:

   <H3 id="item3.6">3.6) What is the upgrade process for
   PostgreSQL?</H3>

to reference both versioning and specific upgrade instructions.
@
text
@d4 1
a4 1
   Last updated: Tue Apr 24 17:28:23 EDT 2007
d434 1
a434 1
   discussion about upgading, and
@


1.425
log
@Remove duplicate text, per Magnus.
@
text
@d4 1
a4 1
   Last updated: Fri Apr 20 09:48:11 EDT 2007
d433 4
a436 1
   See http://www.postgresql.org/support/versioning.
@


1.424
log
@Update FAQ for 8.2.4.
@
text
@d4 1
a4 1
   Last updated: Wed Apr 18 23:05:05 EDT 2007
a632 3
   4.9) In a query, how do I detect if a field is NULL? How do I
   concatenate possible NULLs? How can I sort on whether a field is NULL
   or not?
@


1.423
log
@Re-add FAQ item 3.7 which was accidentally removed in previous commit:

    <H3 id="item3.7">3.7) What computer hardware should I use?</H3>
@
text
@d4 1
a4 1
   Last updated: Wed Apr 4 15:26:28 EDT 2007
d176 1
a176 1
   The latest release of PostgreSQL is version 8.2.3.
@


1.422
log
@In FAQ, reference upgrade info via URL.
@
text
@d4 1
a4 1
   Last updated: Tue Mar 20 13:43:40 EDT 2007
d434 10
@


1.421
log
@Update upgrade FAQ info.
@
text
@d4 1
a4 1
   Last updated: Fri Feb 23 14:06:15 EST 2007
d433 1
a433 31
   PostgreSQL major releases include new features and occur roughly once
   every year. A major release is numbered by increasing either the first
   or second part of the version number, e.g. 8.1 to 8.2.
   
   Major releases usually change the internal format of system tables and
   data files. These changes are often complex, so we don't maintain
   backward compatibility for data files. A dump/reload of the database
   is required for major upgrades.
   
   Minor releases are numbered by increasing the third part of the
   version number, e.g. 8.1.5 to 8.1.6. The PostgreSQL team only adds bug
   fixes to minor releases. All users should upgrade to the most recent
   minor release as soon as possible. While upgrades always have some
   risk, PostgreSQL minor releases fix only frequently-encountered,
   security, and data corruption bugs to reduce the risk of upgrading.
   The community considers not upgrading riskier than upgrading.
   `
   
   Upgrading to a minor release does not does not require a dump and
   restore; merely stop the database server, install the updated
   binaries, and restart the server.
   
  3.7) What computer hardware should I use?
  
   Because PC hardware is mostly compatible, people tend to believe that
   all PC hardware is of equal quality. It is not. ECC RAM, SCSI, and
   quality motherboards are more reliable and have better performance
   than less expensive hardware. PostgreSQL will run on almost any
   hardware, but if reliability and performance are important it is wise
   to research your hardware options thoroughly. Our email lists can be
   used to discuss hardware options and tradeoffs.
@


1.420
log
@Update upgrade wording.
@
text
@d4 1
a4 1
   Last updated: Wed Feb 21 17:54:05 EST 2007
d433 21
a453 15
   The PostgreSQL team only adds bug fixes to minor releases. All users
   should upgrade to the most recent minor release as soon as possible.
   While upgrades always have some risk, PostgreSQL minor releases fix
   only frequently-encountered, security, and data corruption bugs, to
   reduce the risk of upgrading. The community considers not upgrading
   more risky than upgrading.
   
   Upgrading to a minor release, e.g. 8.1.5 to 8.1.6, does not does not
   require a dump and restore; merely stop the database server, install
   the updated binaries, and restart the server.
   
   Major releases (e.g. from 7.3 to 7.4) often change the internal format
   of system tables and data files. These changes are often complex, so
   we don't maintain backward compatibility for data files. A dump/reload
   of the database is required for major upgrades.
@


1.419
log
@Update FAQ about minor updates.
@
text
@d4 1
a4 1
   Last updated: Wed Feb 21 14:47:53 EST 2007
d434 5
a438 5
   should upgrade to the most recent minor release as soon as it is
   available. While upgrades always have some risk, PostgreSQL minor
   releases fix only frequently-encountered, security, and data
   corruption bugs, to reduce the risk of upgrading. The community
   considers not upgrading more risky than upgrading.
@


1.418
log
@Fix typo, per Dave Page.
@
text
@d4 1
a4 1
   Last updated: Wed Feb 21 11:08:51 EST 2007
d433 1
a433 1
   The PostgreSQL team adds only bug fixes to minor releases. All users
d436 3
a438 3
   releases fix only frequently-encountered bugs to reduce the risk of
   upgrading. The community considers not upgrading more risky than
   upgrading.
@


1.417
log
@Update minor release text.
@
text
@d4 1
a4 1
   Last updated: Wed Feb 21 11:07:59 EST 2007
d437 1
a437 1
   upgrading. The community considers not upgrading more risky that
@


1.416
log
@Update upgrade text.
@
text
@d4 1
a4 1
   Last updated: Wed Feb 21 10:07:25 EST 2007
d433 10
a442 9
   The PostgreSQL team makes only bug fixes in minor releases, so, for
   example, upgrading from 7.4.8 to 7.4.9 does not require a dump and
   restore; merely stop the database server, install the updated
   binaries, and restart the server.
   
   All users should upgrade to the most recent minor release as soon as
   it is available. While upgrades always have some risk, PostgreSQL
   minor releases fix only common bugs to reduce the risk of upgrading.
   The community considers not upgrading more risky that upgrading.
@


1.415
log
@Update URL for set-returning functions.
@
text
@d4 1
a4 1
   Last updated: Tue Feb 20 22:50:50 EST 2007
d439 3
a441 3
   it is available. While every upgrade has some risk, PostgreSQL minor
   releases are designed to fix only common bugs with the least risk. The
   community considers not upgrading more risky that upgrading.
@


1.414
log
@Update FAQ for new 24-byte header, down from 28.
@
text
@d4 1
a4 1
   Last updated: Thu Feb 8 22:43:13 EST 2007
d820 1
a820 1
   http://techdocs.postgresql.org/guides/SetReturningFunctions
@


1.413
log
@Update for 8.2.3.
@
text
@d4 1
a4 1
   Last updated: Tue Feb 6 22:16:17 EST 2007
d550 1
a550 1
   PostgreSQL database file containing this data can be estimated as 5.6
d552 1
a552 1
    28 bytes: each row header (approximate)
d556 1
a556 1
    56 bytes per row
d561 2
a562 2
   -------------------   =  146 rows per database page (rounded down)
     56 bytes per row
d565 2
a566 2
   --------------------  =  685 database pages (rounded up)
      146 rows per page
d568 1
a568 1
685 database pages * 8192 bytes per page  =  5,611,520 bytes (5.6 MB)
@


1.412
log
@Update for 8.2.2 as most recent release.
@
text
@d4 1
a4 1
   Last updated: Tue Feb 6 13:36:18 EST 2007
d176 1
a176 1
   The latest release of PostgreSQL is version 8.2.2.
@


1.411
log
@Update workding for daylight savings time.
@
text
@d4 1
a4 1
   Last updated: Tue Feb 6 13:33:13 EST 2007
d176 1
a176 1
   The latest release of PostgreSQL is version 8.2.1.
@


1.410
log
@Update timezone FAQ item:

    <P>USA saving time changes are included in PostgreSQL release 8.0.[4+],
    and all later major releases, e.g. 8.1.  Canada and Western Australia
    changes are included in 8.0.[10+], 8.1.[6+], and all later major
    releases.  PostgreSQL releases prior to 8.0 use the operating system's
    timezone database for daylight saving information.</P>
@
text
@d4 1
a4 1
   Last updated: Tue Feb 6 13:31:07 EST 2007
d332 5
a336 5
   USA saving time changes are included in PostgreSQL release 8.0.[4+],
   and all later major releases, e.g. 8.1. Canada and Western Australia
   changes are included in 8.0.[10+], 8.1.[6+], and all later major
   releases. PostgreSQL releases prior to 8.0 use the operating system's
   timezone database for daylight saving information.
@


1.409
log
@Add FAQ item about timezones and daylight savings time.
@
text
@d4 1
a4 1
   Last updated: Tue Jan 30 17:37:01 EST 2007
d332 5
a336 3
   PostgreSQL versions prior to 8.0 use the operating system's timezone
   database for daylight saving information. All current versions of
   PostgreSQL 8.0 and later contain up-to-date timezone information.
@


1.408
log
@Update CVS HEAD for 2007 copyright.  Back branches are typically not
back-stamped for this.
@
text
@d4 1
a4 1
   Last updated: Fri Jan 5 15:40:20 EST 2007
d30 2
d328 7
@


1.407
log
@Update for release 8.2.1.
@
text
@d127 1
a127 1
   Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
@


1.406
log
@Remove blank lines in HTML FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Dec 11 17:45:54 EST 2006
d174 1
a174 1
   The latest release of PostgreSQL is version 8.2.0.
@


1.405
log
@Add FAQ entry to mention using COALESCE() for concatenation of possible
NULLs.
@
text
@d4 1
a4 1
   Last updated: Mon Dec 11 17:44:33 EST 2006
@


1.404
log
@Make URL to docs use /current/.
@
text
@d4 1
a4 1
   Last updated: Tue Dec 5 18:13:32 EST 2006
d62 3
a64 2
   4.9) In a query, how do I detect if a field is NULL? How can I sort on
   whether a field is NULL or not?
d635 3
d639 2
a640 2
  4.9) In a query, how do I detect if a field is NULL? How can I sort on
  whether a field is NULL or not?
d647 4
@


1.403
log
@Update most recent version from 8.2 to 8.2.0.
@
text
@d4 1
a4 1
   Last updated: Sat Dec 2 07:15:34 EST 2006
@


1.402
log
@Update for release 8.2.
@
text
@d4 1
a4 1
   Last updated: Fri Dec 1 23:11:53 EST 2006
d173 1
a173 1
   The latest release of PostgreSQL is version 8.2.
@


1.402.2.1
log
@Update 8.2.X release to say 8.2.0 instead of just 8.2.
@
text
@d4 1
a4 1
   Last updated: Sat Dec 2 07:15:34 EST 2006
d173 1
a173 1
   The latest release of PostgreSQL is version 8.2.0.
@


1.402.2.2
log
@Backpatch FAQ entry for null concatenation.
@
text
@d4 1
a4 1
   Last updated: Mon Dec 11 17:45:54 EST 2006
d62 2
a63 3
   4.9) In a query, how do I detect if a field is NULL? How do I
   concatenate possible NULLs? How can I sort on whether a field is NULL
   or not?
a633 3
   4.9) In a query, how do I detect if a field is NULL? How do I
   concatenate possible NULLs? How can I sort on whether a field is NULL
   or not?
d635 2
a636 2
  4.9) In a query, how do I detect if a field is NULL? How do I concatenate
  possible NULLs? How can I sort on whether a field is NULL or not?
a642 4
   To concatentate with possible NULLs, use COALESCE(), like this:
   SELECT COALESCE(col1, '') || COALESCE(col2, '')
   FROM tab

@


1.402.2.3
log
@Stamp release 8.2.1.  Update FAQs.
@
text
@d4 1
a4 1
   Last updated: Fri Jan 5 15:40:20 EST 2007
d174 1
a174 1
   The latest release of PostgreSQL is version 8.2.1.
@


1.402.2.4
log
@Backpatch FAQs to stable branch.
@
text
@d4 1
a4 1
   Last updated: Tue Jan 30 17:37:01 EST 2007
a29 2
   1.14) Will PostgreSQL handle recent daylight saving time changes in
   various countries?
d127 1
a127 1
   Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
a325 7
          
  1.14) Will PostgreSQL handle recent daylight saving time changes in various
  countries?
  
   PostgreSQL versions prior to 8.0 use the operating system's timezone
   database for daylight saving information. All current versions of
   PostgreSQL 8.0 and later contain up-to-date timezone information.
@


1.402.2.5
log
@Backpatch FAQs to 8.2.X branch.
@
text
@d4 1
a4 1
   Last updated: Tue Feb 6 13:36:18 EST 2007
d176 1
a176 1
   The latest release of PostgreSQL is version 8.2.2.
d332 3
a334 5
   USA daylight saving time changes are included in PostgreSQL release
   8.0.[4+], and all later major releases, e.g. 8.1. Canada and Western
   Australia changes are included in 8.0.[10+], 8.1.[6+], and all later
   major releases. PostgreSQL releases prior to 8.0 use the operating
   system's timezone database for daylight saving information.
@


1.402.2.6
log
@Update FAQ for 8.2.3.
@
text
@d4 1
a4 1
   Last updated: Tue Feb 6 22:16:17 EST 2007
d176 1
a176 1
   The latest release of PostgreSQL is version 8.2.3.
@


1.402.2.7
log
@Stamp releases 8.2.4, 8.1.9, 8.0.13, 7.4.17, 7.3.19.
@
text
@d4 1
a4 1
   Last updated: Wed Apr 18 23:05:05 EDT 2007
d176 1
a176 1
   The latest release of PostgreSQL is version 8.2.4.
d433 14
a446 1
   See http://www.postgresql.org/support/versioning.
d550 1
a550 1
   PostgreSQL database file containing this data can be estimated as 5.2
d552 1
a552 1
    24 bytes: each row header (approximate)
d556 1
a556 1
    52 bytes per row
d561 2
a562 2
   -------------------   =  158 rows per database page (rounded down)
     52 bytes per row
d565 2
a566 2
   --------------------  =  633 database pages (rounded up)
      158 rows per page
d568 1
a568 1
633 database pages * 8192 bytes per page  =  5,185,536 bytes (5.2 MB)
d820 1
a820 1
   http://www.postgresql.org/docs/techdocs.17
@


1.402.2.8
log
@Stamp releases 8.2.5, 8.1.10, 8.0.14, 7.4.18, 7.3.20.

Update FAQs for 8.2.5.
@
text
@d4 1
a4 1
   Last updated: Tue Sep 11 13:34:02 EDT 2007
d176 1
a176 1
   The latest release of PostgreSQL is version 8.2.5.
d433 1
a433 4
   See http://www.postgresql.org/support/versioning for a general
   discussion about upgrading, and
   http://www.postgresql.org/docs/current/static/install-upgrading.html
   for specific instructions.
d633 3
@


1.401
log
@Mention OIDs are now not created by default.
@
text
@d4 1
a4 1
   Last updated: Tue Nov 21 23:16:54 EST 2006
d173 1
a173 1
   The latest release of PostgreSQL is version 8.1.5.
@


1.400
log
@Add capitalization mention.
@
text
@d4 1
a4 1
   Last updated: Tue Nov 21 10:37:54 EST 2006
d731 5
a735 5
   Every row that is created in PostgreSQL gets a unique OID unless
   created WITHOUT OIDS. OIDs are automatically assigned unique 4-byte
   integers that are unique across the entire installation. However, they
   overflow at 4 billion, and then the OIDs start being duplicated.
   PostgreSQL uses OIDs to link its internal system tables together.
@


1.399
log
@FAQ updates --- This is a small cosmetic patch that adds pt_BR IRC
channel to the lists of IRC channels, fixes a typo in the OID's
question, and corrects the PGCluster's project name.

Euler Taveira de Oliveira
@
text
@d4 1
a4 1
   Last updated: Sat Oct 14 19:08:19 EDT 2006
d82 1
d834 2
a835 1
  4.21) Why are my table and column names not recognized in my query?
d837 7
a843 7
   The most common cause is the use of double-quotes around table or
   column names during table creation. When double-quotes are used, table
   and column names (called identifiers) are stored case-sensitive,
   meaning you must use double-quotes when referencing the names in a
   query. Some interfaces, like pgAdmin, automatically double-quote
   identifiers during table creation. So, for identifiers to be
   recognized, you must either:
@


1.398
log
@Update FAQ for latest release 8.1.5.
@
text
@d4 1
a4 1
   Last updated: Mon Oct 9 20:28:14 EDT 2006
d187 3
a189 2
   exists on the same network, (#postgresql-es), and a French one,
   (#postgresqlfr). There is also a PostgreSQL channel on EFNet.
d736 1
a736 1
   To uniquely number columns in user tables, it is best to use SERIAL
d827 1
a827 1
   servers. Pgcluster is the most popular such solution freely available
@


1.397
log
@Add space before SP4.
@
text
@d4 1
a4 1
   Last updated: Fri Aug 18 12:27:33 EDT 2006
d172 1
a172 1
   The latest release of PostgreSQL is version 8.1.4.
@


1.396
log
@Update Win2000SP4 mention.
@
text
@d4 1
a4 1
   Last updated: Fri Aug 18 12:26:50 EDT 2006
d155 1
a155 1
   systems like Win2000SP4, WinXP, and Win2003. A prepackaged installer
@


1.395
log
@Update for company URL.

Ian Barwick
@
text
@d4 1
a4 1
   Last updated: Fri Aug 11 14:47:45 EDT 2006
d155 2
a156 2
   systems like Win2000, WinXP, and Win2003. A prepackaged installer is
   available at http://pgfoundry.org/projects/pginstaller. MSDOS-based
@


1.394
log
@Reverse order of performance guides so powerpostgresql is first.
@
text
@d4 1
a4 1
   Last updated: Tue Aug 8 15:05:10 EDT 2006
d191 1
a191 1
   http://techdocs.postgresql.org/companies.php.
@


1.393
log
@Update my email address.
@
text
@d4 1
a4 1
   Last updated: Sun Jun 18 15:33:25 EDT 2006
d400 1
d402 1
a402 1
          and http://www.powerpostgresql.com/PerfList/.
@


1.392
log
@Spelling fix.

Robert Treat
@
text
@d4 1
a4 1
   Last updated: Wed Jun 7 17:22:48 EDT 2006
d6 1
a6 1
   Current maintainer: Bruce Momjian (pgman@@candle.pha.pa.us)
d400 2
a401 2
          http://candle.pha.pa.us/main/writings/pgsql/hw_performance/inde
          x.html and http://www.powerpostgresql.com/PerfList/.
@


1.391
log
@Update GUI FAQ.

Robert Treat
@
text
@d4 1
a4 1
   Last updated: Sat Jun 3 20:17:01 EDT 2006
d522 1
a522 1
   needed. Uniqueness is best guaranteed by a funtion index of an MD5
d623 2
a624 2
   This will not use an standard index. However, if you create a
   expresssion index, it will be used:
d729 1
a729 1
   created WITHOUT OIDS. OIDs are autotomatically assigned unique 4-byte
@


1.390
log
@Update GUI tools URL.

Robert Treat
@
text
@d4 1
a4 1
   Last updated: Sat Jun 3 20:13:19 EDT 2006
@


1.389
log
@New wording, "What is the upgrade process for PostgreSQL?"
@
text
@d4 1
a4 1
   Last updated: Tue May 23 11:50:55 EDT 2006
d352 3
a354 2
   Yes, see http://techdocs.postgresql.org/guides/GUITools for a detailed
   list.
@


1.388
log
@Update heading for upgrades.
@
text
@d4 1
a4 1
   Last updated: Tue May 23 11:47:16 EDT 2006
d45 1
a45 1
   3.6 What should I do about upgrading PostgreSQL?
d415 1
a415 1
  3.6) What should I do about upgrading PostgreSQL?
@


1.387
log
@Add mention that everyone should upgrade to minor releases.
@
text
@d4 1
a4 1
   Last updated: Tue May 23 11:22:06 EDT 2006
d45 1
a45 2
   3.6) Why do I need to do a dump and restore to upgrade PostgreSQL
   releases?
d415 1
a415 2
  3.6) Why do I need to do a dump and restore to upgrade between major
  PostgreSQL releases?
@


1.386
log
@Update for version 8.1.4.
@
text
@d4 1
a4 1
   Last updated: Thu May 18 23:52:32 EDT 2006
d22 1
a22 1
   1.6) What is the latest release?
d171 1
a171 1
  1.6) What is the latest release?
d419 14
a432 7
   The PostgreSQL team makes only small changes between minor releases,
   so upgrading from 7.4.0 to 7.4.1 does not require a dump and restore.
   However, major releases (e.g. from 7.3 to 7.4) often change the
   internal format of system tables and data files. These changes are
   often complex, so we don't maintain backward compatibility for data
   files. A dump outputs data in a generic format that can then be loaded
   in using the new internal format.
@


1.385
log
@Fix HTML markup.
@
text
@d4 1
a4 1
   Last updated: Thu Apr 13 08:20:04 EDT 2006
d173 1
a173 1
   The latest release of PostgreSQL is version 8.1.3.
@


1.384
log
@Update tutorial URL's.
@
text
@d4 1
a4 1
   Last updated: Thu Apr 13 08:14:25 EDT 2006
d572 3
a574 3
   index scan of a large table.
   However, LIMIT combined with ORDER BY often will use an index because
   only a small portion of the table is returned.
@


1.383
log
@Update URL for SQL tutorial.
@
text
@d4 1
a4 1
   Last updated: Thu Apr 13 08:08:50 EDT 2006
d273 6
a278 5
   There is also a nice tutorial at
   http://www.intermedia.net/support/sql/sqltut.shtm, at
   http://mysite.verizon.net/Graeme_Birchall/id1.html, and at
   http://sqlcourse.com.
   
@


1.382
log
@Add, "How do I submit a patch" FAQ item.
@
text
@d4 1
a4 1
   Last updated: Wed Apr 12 16:03:39 EDT 2006
d275 2
a276 2
   http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM,
   and at http://sqlcourse.com.
@


1.381
log
@Add second sentence:
    <P>The maximum table size, row size, and maximum number of columns
    can be quadrupled by increasing the default block size to 32k.  The
    maximum table size can also be increased using table partitioning.</P>
@
text
@d4 1
a4 1
   Last updated: Wed Apr 12 14:55:59 EDT 2006
d28 1
a28 1
   1.12) How do I join the development team?
d278 1
a278 1
  1.12) How do I join the development team?
@


1.380
log
@Update for max row size.
@
text
@d4 1
a4 1
   Last updated: Sun Apr 2 23:40:12 EDT 2006
d510 2
a511 1
   quadrupled by increasing the default block size to 32k.
@


1.379
log
@Update max row size to 400gb, per Tom.
@
text
@d4 1
a4 1
   Last updated: Sun Apr 2 23:39:13 EDT 2006
d509 2
a510 2
   The maximum table size and maximum number of columns can be quadrupled
   by increasing the default block size to 32k.
@


1.378
log
@Update copyright for 2006.  Update scripts.
@
text
@d4 1
a4 1
   Last updated: Fri Feb 24 23:28:40 EST 2006
d494 1
a494 1
   Maximum size for a row? 1.6TB
@


1.377
log
@Fix computation of sample table size.
@
text
@d126 1
a126 1
   Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
@


1.376
log
@Remove mention of MIN/MAX() not using indexes.
@
text
@d4 1
a4 1
   Last updated: Fri Feb 24 09:59:35 EST 2006
d527 1
a527 1
   PostgreSQL database file containing this data can be estimated as 6.4
@


1.375
log
@Update for 8.1.3.
@
text
@d4 1
a4 1
   Last updated: Sun Feb 12 12:15:49 EST 2006
d572 2
a573 8
   only a small portion of the table is returned. In fact, though MAX()
   and MIN() don't use indexes, it is possible to retrieve such values
   using an index with ORDER BY and LIMIT:
    SELECT col
    FROM tab
    ORDER BY col [ DESC ]
    LIMIT 1;

@


1.374
log
@Update version number.
@
text
@d4 1
a4 1
   Last updated: Wed Jan 4 22:55:13 EST 2006
d173 1
a173 1
   The latest release of PostgreSQL is version 8.1.2.
@


1.373
log
@Update for 8.1.1.
@
text
@d4 1
a4 1
   Last updated: Thu Dec 8 17:26:16 EST 2005
d173 1
a173 1
   The latest release of PostgreSQL is version 8.1.1.
@


1.372
log
@Update most recent version number.
@
text
@d4 1
a4 1
   Last updated: Tue Nov 22 11:26:48 EST 2005
d173 1
a173 1
   The latest release of PostgreSQL is version 8.1.
@


1.371
log
@Update wording and cleanup for new items.
@
text
@d4 1
a4 1
   Last updated: Tue Nov 22 10:31:18 EST 2005
d173 1
a173 1
   The latest release of PostgreSQL is version 8.1.1
@


1.370
log
@Markup TODO as a URL.
@
text
@d4 1
a4 1
   Last updated: Tue Nov 22 10:21:51 EST 2005
d215 2
a216 2
          + A patch has been created and will be included in the next
            major or minor release
d239 3
a241 3
   only single place to find all changes, improvements, and fixes in a
   PostgreSQL release is to read our CVS logs messages. Even the release
   notes do not contain every change made to the software.
@


1.369
log
@Update item tags.
@
text
@d4 1
a4 1
   Last updated: Tue Nov 22 10:16:48 EST 2005
d197 3
a199 4
   http://www.postgresql.org/support/submitbug.
   
   Also check out our ftp site ftp://ftp.PostgreSQL.org/pub/ to see if
   there is a more recent PostgreSQL version.
d204 1
a204 1
     * It is a known bug and is known already on the TODO list
@


1.368
log
@Change to using "id=" HTML tags instead of "name=" tags.
@
text
@d4 1
a4 1
   Last updated: Tue Nov 22 10:12:24 EST 2005
@


1.367
log
@Update FAQ to explain process of submitting bug and feature requests.
@
text
@d4 1
a4 1
   Last updated: Tue Nov 22 10:04:06 EST 2005
@


1.366
log
@Reorder "who controls PostgreSQL" to near the top.
@
text
@d4 1
a4 1
   Last updated: Mon Nov 21 16:01:05 EST 2005
d104 11
d171 7
d202 20
a221 1
  1.6) What is the latest release?
d223 2
a224 1
   The latest release of PostgreSQL is version 8.1.1
d226 17
a242 2
   We plan to have a major release every year, with minor releases every
   few months.
a264 5
  1.9) How do I find out about known bugs or missing features?
  
   PostgreSQL supports an extended subset of SQL:2003. See our TODO list
   for known bugs, missing features, and future plans.
   
a323 11
          
  1.2) Who controls PostgreSQL?
  
   If you are looking for a PostgreSQL gatekeeper, central committee, or
   controlling company, give up --- there isn't one. We do have a core
   committee and CVS committers, but these groups are more for
   administrative purposes than control. The project is directed by the
   community of developers and users, which anyone can join. All you need
   to do is subscribe to the mailing lists and participate in the
   discussions. (See the Developer's FAQ for information on how to get
   involved in PostgreSQL development.)
@


1.365
log
@Reorder version FAQ item to be right after "how do I get the software".
@
text
@d4 1
a4 1
   Last updated: Mon Nov 21 15:54:10 EST 2005
d18 12
a29 12
   1.2) What is the copyright of PostgreSQL?
   1.3) What platforms does PostgreSQL support?
   1.4) Where can I get PostgreSQL?
   1.5) What is the latest release?
   1.6) Where can I get support?
   1.7) How do I submit a bug report?
   1.8) How do I find out about known bugs or missing features?
   1.9) What documentation is available?
   1.10) How can I learn SQL?
   1.11) How do I join the development team?
   1.12) How does PostgreSQL compare to other DBMSs?
   1.13) Who controls PostgreSQL?
d104 1
a104 1
  1.2) What is the copyright of PostgreSQL?
d138 1
a138 1
  1.3) What platforms does PostgreSQL support?
d155 1
a155 1
  1.4) Where can I get PostgreSQL?
d160 1
a160 1
  1.6) Where can I get support?
d176 1
a176 1
  1.7) How do I submit a bug report?
d184 1
a184 1
  1.5) What is the latest release?
d186 1
a186 1
   The latest release of PostgreSQL is version 8.1.
d191 1
a191 1
  1.9) What documentation is available?
d212 1
a212 1
  1.8) How do I find out about known bugs or missing features?
d217 1
a217 1
  1.10) How can I learn SQL?
d231 1
a231 1
  1.11) How do I join the development team?
d235 1
a235 1
  1.12) How does PostgreSQL compare to other DBMSs?
d270 1
a270 1
          section 1.6.)
d277 1
a277 1
  1.13) Who controls PostgreSQL?
@


1.364
log
@Clarify copyright wording.
@
text
@d4 1
a4 1
   Last updated: Mon Nov 21 15:51:32 EST 2005
d21 4
a24 4
   1.5) Where can I get support?
   1.6) How do I submit a bug report?
   1.7) How do I find out about known bugs or missing features?
   1.8) What is the latest release?
d160 1
a160 1
  1.5) Where can I get support?
d176 1
a176 1
  1.6) How do I submit a bug report?
d184 1
a184 1
  1.8) What is the latest release?
d212 1
a212 1
  1.7) How do I find out about known bugs or missing features?
d270 1
a270 1
          section 1.5.)
@


1.363
log
@Reorder bug items.
@
text
@d4 1
a4 1
   Last updated: Mon Nov 21 15:44:03 EST 2005
d106 6
a111 5
   PostgreSQL is distributed under the classic BSD license. It has no
   restrictions on how the source code can be used. We like it and have
   no intention of changing it.
   
   This is the BSD license we use:
@


1.362
log
@Update FAQ for most recent release as 8.1.
@
text
@d4 1
a4 1
   Last updated: Fri Nov 4 20:35:04 EST 2005
d23 3
a25 3
   1.7) What is the latest release?
   1.8) What documentation is available?
   1.9) How do I find out about known bugs or missing features?
d183 1
a183 1
  1.7) What is the latest release?
d190 1
a190 1
  1.8) What documentation is available?
d211 1
a211 1
  1.9) How do I find out about known bugs or missing features?
@


1.362.2.1
log
@Update 8.1.X FAQs.
@
text
@d4 1
a4 1
   Last updated: Tue Nov 22 11:26:48 EST 2005
d18 7
a24 7
   1.2) Who controls PostgreSQL?
   1.3) What is the copyright of PostgreSQL?
   1.4) What platforms does PostgreSQL support?
   1.5) Where can I get PostgreSQL?
   1.6) What is the latest release?
   1.7) Where can I get support?
   1.8) How do I submit a bug report?
d26 4
a29 4
   1.10) What documentation is available?
   1.11) How can I learn SQL?
   1.12) How do I join the development team?
   1.13) How does PostgreSQL compare to other DBMSs?
d104 1
a104 1
  1.2) Who controls PostgreSQL?
d106 3
a108 8
   If you are looking for a PostgreSQL gatekeeper, central committee, or
   controlling company, give up --- there isn't one. We do have a core
   committee and CVS committers, but these groups are more for
   administrative purposes than control. The project is directed by the
   community of developers and users, which anyone can join. All you need
   to do is subscribe to the mailing lists and participate in the
   discussions. (See the Developer's FAQ for information on how to get
   involved in PostgreSQL development.)
d110 1
a110 8
  1.3) What is the copyright of PostgreSQL?
  
   PostgreSQL is distributed under the classic BSD license. Basically, it
   allows users to do anything they want with the code, including
   reselling binaries without the source code. The only restriction is
   that you not hold us legally liable for problems with the software.
   There is also the requirement that this copyright appear in all copies
   of the software. Here is the actual BSD license we use:
d137 1
a137 1
  1.4) What platforms does PostgreSQL support?
d154 1
a154 1
  1.5) Where can I get PostgreSQL?
d159 1
a159 8
  1.6) What is the latest release?
  
   The latest release of PostgreSQL is version 8.1.
   
   We plan to have a major release every year, with minor releases every
   few months.
   
  1.7) Where can I get support?
d175 1
a175 1
  1.8) How do I submit a bug report?
d178 6
a183 24
   http://www.postgresql.org/support/submitbug. Also check out our ftp
   site ftp://ftp.PostgreSQL.org/pub/ to see if there is a more recent
   PostgreSQL version.
   
   Bugs submitted using the bug form or posted to any PostgreSQL mailing
   list typically generates one of the following replies:
     * It is not a bug, and why
     * It is a known bug and is already on the TODO list
     * The bug has been fixed in the current release
     * The bug has been fixed but is not packaged yet in an official
       release
     * A request is made for more detailed information:
          + Operating system
          + PostgreSQL version
          + Reproducible test case
          + Debugging information
          + Debugger backtrace output
     * The bug is new. The following might happen:
          + A patch is created and will be included in the next major or
            minor release
          + The bug cannot be fixed immediately and is added to the TODO
            list
       
  1.9) How do I find out about known bugs or missing features?
d185 1
a185 2
   PostgreSQL supports an extended subset of SQL:2003. See our TODO list
   for known bugs, missing features, and future plans.
d187 2
a188 17
   A feature request usually results in one of the following replies:
     * The feature is already on the TODO list
     * The feature is not desired because:
          + It duplicates existing functionality that already follows the
            SQL standard
          + The feature would increase code complexity but add little
            benefit
          + The feature would be insecure or unreliable
     * The new feature is added to the TODO list
       
   PostgreSQL does not use a bug tracking system because we find it more
   efficient to respond directly to email and keep the TODO list
   up-to-date. In practice, bugs don't last very long in the software,
   and bugs that affect a large number of users are fixed rapidly. The
   only place to find all changes, improvements, and fixes in a
   PostgreSQL release is to read the CVS log messages. Even the release
   notes do not list every change made to the software.
d190 1
a190 1
  1.10) What documentation is available?
d211 6
a216 1
  1.11) How can I learn SQL?
d230 1
a230 1
  1.12) How do I join the development team?
d234 1
a234 1
  1.13) How does PostgreSQL compare to other DBMSs?
d269 1
a269 1
          section 1.7.)
d275 11
@


1.362.2.2
log
@Stamp 8.1.1.
@
text
@d4 1
a4 1
   Last updated: Thu Dec 8 17:26:16 EST 2005
d173 1
a173 1
   The latest release of PostgreSQL is version 8.1.1.
@


1.362.2.3
log
@Stamp release 8.1.2.
@
text
@d173 1
a173 1
   The latest release of PostgreSQL is version 8.1.2.
@


1.362.2.4
log
@Stamp 8.1.3, but exclude configure.in/configure change.
@
text
@d4 1
a4 1
   Last updated: Sun Feb 12 12:15:49 EST 2006
d173 1
a173 1
   The latest release of PostgreSQL is version 8.1.3.
@


1.362.2.5
log
@Backpatch FAQ changes to 8.1.X.
@
text
@d4 1
a4 1
   Last updated: Fri Feb 24 09:59:35 EST 2006
d572 8
a579 2
   only a small portion of the table is returned.
   
@


1.362.2.6
log
@Fix computation of sample table size.
@
text
@d4 1
a4 1
   Last updated: Fri Feb 24 23:28:40 EST 2006
d527 1
a527 1
   PostgreSQL database file containing this data can be estimated as 5.6
@


1.362.2.7
log
@Update AIX FAQ to show readline options more clearly.

Backpatch FAQ's to 8.1.X.
@
text
@d4 1
a4 1
   Last updated: Sun Apr 2 23:40:12 EDT 2006
d126 1
a126 1
   Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
d494 1
a494 1
   Maximum size for a row? 400 GB
d509 2
a510 2
   The maximum table size, row size, and maximum number of columns can be
   quadrupled by increasing the default block size to 32k.
@


1.362.2.8
log
@Update AIX FAQ:

At any rate, here's a revision to CVS HEAD to reflect some changes by
myself and by Seneca Cunningham for the AIX FAQ.  It touches on the
following issues:

1.  memcpy pointer patch for dynahash.c

2.  AIX memory management, which can, for 32 bit cases, bite people
    quite unexpectedly...

Chris Browne
@
text
@d4 1
a4 1
   Last updated: Wed Apr 12 16:03:39 EDT 2006
d28 1
a28 1
   1.12) How do I submit a patch or join the development team?
d278 1
a278 1
  1.12) How do I submit a patch or join the development team?
d510 1
a510 2
   quadrupled by increasing the default block size to 32k. The maximum
   table size can also be increased using table partitioning.
@


1.362.2.9
log
@Backpatch FAQs to 8.1.X.
@
text
@d4 1
a4 1
   Last updated: Thu Apr 13 08:20:04 EDT 2006
d273 5
a277 6
   There are also many nice tutorials available online:
     * http://www.intermedia.net/support/sql/sqltut.shtm
     * http://sqlcourse.com
     * http://www.w3schools.com/sql/default.asp
     * http://mysite.verizon.net/Graeme_Birchall/id1.html
       
d571 3
a573 3
   index scan of a large table. However, LIMIT combined with ORDER BY
   often will use an index because only a small portion of the table is
   returned.
@


1.362.2.10
log
@Stamp 8.1.4, except configure/configure.in.
@
text
@d4 1
a4 1
   Last updated: Thu May 18 23:52:32 EDT 2006
d173 1
a173 1
   The latest release of PostgreSQL is version 8.1.4.
@


1.362.2.11
log
@Stamp releases 7.3.16, 7.4.14, 8.0.9, and 8.1.5.
@
text
@d173 1
a173 1
   The latest release of PostgreSQL is version 8.1.5.
@


1.362.2.12
log
@Backpatch FAQs to 8.1.X.
@
text
@d4 1
a4 1
   Last updated: Mon Oct 9 20:28:14 EDT 2006
d6 1
a6 1
   Current maintainer: Bruce Momjian (bruce@@momjian.us)
d22 1
a22 1
   1.6) What is the most recent release?
d45 2
a46 1
   3.6 What is the upgrade process for PostgreSQL?
d156 2
a157 2
   systems like Win2000 SP4, WinXP, and Win2003. A prepackaged installer
   is available at http://pgfoundry.org/projects/pginstaller. MSDOS-based
d171 1
a171 1
  1.6) What is the most recent release?
d192 1
a192 1
   http://www.postgresql.org/support/professional_support.
d353 2
a354 3
   There are a large number of GUI Tools that are available for
   PostgreSQL from both commercial and open source developers. A detailed
   list can be found in the PostgreSQL Community Documentation
d400 2
a401 3
          http://www.powerpostgresql.com/PerfList/ and
          http://momjian.us/main/writings/pgsql/hw_performance/index.html
          .
d416 2
a417 1
  3.6) What is the upgrade process for PostgreSQL?
d419 7
a425 14
   The PostgreSQL team makes only bug fixes in minor releases, so, for
   example, upgrading from 7.4.8 to 7.4.9 does not require a dump and
   restore; merely stop the database server, install the updated
   binaries, and restart the server.
   
   All users should upgrade to the most recent minor release as soon as
   it is available. While every upgrade has some risk, PostgreSQL minor
   releases are designed to fix only common bugs with the least risk. The
   community considers not upgrading more risky that upgrading.
   
   Major releases (e.g. from 7.3 to 7.4) often change the internal format
   of system tables and data files. These changes are often complex, so
   we don't maintain backward compatibility for data files. A dump/reload
   of the database is required for major upgrades.
d516 1
a516 1
   needed. Uniqueness is best guaranteed by a function index of an MD5
d617 2
a618 2
   This will not use an standard index. However, if you create an
   expression index, it will be used:
d723 1
a723 1
   created WITHOUT OIDS. OIDs are automatically assigned unique 4-byte
@


1.362.2.13
log
@Stamp release 8.1.6.
@
text
@d172 1
a172 1
   The latest release of PostgreSQL is version 8.2.1.
@


1.362.2.14
log
@Update FAQ to mention most recent release for releases
8.2.4, 8.1.9, 8.0.13, 7.4.17, 7.3.19.
@
text
@d172 1
a172 1
   The latest release of PostgreSQL is version 8.2.4.
@


1.362.2.15
log
@Stamp releases 8.2.5, 8.1.10, 8.0.14, 7.4.18, 7.3.20.

Update FAQs for 8.2.5.
@
text
@d172 1
a172 1
   The latest release of PostgreSQL is version 8.2.5.
@


1.361
log
@Update FAQ for version number.
@
text
@d4 1
a4 1
   Last updated: Wed Oct 5 07:24:44 EDT 2005
d185 1
a185 1
   The latest release of PostgreSQL is version 8.0.4.
@


1.360
log
@Update SQL conformance mention to 2003.
@
text
@d4 1
a4 1
   Last updated: Wed Sep 28 07:45:42 EDT 2005
d185 1
a185 1
   The latest release of PostgreSQL is version 8.0.3.
@


1.359
log
@Update numbering.

Michael Fuhr
@
text
@d4 1
a4 1
   Last updated: Fri Sep 16 14:07:22 EDT 2005
d213 1
a213 1
   PostgreSQL supports an extended subset of SQL-92. See our TODO list
@


1.358
log
@8.0.3 is now the most recent version.
@
text
@d4 1
a4 1
   Last updated: Thu Sep 1 12:18:41 EDT 2005
d792 1
a792 1
  4.20) Why are my table and column names not recognized in my query?
@


1.357
log
@Update disk space computation because oids are now optional.
@
text
@d4 1
a4 1
   Last updated: Thu Sep 1 12:17:52 EDT 2005
d185 1
a185 1
   The latest release of PostgreSQL is version 8.0.2.
@


1.356
log
@Update MD5 mention for long values.
@
text
@d4 1
a4 1
   Last updated: Thu Aug 11 09:21:58 EDT 2005
d492 1
a492 1
    32 bytes: each row header (approximate)
d496 1
a496 1
    60 bytes per row
d501 2
a502 2
   -------------------   =  136 rows per database page (rounded down)
     60 bytes per row
d505 2
a506 2
   --------------------  =  735 database pages (rounded up)
      128 rows per page
d508 1
a508 1
735 database pages * 8192 bytes per page  =  6,021,120 bytes (6 MB)
@


1.355
log
@Add new FAQ information.

Martijn van Oosterhout
@
text
@d4 1
a4 1
   Last updated: Wed Aug 10 15:29:42 EDT 2005
d477 3
a479 3
   needed. Uniqueness is best guaranteed using another column that is an
   MD5 hash of the long column, and full text indexing allows for
   searching of words within the column.
@


1.354
log
@Add mp3 entry to FAQ.
@
text
@d4 1
a4 1
   Last updated: Fri Jul 29 10:05:09 EDT 2005
d82 1
d475 6
d588 5
d791 13
@


1.353
log
@Add missing <P>.
@
text
@d4 1
a4 1
   Last updated: Mon May 30 09:11:03 EDT 2005
d88 3
a90 1
   PostgreSQL is pronounced Post-Gres-Q-L, also called just Postgres.
@


1.352
log
@Remove encryption FAQ item now that we have a doc section.
@
text
@d4 1
a4 1
   Last updated: Mon May 9 13:15:04 EDT 2005
@


1.351
log
@Update "control" item.
Rosser Schwarz
@
text
@d4 1
a4 1
   Last updated: Wed May 4 21:42:01 EDT 2005
d81 1
a81 2
   4.20) What encryption options are available?
   4.21) What replication solutions are available?
d759 1
a759 15
  4.20) What encryption options are available?
  
     * contrib/pgcrypto contains many encryption functions for use in SQL
       queries.
     * To encrypt transmission from the client to the server, the server
       must have the ssl option set to true in postgresql.conf, and an
       applicable host or hostssl record must exist in pg_hba.conf, and
       the client sslmode must not be disable. (Note that it is also
       possible to use a third-party encrypted transport, such as stunnel
       or ssh, rather than PostgreSQL's native SSL connections.)
     * Database user passwords are automatically encrypted when stored in
       the system tables.
     * The server can also run using an encrypted file system.
       
  4.21) What replication solutions are available?
@


1.350
log
@Typo fix, Dave Held
@
text
@d4 1
a4 1
   Last updated: Wed May 4 21:23:41 EDT 2005
d277 1
a277 1
   controlling company, give up, because none exists. We do have a core
d280 4
a283 4
   open community of developers and users of PostgreSQL. Everyone is
   welcome to subscribe and take part in the discussions. (See the
   Developer's FAQ for information on how to get involved in PostgreSQL
   development.)
@


1.349
log
@Add FAQ on who controls the project.
@
text
@d4 1
a4 1
   Last updated: Mon May 2 16:11:15 EDT 2005
d279 1
a279 1
   administrative purposes then control. The project is directed by the
@


1.348
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Fri Apr 29 23:53:16 EDT 2005
d29 1
d273 11
@


1.347
log
@Update replication FAQ.

Christopher Browne
@
text
@d4 1
a4 1
   Last updated: Fri Apr 29 23:51:45 EDT 2005
@


1.346
log
@Update wording.
@
text
@d4 1
a4 1
   Last updated: Sun Apr 24 08:01:19 EDT 2005
d764 16
a779 9
   Though "replication" is a single term, there are two major replication
   technologies. Multi-master replication allows read/write queries to be
   sent to multiple replicated computers. Using this capability has a
   serious performance impact. Pgcluster is the most popular such
   solution available for PostgreSQL. Master-slave replication allows a
   single master to receive read/write queries, with slaves able to
   accept only read/SELECT queries. The most popular master-slave
   PostgreSQL replication solution is Slony. There are also commercial
   and hardware-based replication solutions available.
@


1.345
log
@Clean up HTML.
@
text
@d4 1
a4 1
   Last updated: Sun Apr 24 07:57:14 EDT 2005
d766 7
a772 7
   sent to multiple replicated computers. This capability has a serious
   performance impact. Pgcluster is the most popular such solution
   available for PostgreSQL. Master-slave replication allows a single
   master to receive read/write queries, with slaves able to accept only
   read/SELECT queries. The most popular master-slave PostgreSQL
   replication solution is Slony. There are also commercial and
   hardware-based replication solutions available.
@


1.344
log
@Add replication FAQ item.
@
text
@d4 1
a4 1
   Last updated: Sun Apr 24 07:48:48 EDT 2005
d217 6
a222 4
   http://members.tripod.com/er4ebus/sql/index.htm
   Many of our users like The Practical SQL Handbook, Bowman, Judith S.,
   et al., Addison-Wesley. Others like The Complete Reference SQL, Groff
   et al., McGraw-Hill. There is also a nice tutorial at
@


1.343
log
@Add line break.
@
text
@d4 1
a4 1
   Last updated: Sun Apr 24 07:27:43 EDT 2005
d81 1
d759 12
@


1.342
log
@Update book items.
@
text
@d4 1
a4 1
   Last updated: Sun Apr 24 07:22:26 EDT 2005
@


1.341
log
@Update FAQ by eliminating non-frequent items like large objects and
extending questions.  Update wording of various entries.
@
text
@d4 1
a4 1
   Last updated: Sat Apr 23 16:49:43 EDT 2005
d194 3
a196 2
   http://www.commandprompt.com/ppbook/. There is a list of PostgreSQL
   books available for purchase at
@


1.340
log
@Update H4 tag to H3 to be consistent with heading levels.
@
text
@d4 1
a4 1
   Last updated: Sat Apr 23 14:59:01 EDT 2005
d70 1
a70 1
   4.12) What is an OID? What is a TID?
d74 5
a78 7
   4.15) Why does my large-object operations get "invalid large obj
   descriptor"?
   4.16) How do I create a column that will default to the current time?
   4.17) How do I perform an outer join?
   4.18) How do I perform queries using multiple databases?
   4.19) How do I return multiple rows or columns from a function?
   4.20) Why do I get "relation with OID ##### does not exist" errors
d80 1
a80 11
   4.21) What encryption options are available?
   
                            Extending PostgreSQL
                                      
   5.1) I wrote a user-defined function. When I run it in psql, why does
   it dump core?
   5.2) How can I contribute some nifty new types and functions to
   PostgreSQL?
   5.3) How do I write a C function to return a tuple?
   5.4) I have changed a source file. Why does the recompile not see the
   change?
d520 2
a521 2
   scan, use SET enable_seqscan TO 'off' and run tests to see if an index
   scan is indeed faster.
d567 1
a567 1
   You test the column with IS NULL and IS NOT NULL.
d573 1
a573 1
   in your WHERE clause. Things that are true will sort higher than
d594 3
a596 3
   space used is slightly greater than the declared size. However, these
   data types are also subject to compression or being stored out-of-line
   by TOAST, so the space on disk might also be less than expected.
d638 2
a639 2
   <table>_<serialcolumn>_seq, where table and serialcolumn are the names
   of your table and your SERIAL column, respectively.
d658 1
a658 1
  4.12) What is an OID? What is a TID?
d671 3
a673 3
   TIDs are used to identify specific physical rows with block and offset
   values. TIDs change after rows are modified or reloaded. They are used
   by index entries to point to physical rows.
d694 1
a694 15
  4.15) Why does my large-object operations get "invalid large obj descriptor"?
  
   You need to put BEGIN WORK and COMMIT around any use of a large object
   handle, that is, surrounding lo_open ... lo_close.
   
   Currently PostgreSQL enforces the rule by closing large object handles
   at transaction commit. So the first attempt to do anything with the
   handle will draw invalid large obj descriptor. So code that used to
   work (at least most of the time) will now generate that error message
   if you fail to use a transaction.
   
   If you are using a client interface like ODBC you may need to set
   auto-commit off.
   
  4.16) How do I create a column that will default to the current time?
d699 1
a699 1
  4.17) How do I perform an outer join?
d717 1
a717 1
  4.18) How do I perform queries using multiple databases?
d727 1
a727 1
  4.19) How do I return multiple rows or columns from a function?
d733 1
a733 1
  4.20) Why do I get "relation with OID ##### does not exist" errors when
d744 1
a744 1
  4.21) What encryption options are available?
d756 1
a756 30
     * The server can run using an encrypted file system.
     _________________________________________________________________
   
                            Extending PostgreSQL
                                      
  5.1) I wrote a user-defined function. When I run it in psql, why does it dump
  core?
  
   The problem could be a number of things. Try testing your user-defined
   function in a stand-alone test program first.
   
  5.2) 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.3) How do I write a C function to return a tuple?
  
   In versions of PostgreSQL beginning with 7.3, table-returning
   functions are fully supported in C, PL/PgSQL, and SQL. See the
   Programmer's Guide for more information. An example of a
   table-returning function defined in C can be found in
   contrib/tablefunc.
   
  5.4) 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. If you are using
   GCC you can use the --enable-depend option of configure to have the
   compiler compute the dependencies automatically.
@


1.339
log
@Update FAQ items to point to existing web pages rather than duplication
such information.  Remove MySQL mention.  Move server-side debug item to
developer's FAQ.  Update URLs.
@
text
@d4 1
a4 1
   Last updated: Sat Apr 23 14:56:41 EDT 2005
d97 2
a98 2
    1.1) What is PostgreSQL? How is it pronounced?
    
d112 2
a113 2
    1.2) What is the copyright of PostgreSQL?
    
d145 2
a146 2
    1.3) What platforms does PostgreSQL support?
    
d162 2
a163 2
    1.4) Where can I get PostgreSQL?
    
d167 2
a168 2
    1.5) Where can I get support?
    
d183 2
a184 2
    1.6) How do I submit a bug report?
    
d191 2
a192 2
    1.7) What is the latest release?
    
d198 2
a199 2
    1.8) What documentation is available?
    
d218 2
a219 2
    1.9) How do I find out about known bugs or missing features?
    
d223 2
a224 2
    1.10) How can I learn SQL?
    
d235 2
a236 2
    1.11) How do I join the development team?
    
d239 2
a240 2
    1.12) How does PostgreSQL compare to other DBMSs?
    
d284 2
a285 2
    2.1) What interfaces are available for PostgreSQL?
    
d296 2
a297 2
    2.2) What tools are available for using PostgreSQL with Web pages?
    
d307 2
a308 2
    2.3) Does PostgreSQL have a graphical user interface?
    
d315 2
a316 2
    3.1) How do I install PostgreSQL somewhere other than /usr/local/pgsql?
    
d319 2
a320 2
    3.2) How do I control connections from other hosts?
    
d327 2
a328 2
    3.3) How do I tune the database engine for better performance?
    
d359 2
a360 2
    3.4) What debugging features are available?
    
d365 2
a366 2
    3.5) Why do I get "Sorry, too many clients" when trying to connect?
    
d372 3
a374 3
    3.6) Why do I need to do a dump and restore to upgrade between major
    PostgreSQL releases?
    
d383 2
a384 2
    3.7) What computer hardware should I use?
    
d396 2
a397 2
    4.1) How do I SELECT only the first few rows of a query? A random row?
    
d409 3
a411 3
    4.2) How do I find out what tables, indexes, databases, and users are
    defined? How do I see the queries used by psql to display them?
    
d430 2
a431 2
    4.3) How do you change a column's data type?
    
d445 2
a446 2
    4.4) What is the maximum size for a row, a table, and a database?
    
d469 3
a471 3
    4.5) How much database disk space is required to store data from a typical
    text file?
    
d503 2
a504 2
    4.6) Why are my queries slow? Why don't they use my indexes?
    
d555 2
a556 2
    4.7) How do I see how the query optimizer is evaluating my query?
    
d559 4
a562 4
    4.8) How do I perform regular expression searches and case-insensitive
    regular expression searches? How do I use an index for case-insensitive
    searches?
    
d576 3
a578 3
    4.9) In a query, how do I detect if a field is NULL? How can I sort on
    whether a field is NULL or not?
    
d592 2
a593 2
    4.10) What is the difference between the various character types?
    
d619 2
a620 2
    4.11.1) How do I create a serial/auto-incrementing field?
    
d638 2
a639 2
    4.11.2) How do I get the value of a SERIAL insert?
    
d658 2
a659 2
    4.11.3) Doesn't currval() lead to a race condition with other users?
    
d663 3
a665 3
    4.11.4) Why aren't my sequence numbers reused on transaction abort? Why are
    there gaps in the numbering of my sequence/SERIAL column?
    
d670 2
a671 2
    4.12) What is an OID? What is a TID?
    
d687 2
a688 2
    4.13) Why do I get the error "ERROR: Memory exhausted in AllocSetAlloc()"?
    
d702 2
a703 2
    4.14) How do I tell what PostgreSQL version I am running?
    
d706 2
a707 3
    4.15) Why does my large-object operations get "invalid large obj
    descriptor"?
    
d720 2
a721 2
    4.16) How do I create a column that will default to the current time?
    
d725 2
a726 2
    4.17) How do I perform an outer join?
    
d743 2
a744 2
    4.18) How do I perform queries using multiple databases?
    
d753 2
a754 2
    4.19) How do I return multiple rows or columns from a function?
    
d759 3
a761 3
    4.20) Why do I get "relation with OID ##### does not exist" errors when
    accessing temporary tables in PL/PgSQL functions?
    
d770 2
a771 2
    4.21) What encryption options are available?
    
d787 3
a789 3
    5.1) I wrote a user-defined function. When I run it in psql, why does it
    dump core?
    
d793 2
a794 2
    5.2) How can I contribute some nifty new types and functions to PostgreSQL?
    
d798 2
a799 2
    5.3) How do I write a C function to return a tuple?
    
d806 2
a807 3
    5.4) I have changed a source file. Why does the recompile not see the
    change?
    
@


1.338
log
@Update FAQ release number to 8.0.2.
@
text
@d4 1
a4 1
   Last updated: Sat Apr 23 11:22:46 EDT 2005
d151 5
a155 5
   Starting with version 8.0, PostgreSQL now runs natively on Microsoft
   Windows NT-based operating systems like Win2000, WinXP, and Win2003. A
   prepackaged installer is available at
   http://pgfoundry.org/projects/pginstaller. MSDOS-based versions of
   Windows (Win95, Win98, WinMe) can run PostgreSQL using Cygwin.
d164 2
a165 3
   The primary anonymous ftp site for PostgreSQL is
   ftp://ftp.PostgreSQL.org/pub/. For mirror sites, see our main web
   site.
d176 3
a178 4
   irc.freenode.net or use any of the other popular IRC clients. A
   Spanish one also exists on the same network, (#postgresql-es), and a
   French one, (#postgresqlfr). There is also a PostgreSQL channel on
   EFNet.
d195 2
a196 1
   We plan to have major releases every ten to twelve months.
d225 6
a230 4
   The PostgreSQL book at
   http://www.postgresql.org/docs/books/awbook.html teaches SQL. There is
   another PostgreSQL book at http://www.commandprompt.com/ppbook. There
   is a nice tutorial at
a234 7
   Another one is "Teach Yourself SQL in 21 Days, Second Edition" at
   http://members.tripod.com/er4ebus/sql/index.htm
   
   Many of our users like The Practical SQL Handbook, Bowman, Judith S.,
   et al., Addison-Wesley. Others like The Complete Reference SQL, Groff
   et al., McGraw-Hill.
   
d237 1
a237 10
   First, download the latest source and read the PostgreSQL Developers
   FAQ and documentation on our web site, or in the distribution. Second,
   subscribe to the pgsql-hackers and pgsql-patches mailing lists. Third,
   submit high quality patches to pgsql-patches.
   
   There are about a dozen people who have commit privileges to the
   PostgreSQL CVS archive. They each have submitted so many high-quality
   patches that it was impossible for the existing committers to keep up,
   and we had confidence that patches they committed were of high
   quality.
d255 2
a256 7
          others. In comparison to MySQL or leaner database systems, we
          are faster for multiple users, complex queries, and a
          read/write query load. MySQL is faster for simple SELECT
          queries done by a few users. Of course, MySQL does not have
          most of the features mentioned in the Features section above.
          We are built for reliability and features, and we continue to
          improve performance in every release.
d309 1
a309 9
   Yes, there are several graphical interfaces to PostgreSQL available.
   These include pgAdmin III (http://www.pgadmin.org, PgAccess
   http://www.pgaccess.org), RHDB Admin (http://sources.redhat.com/rhdb/
   ), TORA ( http://www.globecom.net/tora/, partly commercial), and
   Rekall ( http://www.rekallrevealed.org/). There is also PhpPgAdmin (
   http://phppgadmin.sourceforge.net/ ), a web-based interface to
   PostgreSQL.
   
   See http://techdocs.postgresql.org/guides/GUITools for a more detailed
a364 37
   The following detailed debug instructions are to be used to provide
   more detailed information for server developers debugging a problem.
   
   It is also possible to debug the server if it isn't operating
   properly. First, by running configure with the --enable-cassert
   option, many assert()s monitor the progress of the backend and halt
   the program when something unexpected occurs.
   
   The postmaster has a -d option that allows even more detailed
   information to be reported. The -d option takes a number that
   specifies the debug level. Be warned that high debug level values
   generate large log files.
   
   If postmaster is not running, you can actually run the postgres
   backend from the command line, and type your SQL statement directly.
   This is recommended only for debugging purposes. Note that a newline
   terminates the query, not a semicolon. If you have compiled with
   debugging symbols, you can use a debugger to see what is happening.
   Because the backend was not started from postmaster, it is not running
   in an identical environment and locking/backend interaction problems
   may not be duplicated.
   
   If postmaster is running, start psql in one window, then find the PID
   of the postgres process used by psql using SELECT pg_backend_pid().
   Use a debugger to attach to the postgres PID. You can set breakpoints
   in the debugger and issue queries from psql. If you are debugging
   postgres startup, you can set PGOPTIONS="-W n", then start psql. This
   will cause startup to delay for n seconds so you can attach to the
   process with the debugger, set any breakpoints, and continue through
   the startup sequence.
   
   You can also compile with profiling to see what functions are taking
   execution time. The backend profile files will be deposited in the
   pgsql/data/base/dbname directory. The client profile file will be put
   in the client's current directory. Linux requires a compile with
   -DLINUX_PROFILE for proper profiling.
   
d376 1
a376 1
   so upgrading from 7.4 to 7.4.1 does not require a dump and restore.
d505 5
a509 5
   Indexes are not automatically used by every query. Indexes are only
   used if the table is larger than a minimum size, and the query selects
   only a small percentage of the rows in the table. This is because the
   random disk access caused by an index scan can be slower than a
   straight read through the table, or sequential scan.
@


1.337
log
@Update to 8.0.1.
@
text
@d4 1
a4 1
   Last updated: Tue Mar 15 17:38:18 EST 2005
d195 1
a195 1
   The latest release of PostgreSQL is version 8.0.1.
@


1.336
log
@Here's the patch to fix a lot of markup errors in the HTML FAQs. Doesn't
change content (at least not supposed to).

Magnus Hagander
@
text
@d4 1
a4 1
   Last updated: Fri Mar 11 16:42:06 EST 2005
d195 1
a195 1
   The latest release of PostgreSQL is version 8.0.0.
@


1.335
log
@Fix plpgsql error message for dropped temporary tables.
@
text
@d4 1
a4 1
   Last updated: Thu Feb 24 23:18:31 EST 2005
d822 2
a823 1
   http://techdocs.postgresql.org/guides/SetReturningFunctions.
@


1.334
log
@Updatge wording.
@
text
@d4 1
a4 1
   Last updated: Thu Feb 24 19:45:40 EST 2005
d80 2
a81 2
   4.20) Why do I get "missing oid" errors when accessing temporary
   tables in PL/PgSQL functions?
d824 2
a825 2
    4.20) Why do I get "missing oid" errors when accessing temporary tables in
    PL/PgSQL functions?
@


1.333
log
@Fix markup.
@
text
@d4 1
a4 1
   Last updated: Thu Feb 24 19:33:07 EST 2005
d324 2
a325 1
   For complex cases, many use the Perl DBD::Pg with CGI.pm or mod_perl.
@


1.332
log
@Fix HTML markup and add NULL sorting item to existing NULL FAQ item.

Greg Sabino Mullan
@
text
@d4 1
a4 1
   Last updated: Thu Feb 24 19:32:04 EST 2005
d648 4
a651 4
   To sort by the NULLIS NULL
   and IS NOT NULL modifiers in your WHERE clause. Things that are true
   will sort higher than things that are false, so the following will put
   NULL entries at the top of the resulting list:
@


1.331
log
@Update question text:

    <H4><A name="4.20">4.20</A>) Why do I get "missing oid" errors when
    accessing temporary tables in PL/PgSQL functions?</H4>

Merlin Moncure
@
text
@d4 1
a4 1
   Last updated: Mon Feb 14 23:35:09 EST 2005
d62 2
a63 1
   4.9) In a query, how do I detect if a field is NULL?
d123 2
a124 1
   Portions Copyright (c) 1994-6 Regents of the University of California
d165 2
a166 1
   ftp://ftp.PostgreSQL.org/pub. For mirror sites, see our main web site.
d183 1
a183 1
   http://techdocs.postg resql.org/companies.php.
d190 1
a190 1
   Also check out our ftp site ftp://ftp.PostgreSQL.org/pub to see if
d324 1
a324 1
   For complex cases, many use the Perl and CGI.pm or mod_perl.
d330 3
a332 3
   http://www.pgaccess.org), RHDB Admin (http://sources.redhat.com/rhd b/
   ), TORA (http://www.globecom.net/tora/, partly commercial), and Rekall
   ( http://www.rekallrevealed.org/). There is also PhpPgAdmin (
d640 2
a641 1
    4.9) In a query, how do I detect if a field is NULL?
d644 12
a655 1
   
@


1.330
log
@Update Momjain book URL.
@
text
@d4 1
a4 1
   Last updated: Mon Feb 14 23:03:15 EST 2005
d79 2
a80 2
   4.20) Why can't I reliably create/drop temporary tables in PL/PgSQL
   functions?
d808 2
a809 2
    4.20) Why can't I reliably create/drop temporary tables in PL/PgSQL
    functions?
@


1.329
log
@Update URL for Momjian book.
@
text
@d4 1
a4 1
   Last updated: Mon Feb 14 23:01:58 EST 2005
d223 4
a226 3
   The PostgreSQL book at http://www.PostgreSQL.org/docs/awbook.html
   teaches SQL. There is another PostgreSQL book at
   http://www.commandprompt.com/ppbook. There is a nice tutorial at
@


1.328
log
@Update FAQ numbering.
@
text
@d4 1
a4 1
   Last updated: Wed Feb 2 12:44:03 EST 2005
d203 1
a203 1
   http://www.PostgreSQL.org/docs/awbook.html and
@


1.327
log
@Remove pgsql_tmp directory FAQ item.
@
text
@d4 1
a4 1
   Last updated: Wed Feb 2 08:40:42 EST 2005
d64 4
a67 4
   4.11.0) How do I create a serial/auto-incrementing field?
   4.11.1) How do I get the value of a SERIAL insert?
   4.11.2) Doesn't currval() lead to a race condition with other users?
   4.11.3) Why aren't my sequence numbers reused on transaction abort?
@


1.326
log
@Add Josh's performance page.
@
text
@d4 1
a4 1
   Last updated: Tue Feb 1 16:10:47 EST 2005
d44 1
a44 2
   3.6) What is in the pgsql_tmp directory?
   3.7) Why do I need to do a dump and restore to upgrade PostgreSQL
d46 1
a46 1
   3.8) What computer hardware should I use?
d432 1
a432 12
    3.6) What is in the pgsql_tmp directory?
    
   This directory contains temporary files generated by the query
   executor. For example, if a sort needs to be done to satisfy an ORDER
   BY and the sort requires more space than the backend's -S parameter
   allows, then temporary files are created here to hold the extra data.
   
   The temporary files are usually deleted automatically, but might
   remain if a backend crashes during a sort. A stop and restart of the
   postmaster will remove files from those directories.
   
    3.7) Why do I need to do a dump and restore to upgrade between major
d443 1
a443 1
    3.8) What computer hardware should I use?
d642 6
a647 6
       Type    Internal Name                    Notes
    VARCHAR(n) varchar       size specifies maximum length, no padding
    CHAR(n)    bpchar        blank padded to the specified fixed length
    TEXT       text          no specific upper limit on length
    BYTEA      bytea         variable-length byte array (null-byte safe)
    "char"     char          one character
@


1.325
log
@Final FAQ cleanups to remove information about very old releases.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 31 21:40:28 EST 2005
d381 1
a381 1
          x.html.
@


1.324
log
@Remove outer join simulation using UNION now that we have had outer
joins for quite a long time.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 31 21:35:15 EST 2005
d811 1
a811 1
   course, a client can make simultaneous connections to different
d816 2
a817 2
   In 7.3, you can easily return multiple rows or columns from a
   function, http://techdocs.postgresql.org/guides/SetReturningFunctions.
d822 1
a822 1
   PL/PgSQL caches function contents, and an unfortunate side effect is
d841 1
a841 2
       version 7.3. In previous versions, you must enable the option
       PASSWORD_ENCRYPTION in postgresql.conf.
@


1.323
log
@Remove FAQ about database terms.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 31 21:31:39 EST 2005
d784 1
a784 1
    CREATE TABLE test (x int, modtime timestamp DEFAULT CURRENT_TIMESTAMP );
a803 12
   In previous releases, outer joins can be simulated using UNION and NOT
   IN. For example, when joining tab1 and tab2, the following query does
   an outer join of the two tables:
    SELECT tab1.col1, tab2.col2
    FROM tab1, tab2
    WHERE tab1.col1 = tab2.col1
    UNION ALL
    SELECT tab1.col1, NULL
    FROM tab1
    WHERE tab1.col1 NOT IN (SELECT tab2.col1 FROM tab2)
    ORDER BY col1

@


1.322
log
@Remove FAQ mention of DROP column.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 31 20:41:21 EST 2005
d71 1
a71 2
   4.13) What is the meaning of some of the terms used in PostgreSQL?
   4.14) Why do I get the error "ERROR: Memory exhausted in
d73 2
a74 2
   4.15) How do I tell what PostgreSQL version I am running?
   4.16) Why does my large-object operations get "invalid large obj
d76 5
a80 5
   4.17) How do I create a column that will default to the current time?
   4.18) How do I perform an outer join?
   4.19) How do I perform queries using multiple databases?
   4.20) How do I return multiple rows or columns from a function?
   4.21) Why can't I reliably create/drop temporary tables in PL/PgSQL
d82 1
a82 1
   4.22) What encryption options are available?
d396 1
d520 10
a529 8
    Maximum size for a database?             unlimited (32 TB databases exist)
    Maximum size for a table?                32 TB
    Maximum size for a row?                  1.6TB
    Maximum size for a field?                1 GB
    Maximum number of rows in a table?       unlimited
    Maximum number of columns in a table?    250-1600 depending on column types
    Maximum number of indexes on a table?    unlimited

d616 2
a617 2
       indexes. Instead, use functional indexes, which are described in
       section 4.10.
d619 3
a621 3
       possible to know the next-greater character in a non-C locale. You
       can create a special text_pattern_ops index for such cases that
       work only for LIKE indexing.
d624 1
a624 1
   types exactly match the index's column types. This is particularly
d645 1
a645 1
   functional index, it will be used:
d654 7
a660 8
Type            Internal Name   Notes
--------------------------------------------------
VARCHAR(n)      varchar         size specifies maximum length, no padding
CHAR(n)         bpchar          blank padded to the specified fixed length
TEXT            text            no specific upper limit on length
BYTEA           bytea           variable-length byte array (null-byte safe)
"char"          char            one character

d696 1
a696 3
   sequences. You can also use each row's OID field as a unique value.
   However, if you need to dump and reload the database, you need to use
   pg_dump's -o option or COPY WITH OIDS option to preserve the OIDs.
a717 6
   Finally, you could use the OID returned from the INSERT statement to
   look up the default value, though this is probably the least portable
   approach, and the oid value will wrap around when it reaches 4
   billion. In Perl, using DBI with the DBD::Pg module, the oid value is
   made available via $sth->{pg_oid_status} after $sth->execute().
   
d720 2
a721 2
   No. currval() returns the current value assigned by your backend, not
   by all users.
d747 1
a747 19
    4.13) What is the meaning of some of the terms used in PostgreSQL?
    
   Some of the source code and older documentation use terms that have
   more common usage. Here are some:
     * table, relation, class
     * row, record, tuple
     * column, field, attribute
     * retrieve, select
     * replace, update
     * append, insert
     * OID, serial value
     * portal, cursor
     * range variable, table name, table alias
       
   A list of general database terms can be found at:
   http://hea-www.harvard.edu/MST/simul/software/docs/pkgs/pgsql/glossary
   /glossary.html
   
    4.14) Why do I get the error "ERROR: Memory exhausted in AllocSetAlloc()"?
d762 1
a762 1
    4.15) How do I tell what PostgreSQL version I am running?
d766 1
a766 1
    4.16) Why does my large-object operations get "invalid large obj
d781 1
a781 1
    4.17) How do I create a column that will default to the current time?
d786 1
a786 1
    4.18) How do I perform an outer join?
d816 1
a816 1
    4.19) How do I perform queries using multiple databases?
d826 1
a826 1
    4.20) How do I return multiple rows or columns from a function?
d831 1
a831 1
    4.21) Why can't I reliably create/drop temporary tables in PL/PgSQL
d842 1
a842 1
    4.22) What encryption options are available?
@


1.321
log
@Update LIMIT/FETCH FAQ item.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 31 20:35:58 EST 2005
d54 1
a54 1
   4.3) How do you remove a column from a table, or change its data type?
d494 3
a496 1
   too. Use psql -l will list all databases.
d502 1
a502 1
    4.3) How do you remove a column from a table, or change its data type?
a503 11
   DROP COLUMN functionality was added in release 7.3 with ALTER TABLE
   DROP COLUMN. In earlier versions, you can do this:
    BEGIN;
    LOCK TABLE old_table;
    SELECT ...  -- select all columns but the one you want to remove
    INTO TABLE new_table
    FROM old_table;
    DROP TABLE old_table;
    ALTER TABLE new_table RENAME TO old_table;
    COMMIT;

@


1.320
log
@Update connections FAQ item.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 31 19:18:44 EST 2005
d448 2
a449 2
   so upgrading from 7.2 to 7.2.1 does not require a dump and restore.
   However, major releases (e.g. from 7.2 to 7.3) often change the
d451 1
a451 1
   often complex, so we don't maintain backward compatability for data
a454 4
   In releases where the on-disk format does not change, the pg_upgrade
   script can be used to upgrade without a dump/restore. The release
   notes mention whether pg_upgrade is available for the release.
   
d470 4
a473 7
   See the FETCH manual page, or use SELECT ... LIMIT....
   
   The entire query may have to be evaluated, even if you only want the
   first few rows. Consider using a query that has an ORDER BY. If there
   is an index that matches the ORDER BY, PostgreSQL may be able to
   evaluate only the first few records requested, or the entire query may
   have to be evaluated until the desired rows have been generated.
@


1.319
log
@Fix markup typo.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 31 17:58:50 EST 2005
d428 4
a431 17
   You need to increase postmaster's limit on how many concurrent backend
   processes it can start.
   
   The default limit is 32 processes. You can increase it by restarting
   postmaster with a suitable -N value or modifying postgresql.conf.
   
   Note that if you make -N larger than 32, you must also increase -B
   beyond its default of 64; -B must be at least twice -N, and probably
   should be more than that for best performance. For large numbers of
   backend processes, you are also likely to find that you need to
   increase various Unix kernel configuration parameters. Things to check
   include the maximum size of shared memory blocks, SHMMAX; the maximum
   number of semaphores, SEMMNS and SEMMNI; the maximum number of
   processes, NPROC; the maximum number of processes per user, MAXUPRC;
   and the maximum number of open files, NFILE and NINODE. The reason
   that PostgreSQL has a limit on the number of allowed backend processes
   is so your system won't run out of resources.
@


1.318
log
@Update debeug FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 31 17:57:48 EST 2005
@


1.317
log
@Restructure debug FAQ entry.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 31 17:57:02 EST 2005
d391 1
a391 1
   more detailed information for server developers debugging a problem
@


1.316
log
@Reorganize FAQ entry on performance.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 31 15:40:24 EST 2005
d386 14
a399 18
   PostgreSQL has several features that report status information that
   can be valuable for debugging purposes.
   
   First, by running configure with the --enable-cassert option, many
   assert()s monitor the progress of the backend and halt the program
   when something unexpected occurs.
   
   Both postmaster and postgres have several debug options available.
   First, whenever you start postmaster, make sure you send the standard
   output and error to a log file, like:
    cd /usr/local/pgsql
    ./bin/postmaster >server.log 2>&1 &

   This will put a server.log file in the top-level PostgreSQL directory.
   This file contains useful information about problems or errors
   encountered by the server. Postmaster has a -d option that allows even
   more detailed information to be reported. The -d option takes a number
   that specifies the debug level. Be warned that high debug level values
a419 4
   There are several log_* server configuration variables that enable
   printing of process statistics which can be very useful for debugging
   and performance measurements.
   
@


1.315
log
@Update admin tools FAQ.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 30 21:44:35 EST 2005
d349 2
a350 2
   postgresql.conf and enable host-based authentication by modifying the
   file $PGDATA/pg_hba.conf accordingly.
d354 1
a354 29
   Certainly, indexes can speed up queries. The EXPLAIN ANALYZE command
   allows you to see how PostgreSQL is interpreting your query, and which
   indexes are being used.
   
   If you are doing many INSERTs, consider doing them in a large batch
   using the COPY command. This is much faster than individual INSERTS.
   Second, statements not in a BEGIN WORK/COMMIT transaction block are
   considered to be in their own transaction. Consider performing several
   statements in a single transaction block. This reduces the transaction
   overhead. Also, consider dropping and recreating indexes when making
   large data changes.
   
   There are several tuning options in the Administration Guide/Server
   Run-time Environment/Run-time Configuration. You can disable fsync()
   by using fsync option. This will prevent fsync()s from flushing to
   disk after every transaction.
   
   You can use the shared_buffers option to increase the number of shared
   memory buffers used by the backend processes. If you make this
   parameter too high, the postmaster may not start because you have
   exceeded your kernel's limit on shared memory space. Each buffer is 8K
   and the default is 1000 buffers.
   
   You can also use the sort_mem (from PostgreSQL 8.0: work_mem) options
   to increase the maximum amount of memory used by the backend processes
   for each temporary sort. The default is 1024 (i.e. 1MB).
   
   You can also use the CLUSTER command to group data in tables to match
   an index. See the CLUSTER manual page for more details.
d356 28
@


1.314
log
@Update PHP mention.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 30 21:42:21 EST 2005
d327 2
a328 2
   These include PgAccess http://www.pgaccess.org), pgAdmin III
   (http://www.pgadmin.org, RHDB Admin (http://sources.redhat.com/rhdb/
@


1.313
log
@Remove "Support" FAQ item.  We now have a tab on our web site.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 30 21:39:39 EST 2005
d319 2
a320 2
   For Web integration, PHP is an excellent interface. It is at
   http://www.php.net.
d322 1
a322 1
   For complex cases, many use the Perl interface and CGI.pm or mod_perl.
@


1.312
log
@Wording improvement.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 30 21:18:36 EST 2005
a28 1
   1.13) How can I financially assist PostgreSQL?
a297 23
          
    1.13) How can I financially assist PostgreSQL?
    
   PostgreSQL has had a first-class infrastructure since we started in
   1996. This is all thanks to Marc Fournier, who has created and managed
   this infrastructure over the years.
   
   Quality infrastructure is very important to an open-source project. It
   prevents disruptions that can greatly delay forward movement of the
   project.
   
   Of course, this infrastructure is not cheap. There are a variety of
   monthly and one-time expenses that are required to keep it going. If
   you or your company has money it can donate to help fund this effort,
   please go to http://store.pgsql.com/shopping/ and make a donation.
   
   Although the web page mentions PostgreSQL, Inc, the "contributions"
   item is solely to support the PostgreSQL project and does not fund any
   specific company. If you prefer, you can also send a check to the
   contact address.
   
   Also, if you have a success story about PostgreSQL, please email it to
   our advocacy list at pgsql-advocacy@@postgresql.org.
@


1.311
log
@Reorder support FAQ items.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 30 21:16:28 EST 2005
d191 1
a191 1
   there is a more recent PostgreSQL version or patches.
@


1.310
log
@Update section to mention developer's FAQ.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 30 21:08:44 EST 2005
d22 6
a27 6
   1.6) What is the latest release?
   1.7) What documentation is available?
   1.8) How do I find out about known bugs or missing features?
   1.9) How can I learn SQL?
   1.10) How do I join the development team?
   1.11) How do I submit a bug report?
d185 9
a193 1
    1.6) What is the latest release?
d199 1
a199 1
    1.7) What documentation is available?
d219 1
a219 1
    1.8) How do I find out about known bugs or missing features?
d224 1
a224 1
    1.9) How can I learn SQL?
d240 1
a240 1
    1.10) How do I join the development team?
a252 8
    1.11) How do I submit a bug report?
    
   Visit the PostgreSQL bug form at
   http://www.postgresql.org/support/submitbug.
   
   Also check out our ftp site ftp://ftp.PostgreSQL.org/pub to see if
   there is a more recent PostgreSQL version or patches.
   
@


1.309
log
@Mention releases are every 10-12 months now.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 30 20:59:07 EST 2005
d193 3
a195 3
   Several manuals, manual pages, and some small test examples are
   included in the distribution. See the /doc directory. You can also
   browse the manuals online at http://www.PostgreSQL.org/docs.
d235 1
a235 1
   documentation on our web site, or in the distribution. Second,
@


1.308
log
@Simplify FAQ item about obtaining support.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 30 20:53:02 EST 2005
d189 1
a189 1
   We plan to have major releases every six to eight months.
@


1.307
log
@Clarify license FAQ item.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 30 20:37:18 EST 2005
d170 4
a173 30
   The main mailing list is: pgsql-general@@PostgreSQL.org. It is
   available for discussion of matters pertaining to PostgreSQL. To
   subscribe, send mail with the following lines in the body (not the
   subject line):
    subscribe
    end

   to pgsql-general-request@@PostgreSQL.org.
   
   There is also a digest list available. To subscribe to this list, send
   email to: pgsql-general-digest-request@@PostgreSQL.org with a body of:
    subscribe
    end

   Digests are sent out to members of this list whenever the main list
   has received around 30k of messages.
   
   The bugs mailing list is available. To subscribe to this list, send
   email to pgsql-bugs-request@@PostgreSQL.org with a body of:
    subscribe
    end

   There is also a developers discussion mailing list available. To
   subscribe to this list, send email to
   pgsql-hackers-request@@PostgreSQL.org with a body of:
    subscribe
    end

   Additional mailing lists and information about PostgreSQL can be found
   via the PostgreSQL WWW home page at:
a174 2
     http://www.PostgreSQL.org
     
d176 1
a176 1
   To connect you can use the Unix command irc -c '#postgresql' "$USER"
d183 1
a183 1
   http://techdocs.postgresql.org/companies.php.
@


1.306
log
@Modernize the FAQ item "What is PostgreSQL" to skip most historical
information.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 30 20:25:19 EST 2005
d18 1
a18 1
   1.2) What is the copyright on PostgreSQL?
d114 1
a114 1
    1.2) What is the copyright on PostgreSQL?
d116 5
a120 1
   PostgreSQL is subject to the following COPYRIGHT:
a145 4
   The above is the BSD license, the classic open-source license. It has
   no restrictions on how the source code may be used. We like it and
   have no intention of changing it.
   
@


1.305
log
@Update FAQ text file.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 29 23:44:48 EST 2005
d101 1
a101 1
   PostgreSQL is pronounced Post-Gres-Q-L.
d103 8
a110 12
   PostgreSQL is an enhancement of the POSTGRES database management
   system (and is still sometimes reffered to as simply "Postgres"), a
   next-generation DBMS research prototype. While PostgreSQL retains the
   powerful data model and rich data types of POSTGRES, it replaces the
   PostQuel query language with an extended subset of SQL. PostgreSQL is
   free and the complete source is available.
   
   PostgreSQL development is performed by a team of developers who all
   subscribe to the PostgreSQL development mailing list. The current
   coordinator is Marc G. Fournier (scrappy@@PostgreSQL.org). (See section
   1.6 on how to join). This team is now responsible for all development
   of PostgreSQL. It is a community project and is not controlled by any
a113 12
   The authors of PostgreSQL 1.01 were Andrew Yu and Jolly Chen. Many
   others have contributed to the porting, testing, debugging, and
   enhancement of the code. The original Postgres code, from which
   PostgreSQL is derived, was the effort of many graduate students,
   undergraduate students, and staff programmers working under the
   direction of Professor Michael Stonebraker at the University of
   California, Berkeley.
   
   The original name of the software at Berkeley was Postgres. When SQL
   functionality was added in 1995, its name was changed to Postgres95.
   The name was changed at the end of 1996 to PostgreSQL.
   
@


1.304
log
@Fix ampersand in URL.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 29 23:25:05 EST 2005
d484 11
a494 16
   of the postgres process used by psql using
SELECT pg_backend_pid()

   . Use a debugger to attach to the postgres PID. You can set
   breakpoints in the debugger and issue queries from psql. If you are
   debugging postgres startup, you can set PGOPTIONS="-W n", then start
   psql. This will cause startup to delay for n seconds so you can attach
   to the process with the debugger, set any breakpoints, and continue
   through the startup sequence.
   
   There are several
log_*

   server configuration variables that enable printing of process
   statistics which can be very useful for debugging and performance
   measurements.
d723 2
a724 5
       can create a special
text_pattern_ops
       index for such cases that work only for
LIKE
       indexing.
d914 1
a914 1
CREATE TABLE test (x int, modtime timestamp DEFAULT CURRENT_TIMESTAMP );
@


1.303
log
@Remove IN/slow FAQ item because it only applies to <=7.3.X.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 29 23:20:03 EST 2005
@


1.302
log
@Remove GEQO and Rtree FAQ items.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 29 23:15:42 EST 2005
d79 4
a82 5
   4.18) Why are my subqueries using IN so slow?
   4.19) How do I perform an outer join?
   4.20) How do I perform queries using multiple databases?
   4.21) How do I return multiple rows or columns from a function?
   4.22) Why can't I reliably create/drop temporary tables in PL/PgSQL
d84 1
a84 1
   4.23) What encryption options are available?
d924 1
a924 22
    4.18) Why are my subqueries using IN so slow?
    
   In versions prior to 7.4, subqueries were joined to outer queries by
   sequentially scanning the result of the subquery for each row of the
   outer query. If the subquery returns only a few rows and the outer
   query returns many rows, IN is fastest. To speed up other queries,
   replace IN with EXISTS:
    SELECT *
    FROM tab
    WHERE col IN (SELECT subcol FROM subtab);

   to:
    SELECT *
    FROM tab
    WHERE EXISTS (SELECT subcol FROM subtab WHERE subcol = col);

   For this to be fast, subcol should be an indexed column.
   
   In version 7.4 and later, IN actually uses the same sophisticated join
   techniques as normal queries, and is prefered to using EXISTS.
   
    4.19) How do I perform an outer join?
d954 1
a954 1
    4.20) How do I perform queries using multiple databases?
d964 1
a964 1
    4.21) How do I return multiple rows or columns from a function?
d969 1
a969 1
    4.22) Why can't I reliably create/drop temporary tables in PL/PgSQL
d980 1
a980 1
    4.23) What encryption options are available?
@


1.301
log
@More index item rewording.kUpdate FAQ.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 29 23:06:02 EST 2005
d61 9
a69 11
   4.8) What is an R-tree index?
   4.9) What is the Genetic Query Optimizer?
   4.10) How do I perform regular expression searches and
   case-insensitive regular expression searches? How do I use an index
   for case-insensitive searches?
   4.11) In a query, how do I detect if a field is NULL?
   4.12) What is the difference between the various character types?
   4.13.0) How do I create a serial/auto-incrementing field?
   4.13.1) How do I get the value of a SERIAL insert?
   4.13.2) Doesn't currval() lead to a race condition with other users?
   4.13.3) Why aren't my sequence numbers reused on transaction abort?
d71 3
a73 3
   4.14) What is an OID? What is a TID?
   4.15) What is the meaning of some of the terms used in PostgreSQL?
   4.16) Why do I get the error "ERROR: Memory exhausted in
d75 2
a76 2
   4.17) How do I tell what PostgreSQL version I am running?
   4.18) Why does my large-object operations get "invalid large obj
d78 6
a83 6
   4.19) How do I create a column that will default to the current time?
   4.20) Why are my subqueries using IN so slow?
   4.21) How do I perform an outer join?
   4.22) How do I perform queries using multiple databases?
   4.23) How do I return multiple rows or columns from a function?
   4.24) Why can't I reliably create/drop temporary tables in PL/PgSQL
d85 1
a85 1
   4.25) What encryption options are available?
d743 1
a743 30
    4.8) What is an R-tree index?
    
   An R-tree index is used for indexing spatial data. A hash index can't
   handle range searches. A B-tree index only handles range searches in a
   single dimension. R-trees can handle multi-dimensional data. For
   example, if an R-tree index can be built on an attribute of type
   point, the system can more efficiently answer queries such as "select
   all points within a bounding rectangle."
   
   The canonical paper that describes the original R-tree design is:
   
   Guttman, A. "R-trees: A Dynamic Index Structure for Spatial
   Searching." Proceedings of the 1984 ACM SIGMOD Int'l Conf on Mgmt of
   Data, 45-57.
   
   You can also find this paper in Stonebraker's "Readings in Database
   Systems".
   
   Built-in R-trees can handle polygons and boxes. In theory, R-trees can
   be extended to handle higher number of dimensions. In practice,
   extending R-trees requires a bit of work and we don't currently have
   any documentation on how to do it.
   
    4.9) What is the Genetic Query Optimizer?
    
   The GEQO module speeds query optimization when joining many tables by
   means of a Genetic Algorithm (GA). It allows the handling of large
   join queries through nonexhaustive search.
   
    4.10) How do I perform regular expression searches and case-insensitive
d760 1
a760 1
    4.11) In a query, how do I detect if a field is NULL?
d764 1
a764 1
    4.12) What is the difference between the various character types?
d792 1
a792 1
    4.13.1) How do I create a serial/auto-incrementing field?
d813 1
a813 1
    4.13.2) How do I get the value of a SERIAL insert?
d817 1
a817 1
   explicitly. Using the example table in 4.13.1, an example in a
d839 1
a839 1
    4.13.3) Doesn't currval() lead to a race condition with other users?
d844 1
a844 1
    4.13.4) Why aren't my sequence numbers reused on transaction abort? Why are
d851 1
a851 1
    4.14) What is an OID? What is a TID?
d868 1
a868 1
    4.15) What is the meaning of some of the terms used in PostgreSQL?
d886 1
a886 1
    4.16) Why do I get the error "ERROR: Memory exhausted in AllocSetAlloc()"?
d901 1
a901 1
    4.17) How do I tell what PostgreSQL version I am running?
d905 1
a905 1
    4.18) Why does my large-object operations get "invalid large obj
d920 1
a920 1
    4.19) How do I create a column that will default to the current time?
d925 1
a925 1
    4.20) Why are my subqueries using IN so slow?
d946 1
a946 1
    4.21) How do I perform an outer join?
d976 1
a976 1
    4.22) How do I perform queries using multiple databases?
d986 1
a986 1
    4.23) How do I return multiple rows or columns from a function?
d991 1
a991 1
    4.24) Why can't I reliably create/drop temporary tables in PL/PgSQL
d1002 1
a1002 1
    4.25) What encryption options are available?
@


1.300
log
@Reword index/slow query item.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 29 23:04:53 EST 2005
d59 1
a59 1
   4.6) Why are my queries slow? Why don't they make use of indexes?
d686 1
a686 1
    4.6) Why are my queries slow? Why don't they make use of indexes?
@


1.299
log
@Remove FAQ item about binary cursors.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 29 23:02:37 EST 2005
d59 1
a59 1
   4.6) My queries are slow or don't make use of the indexes. Why?
d686 1
a686 1
    4.6) My queries are slow or don't make use of the indexes. Why?
@


1.298
log
@Remove FAQ items about IPC errors.  We now report the help description
right in the failure.  We can always re-add it if required.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 29 22:59:12 EST 2005
d52 2
a53 3
   4.1) What is the difference between binary cursors and normal cursors?
   4.2) How do I SELECT only the first few rows of a query? A random row?
   4.3) How do I find out what tables, indexes, databases, and users are
d55 3
a57 3
   4.4) How do you remove a column from a table, or change its data type?
   4.5) What is the maximum size for a row, a table, and a database?
   4.6) How much database disk space is required to store data from a
d59 5
a63 5
   4.7) My queries are slow or don't make use of the indexes. Why?
   4.8) How do I see how the query optimizer is evaluating my query?
   4.9) What is an R-tree index?
   4.10) What is the Genetic Query Optimizer?
   4.11) How do I perform regular expression searches and
d66 6
a71 6
   4.12) In a query, how do I detect if a field is NULL?
   4.13) What is the difference between the various character types?
   4.14.0) How do I create a serial/auto-incrementing field?
   4.14.1) How do I get the value of a SERIAL insert?
   4.14.2) Doesn't currval() lead to a race condition with other users?
   4.14.3) Why aren't my sequence numbers reused on transaction abort?
d73 3
a75 3
   4.15) What is an OID? What is a TID?
   4.16) What is the meaning of some of the terms used in PostgreSQL?
   4.17) Why do I get the error "ERROR: Memory exhausted in
d77 2
a78 2
   4.18) How do I tell what PostgreSQL version I am running?
   4.19) Why does my large-object operations get "invalid large obj
d80 6
a85 6
   4.20) How do I create a column that will default to the current time?
   4.21) Why are my subqueries using IN so slow?
   4.22) How do I perform an outer join?
   4.23) How do I perform queries using multiple databases?
   4.24) How do I return multiple rows or columns from a function?
   4.25) Why can't I reliably create/drop temporary tables in PL/PgSQL
d87 1
a87 1
   4.26) What encryption options are available?
d569 1
a569 5
    4.1) What is the difference between binary cursors and normal cursors?
    
   See the DECLARE manual page for a description.
   
    4.2) How do I SELECT only the first few rows of a query? A random row?
d585 1
a585 1
    4.3) How do I find out what tables, indexes, databases, and users are
d604 1
a604 1
    4.4) How do you remove a column from a table, or change its data type?
d630 1
a630 1
    4.5) What is the maximum size for a row, a table, and a database?
d652 1
a652 1
    4.6) How much database disk space is required to store data from a typical
d686 1
a686 1
    4.7) My queries are slow or don't make use of the indexes. Why?
d728 1
a728 1
       section 4.11.
d741 1
a741 1
    4.8) How do I see how the query optimizer is evaluating my query?
d745 1
a745 1
    4.9) What is an R-tree index?
d768 1
a768 1
    4.10) What is the Genetic Query Optimizer?
d774 1
a774 1
    4.11) How do I perform regular expression searches and case-insensitive
d791 1
a791 1
    4.12) In a query, how do I detect if a field is NULL?
d795 1
a795 1
    4.13) What is the difference between the various character types?
d823 1
a823 1
    4.14.1) How do I create a serial/auto-incrementing field?
d844 1
a844 1
    4.14.2) How do I get the value of a SERIAL insert?
d848 1
a848 1
   explicitly. Using the example table in 4.14.1, an example in a
d870 1
a870 1
    4.14.3) Doesn't currval() lead to a race condition with other users?
d875 1
a875 1
    4.14.4) Why aren't my sequence numbers reused on transaction abort? Why are
d882 1
a882 1
    4.15) What is an OID? What is a TID?
d899 1
a899 1
    4.16) What is the meaning of some of the terms used in PostgreSQL?
d917 1
a917 1
    4.17) Why do I get the error "ERROR: Memory exhausted in AllocSetAlloc()"?
d932 1
a932 1
    4.18) How do I tell what PostgreSQL version I am running?
d936 1
a936 1
    4.19) Why does my large-object operations get "invalid large obj
d951 1
a951 1
    4.20) How do I create a column that will default to the current time?
d956 1
a956 1
    4.21) Why are my subqueries using IN so slow?
d977 1
a977 1
    4.22) How do I perform an outer join?
d1007 1
a1007 1
    4.23) How do I perform queries using multiple databases?
d1017 1
a1017 1
    4.24) How do I return multiple rows or columns from a function?
d1022 1
a1022 1
    4.25) Why can't I reliably create/drop temporary tables in PL/PgSQL
d1033 1
a1033 1
    4.26) What encryption options are available?
@


1.297
log
@Merge two Interfaces FAQ items into one.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 29 22:51:43 EST 2005
d41 6
a46 12
   3.2) When I start postmaster, I get a Bad System Call or core dumped
   message. Why?
   3.3) When I try to start postmaster, I get IpcMemoryCreate errors.
   Why?
   3.4) When I try to start postmaster, I get IpcSemaphoreCreate errors.
   Why?
   3.5) How do I control connections from other hosts?
   3.6) How do I tune the database engine for better performance?
   3.7) What debugging features are available?
   3.8) Why do I get "Sorry, too many clients" when trying to connect?
   3.9) What is in the pgsql_tmp directory?
   3.10) Why do I need to do a dump and restore to upgrade PostgreSQL
d48 1
a48 1
   3.11) What computer hardware should I use?
d416 1
a416 37
    3.2) When I start postmaster, I get a Bad System Call or core dumped
    message. Why?
    
   It could be a variety of problems, but first check to see that you
   have System V extensions installed in your kernel. PostgreSQL requires
   kernel support for shared memory and semaphores.
   
    3.3) When I try to start postmaster, I get IpcMemoryCreate errors. Why?
    
   You either do not have shared memory configured properly in your
   kernel or you need to enlarge the shared memory available in the
   kernel. The exact amount you need depends on your architecture and how
   many buffers and backend processes you configure for postmaster. For
   most systems, with default numbers of buffers and processes, you need
   a minimum of ~1 MB. See the PostgreSQL Administrator's Guide/Server
   Run-time Environment/Managing Kernel Resources section for more
   detailed information about shared memory and semaphores.
   
    3.4) When I try to start postmaster, I get IpcSemaphoreCreate errors. Why?
    
   If the error message is IpcSemaphoreCreate: semget failed (No space
   left on device) then your kernel is not configured with enough
   semaphores. Postgres needs one semaphore per potential backend
   process. A temporary solution is to start postmaster with a smaller
   limit on the number of backend processes. Use -N with a parameter less
   than the default of 32. A more permanent solution is to increase your
   kernel's SEMMNS and SEMMNI parameters.
   
   Inoperative semaphores can also cause crashes during heavy database
   access.
   
   If the error message is something else, you might not have semaphore
   support configured in your kernel at all. See the PostgreSQL
   Administrator's Guide for more detailed information about shared
   memory and semaphores.
   
    3.5) How do I control connections from other hosts?
d424 1
a424 1
    3.6) How do I tune the database engine for better performance?
d456 1
a456 1
    3.7) What debugging features are available?
d511 1
a511 1
    3.8) Why do I get "Sorry, too many clients" when trying to connect?
d531 1
a531 1
    3.9) What is in the pgsql_tmp directory?
d542 1
a542 1
    3.10) Why do I need to do a dump and restore to upgrade between major
d557 1
a557 1
    3.11) What computer hardware should I use?
@


1.296
log
@Merge unix and non-unix platform faq items, and remove Y2K item.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 29 21:21:25 EST 2005
d33 1
a33 1
   2.1) Are there ODBC drivers for PostgreSQL?
a35 1
   2.4) What languages are available to communicate with PostgreSQL?
d380 1
a380 1
    2.1) Are there ODBC drivers for PostgreSQL?
d382 9
a390 13
   There are two ODBC drivers available, PsqlODBC and OpenLink ODBC.
   
   You can download PsqlODBC from
   http://gborg.postgresql.org/project/psqlodbc/projdisplay.php.
   
   OpenLink ODBC can be gotten from http://www.openlinksw.com. It works
   with their standard ODBC client software so you'll have PostgreSQL
   ODBC available on every client platform they support (Win, Mac, Unix,
   VMS).
   
   They will probably be selling this product to people who need
   commercial-quality support, but a freeware version will always be
   available. Please send questions to postgres95@@openlink.co.uk.
a413 15
   
    2.4) What languages are able to communicate with PostgreSQL?
    
   Most popular programming languages contain an interface to PostgreSQL.
   Check your programming language's list of extension modules.
   
   The following interfaces are included in the PostgreSQL distribution:
     * C (libpq)
     * Embedded C (ecpg)
     * Java (jdbc)
     * Python (PyGreSQL)
     * TCL (libpgtcl)
       
   Additional interfaces are available at http://gborg.postgresql.org in
   the Drivers/Interfaces section.
@


1.295
log
@Update OID item description.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 29 21:05:17 EST 2005
d19 11
a29 13
   1.3) What Unix platforms does PostgreSQL run on?
   1.4) What non-Unix ports are available?
   1.5) Where can I get PostgreSQL?
   1.6) Where can I get support?
   1.7) What is the latest release?
   1.8) What documentation is available?
   1.9) How do I find out about known bugs or missing features?
   1.10) How can I learn SQL?
   1.11) Is PostgreSQL Y2K compliant?
   1.12) How do I join the development team?
   1.13) How do I submit a bug report?
   1.14) How does PostgreSQL compare to other DBMSs?
   1.15) How can I financially assist PostgreSQL?
d173 1
a173 1
    1.3) What Unix platforms does PostgreSQL run on?
a178 2
    1.4) What non-Unix ports are available?
    
d190 1
a190 1
    1.5) Where can I get PostgreSQL?
d195 1
a195 1
    1.6) Where can I get support?
d240 1
a240 1
    1.7) What is the latest release?
d246 1
a246 1
    1.8) What documentation is available?
d266 1
a266 1
    1.9) How do I find out about known bugs or missing features?
d271 1
a271 1
    1.10) How can I learn SQL?
d287 1
a287 5
    1.11) Is PostgreSQL Y2K compliant?
    
   Yes, we easily handle dates past the year 2000 AD, and before 2000 BC.
   
    1.12) How do I join the development team?
d300 1
a300 1
    1.13) How do I submit a bug report?
d308 1
a308 1
    1.14) How does PostgreSQL compare to other DBMSs?
d348 1
a348 1
          section 1.6.)
d355 1
a355 1
    1.15) How can I financially assist PostgreSQL?
@


1.294
log
@Document that Rekall is GPL now.
@
text
@d4 1
a4 1
   Last updated: Wed Jan 19 14:45:22 EST 2005
d959 10
a968 26
   OIDs are PostgreSQL's answer to unique row ids. Every row that is
   created in PostgreSQL gets a unique OID. All OIDs generated during
   initdb are less than 16384 (from include/access/transam.h). All
   user-created OIDs are equal to or greater than this. By default, all
   these OIDs are unique not only within a table or database, but unique
   within the entire PostgreSQL installation.
   
   PostgreSQL uses OIDs in its internal system tables to link rows
   between tables. These OIDs can be used to identify specific user rows
   and used in joins. It is recommended you use column type OID to store
   OID values. You can create an index on the OID field for faster
   access.
   
   OIDs are assigned to all new rows from a central area that is used by
   all databases. If you want to change the OID to something else, or if
   you want to make a copy of the table, with the original OIDs, there is
   no reason you can't do it:
        CREATE TABLE new_table(mycol int);
        SELECT oid AS old_oid, mycol INTO tmp_table FROM old_table;
        COPY tmp_table TO '/tmp/pgtable';
        COPY new_table WITH OIDS FROM '/tmp/pgtable';
        DROP TABLE tmp_table;

   OIDs are stored as 4-byte integers, and will overflow at 4 billion. No
   one has reported this ever happening, and we plan to have the limit
   removed before anyone does.
@


1.293
log
@Fix typo.
@
text
@d4 1
a4 1
   Last updated: Tue Jan 18 22:11:34 EST 2005
d421 3
a423 3
   ( http://www.thekompany.com/products/rekall/, proprietary). There is
   also PhpPgAdmin ( http://phppgadmin.sourceforge.net/ ), a web-based
   interface to PostgreSQL.
@


1.292
log
@Spelling fix.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 16 23:27:08 EST 2005
d65 1
a65 2
   4.4) How do you remove a column from a table, or change it's data
   type?
@


1.292.4.1
log
@Fix typo.
@
text
@d4 1
a4 1
   Last updated: Tue Jan 18 22:11:34 EST 2005
d65 2
a66 1
   4.4) How do you remove a column from a table, or change its data type?
@


1.292.4.2
log
@Mention Rekall is GPL now.
@
text
@d4 1
a4 1
   Last updated: Wed Jan 19 14:45:22 EST 2005
d421 3
a423 3
   ( http://www.rekallrevealed.org/). There is also PhpPgAdmin (
   http://phppgadmin.sourceforge.net/ ), a web-based interface to
   PostgreSQL.
@


1.292.4.3
log
@Backpatch FAQ changes to 8.0.X.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 29 23:20:03 EST 2005
d19 13
a31 11
   1.3) What platforms does PostgreSQL support?
   1.4) Where can I get PostgreSQL?
   1.5) Where can I get support?
   1.6) What is the latest release?
   1.7) What documentation is available?
   1.8) How do I find out about known bugs or missing features?
   1.9) How can I learn SQL?
   1.10) How do I join the development team?
   1.11) How do I submit a bug report?
   1.12) How does PostgreSQL compare to other DBMSs?
   1.13) How can I financially assist PostgreSQL?
d35 1
a35 1
   2.1) What interfaces are available for PostgreSQL?
d38 1
d44 12
a55 6
   3.2) How do I control connections from other hosts?
   3.3) How do I tune the database engine for better performance?
   3.4) What debugging features are available?
   3.5) Why do I get "Sorry, too many clients" when trying to connect?
   3.6) What is in the pgsql_tmp directory?
   3.7) Why do I need to do a dump and restore to upgrade PostgreSQL
d57 1
a57 1
   3.8) What computer hardware should I use?
d61 3
a63 2
   4.1) How do I SELECT only the first few rows of a query? A random row?
   4.2) How do I find out what tables, indexes, databases, and users are
d65 3
a67 3
   4.3) How do you remove a column from a table, or change its data type?
   4.4) What is the maximum size for a row, a table, and a database?
   4.5) How much database disk space is required to store data from a
d69 13
a81 11
   4.6) Why are my queries slow? Why don't they use my indexes?
   4.7) How do I see how the query optimizer is evaluating my query?
   4.8) How do I perform regular expression searches and case-insensitive
   regular expression searches? How do I use an index for
   case-insensitive searches?
   4.9) In a query, how do I detect if a field is NULL?
   4.10) What is the difference between the various character types?
   4.11.0) How do I create a serial/auto-incrementing field?
   4.11.1) How do I get the value of a SERIAL insert?
   4.11.2) Doesn't currval() lead to a race condition with other users?
   4.11.3) Why aren't my sequence numbers reused on transaction abort?
d83 3
a85 3
   4.12) What is an OID? What is a TID?
   4.13) What is the meaning of some of the terms used in PostgreSQL?
   4.14) Why do I get the error "ERROR: Memory exhausted in
d87 2
a88 2
   4.15) How do I tell what PostgreSQL version I am running?
   4.16) Why does my large-object operations get "invalid large obj
d90 6
a95 5
   4.17) How do I create a column that will default to the current time?
   4.18) How do I perform an outer join?
   4.19) How do I perform queries using multiple databases?
   4.20) How do I return multiple rows or columns from a function?
   4.21) Why can't I reliably create/drop temporary tables in PL/PgSQL
d97 1
a97 1
   4.22) What encryption options are available?
d175 1
a175 1
    1.3) What platforms does PostgreSQL support?
d181 2
d194 1
a194 1
    1.4) Where can I get PostgreSQL?
d199 1
a199 1
    1.5) Where can I get support?
d244 1
a244 1
    1.6) What is the latest release?
d250 1
a250 1
    1.7) What documentation is available?
d270 1
a270 1
    1.8) How do I find out about known bugs or missing features?
d275 1
a275 1
    1.9) How can I learn SQL?
d291 5
a295 1
    1.10) How do I join the development team?
d308 1
a308 1
    1.11) How do I submit a bug report?
d316 1
a316 1
    1.12) How does PostgreSQL compare to other DBMSs?
d356 1
a356 1
          section 1.5.)
d363 1
a363 1
    1.13) How can I financially assist PostgreSQL?
d389 1
a389 1
    2.1) What interfaces are available for PostgreSQL?
d391 13
a403 9
   The PostgreSQL install includes only the C and embedded C interfaces.
   All other interfaces are independent projects that are downloaded
   separately; being separate allows them to have their own release
   schedule and development teams.
   
   Some programming languages like PHP include an interface to
   PostgreSQL. Interfaces for languages like Perl, TCL, Python, and many
   others are available at http://gborg.postgresql.org in the
   Drivers/Interfaces section and via Internet search.
d427 15
d450 37
a486 1
    3.2) How do I control connections from other hosts?
d494 1
a494 1
    3.3) How do I tune the database engine for better performance?
d526 1
a526 1
    3.4) What debugging features are available?
d581 1
a581 1
    3.5) Why do I get "Sorry, too many clients" when trying to connect?
d601 1
a601 1
    3.6) What is in the pgsql_tmp directory?
d612 1
a612 1
    3.7) Why do I need to do a dump and restore to upgrade between major
d627 1
a627 1
    3.8) What computer hardware should I use?
d640 5
a644 1
    4.1) How do I SELECT only the first few rows of a query? A random row?
d660 1
a660 1
    4.2) How do I find out what tables, indexes, databases, and users are
d679 1
a679 1
    4.3) How do you remove a column from a table, or change its data type?
d705 1
a705 1
    4.4) What is the maximum size for a row, a table, and a database?
d727 1
a727 1
    4.5) How much database disk space is required to store data from a typical
d761 1
a761 1
    4.6) Why are my queries slow? Why don't they use my indexes?
d803 1
a803 1
       section 4.10.
d816 1
a816 1
    4.7) How do I see how the query optimizer is evaluating my query?
d820 30
a849 1
    4.8) How do I perform regular expression searches and case-insensitive
d866 1
a866 1
    4.9) In a query, how do I detect if a field is NULL?
d870 1
a870 1
    4.10) What is the difference between the various character types?
d898 1
a898 1
    4.11.1) How do I create a serial/auto-incrementing field?
d919 1
a919 1
    4.11.2) How do I get the value of a SERIAL insert?
d923 1
a923 1
   explicitly. Using the example table in 4.11.1, an example in a
d945 1
a945 1
    4.11.3) Doesn't currval() lead to a race condition with other users?
d950 1
a950 1
    4.11.4) Why aren't my sequence numbers reused on transaction abort? Why are
d957 1
a957 1
    4.12) What is an OID? What is a TID?
d959 26
a984 10
   Every row that is created in PostgreSQL gets a unique OID unless
   created WITHOUT OIDS. OIDs are autotomatically assigned unique 4-byte
   integers that are unique across the entire installation. However, they
   overflow at 4 billion, and then the OIDs start being duplicated.
   PostgreSQL uses OIDs to link its internal system tables together.
   
   To uniquely number columns in user tables, it is best to use SERIAL
   rather than OIDs because SERIAL sequences are unique only within a
   single table. and are therefore less likely to overflow. SERIAL8 is
   available for storing eight-byte sequence values.
d990 1
a990 1
    4.13) What is the meaning of some of the terms used in PostgreSQL?
d1008 1
a1008 1
    4.14) Why do I get the error "ERROR: Memory exhausted in AllocSetAlloc()"?
d1023 1
a1023 1
    4.15) How do I tell what PostgreSQL version I am running?
d1027 1
a1027 1
    4.16) Why does my large-object operations get "invalid large obj
d1042 1
a1042 1
    4.17) How do I create a column that will default to the current time?
d1047 22
a1068 1
    4.18) How do I perform an outer join?
d1098 1
a1098 1
    4.19) How do I perform queries using multiple databases?
d1108 1
a1108 1
    4.20) How do I return multiple rows or columns from a function?
d1113 1
a1113 1
    4.21) Why can't I reliably create/drop temporary tables in PL/PgSQL
d1124 1
a1124 1
    4.22) What encryption options are available?
@


1.292.4.4
log
@Backpatch FAQ to 8.0.X.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 29 23:25:05 EST 2005
@


1.292.4.5
log
@Backpatch FAQ to 8.0.X.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 29 23:44:48 EST 2005
d484 16
a499 11
   of the postgres process used by psql using SELECT pg_backend_pid().
   Use a debugger to attach to the postgres PID. You can set breakpoints
   in the debugger and issue queries from psql. If you are debugging
   postgres startup, you can set PGOPTIONS="-W n", then start psql. This
   will cause startup to delay for n seconds so you can attach to the
   process with the debugger, set any breakpoints, and continue through
   the startup sequence.
   
   There are several log_* server configuration variables that enable
   printing of process statistics which can be very useful for debugging
   and performance measurements.
d728 5
a732 2
       can create a special text_pattern_ops index for such cases that
       work only for LIKE indexing.
d922 1
a922 1
    CREATE TABLE test (x int, modtime timestamp DEFAULT CURRENT_TIMESTAMP );
@


1.292.4.6
log
@Backpatch FAQ changes to 8.0.X.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 31 21:40:28 EST 2005
d18 1
a18 1
   1.2) What is the copyright of PostgreSQL?
d22 6
a27 6
   1.6) How do I submit a bug report?
   1.7) What is the latest release?
   1.8) What documentation is available?
   1.9) How do I find out about known bugs or missing features?
   1.10) How can I learn SQL?
   1.11) How do I join the development team?
d29 1
d55 1
a55 1
   4.3) How do you change a column's data type?
d72 2
a73 1
   4.13) Why do I get the error "ERROR: Memory exhausted in
d75 2
a76 2
   4.14) How do I tell what PostgreSQL version I am running?
   4.15) Why does my large-object operations get "invalid large obj
d78 5
a82 5
   4.16) How do I create a column that will default to the current time?
   4.17) How do I perform an outer join?
   4.18) How do I perform queries using multiple databases?
   4.19) How do I return multiple rows or columns from a function?
   4.20) Why can't I reliably create/drop temporary tables in PL/PgSQL
d84 1
a84 1
   4.21) What encryption options are available?
d101 1
a101 1
   PostgreSQL is pronounced Post-Gres-Q-L, also called just Postgres.
d103 12
a114 8
   PostgreSQL is an object-relational database system that has the
   features of traditional commercial database systems with enhancements
   to be found in next-generation DBMS systems. PostgreSQL is free and
   the complete source code is available.
   
   PostgreSQL development is performed by a team of mostly volunteer
   developers spread throughout the world and communicating via the
   Internet. It is a community project and is not controlled by any
d118 13
a130 1
    1.2) What is the copyright of PostgreSQL?
d132 1
a132 5
   PostgreSQL is distributed under the classic BSD license. It has no
   restrictions on how the source code can be used. We like it and have
   no intention of changing it.
   
   This is the BSD license we use:
d158 4
d186 30
a215 4
   The PostgreSQL community provides assistance to many of its users via
   email. The main web site to subscribe to the email lists is
   http://www.postgresql.org/community/lists/. The general or bugs lists
   are a good place to start.
d217 2
d220 1
a220 1
   To connect you can use the Unix program irc -c '#postgresql' "$USER"
d227 1
a227 1
   http://techdocs.postg resql.org/companies.php.
d229 1
a229 9
    1.6) How do I submit a bug report?
    
   Visit the PostgreSQL bug form at
   http://www.postgresql.org/support/submitbug.
   
   Also check out our ftp site ftp://ftp.PostgreSQL.org/pub to see if
   there is a more recent PostgreSQL version.
   
    1.7) What is the latest release?
d233 1
a233 1
   We plan to have major releases every ten to twelve months.
d235 1
a235 1
    1.8) What documentation is available?
d237 3
a239 3
   PostgreSQL includes extensive documentation, including a large manual,
   manual pages, and some test examples. See the /doc directory. You can
   also browse the manuals online at http://www.PostgreSQL.org/docs.
d255 1
a255 1
    1.9) How do I find out about known bugs or missing features?
d260 1
a260 1
    1.10) How can I learn SQL?
d276 1
a276 1
    1.11) How do I join the development team?
d279 1
a279 1
   FAQ and documentation on our web site, or in the distribution. Second,
d289 8
d343 23
d387 2
a388 2
   For Web integration, PHP (http://www.php.net) is an excellent
   interface.
d390 1
a390 1
   For complex cases, many use the Perl and CGI.pm or mod_perl.
d395 2
a396 2
   These include pgAdmin III (http://www.pgadmin.org, PgAccess
   http://www.pgaccess.org), RHDB Admin (http://sources.redhat.com/rhd b/
d417 2
a418 2
   postgresql.conf file, enable host-based authentication by modifying
   the $PGDATA/pg_hba.conf file, and restart the server.
d422 29
a450 1
   There are three major areas for potential performance improvement:
a451 28
   Query Changes
          This involves modifying queries to obtain better performance:
          
          + Creation of indexes, including expression and partial indexes
          + Use of COPY instead of multiple INSERTs
          + Grouping of multiple statements into a single transaction to
            reduce commit overhead
          + Use of CLUSTER when retrieving many rows from an index
          + Use of LIMIT for returning a subset of a query's output
          + Use of Prepared queries
          + Use of ANALYZE to maintain accurate optimizer statistics
          + Regular use of VACUUM or pg_autovacuum
          + Dropping of indexes during large data changes
            
   Server Configuration
          A number of postgresql.conf settings affect performance. For
          more details, see Administration Guide/Server Run-time
          Environment/Run-time Configuration for a full listing, and for
          commentary see
          http://www.varlena.com/varlena/GeneralBits/Tidbits/annotated_co
          nf_e.html and
          http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html.
          
   Hardware Selection
          The effect of hardware on performance is detailed in
          http://candle.pha.pa.us/main/writings/pgsql/hw_performance/inde
          x.html.
          
d454 18
a471 15
   There are many log_* server configuration variables that enable
   printing of query and process statistics which can be very useful for
   debugging and performance measurements.
   
   The following detailed debug instructions are to be used to provide
   more detailed information for server developers debugging a problem.
   
   It is also possible to debug the server if it isn't operating
   properly. First, by running configure with the --enable-cassert
   option, many assert()s monitor the progress of the backend and halt
   the program when something unexpected occurs.
   
   The postmaster has a -d option that allows even more detailed
   information to be reported. The -d option takes a number that
   specifies the debug level. Be warned that high debug level values
d492 4
d504 17
a520 4
   You have reached the default limit is 100 database sessions. You need
   to increase the postmaster's limit on how many concurrent backend
   processes it can start by changing the max_connections value in
   postgresql.conf and restarting the postmaster.
d537 2
a538 2
   so upgrading from 7.4 to 7.4.1 does not require a dump and restore.
   However, major releases (e.g. from 7.3 to 7.4) often change the
d540 1
a540 1
   often complex, so we don't maintain backward compatibility for data
d544 4
d563 7
a569 4
   To retrieve only a few rows, if you know at the number of rows needed
   at the time of the SELECT use LIMIT . If an index matches the ORDER BY
   it is possible the entire query does not have to be executed. If you
   don't know the number of rows at SELECT time, use a cursor and FETCH.
d590 1
a590 3
   too.
   
   Use psql -l will list all databases.
d596 1
a596 1
    4.3) How do you change a column's data type?
d598 11
d625 8
a632 10
   
   Maximum size for a database? unlimited (32 TB databases exist)
   Maximum size for a table? 32 TB
   Maximum size for a row? 1.6TB
   Maximum size for a field? 1 GB
   Maximum number of rows in a table? unlimited
   Maximum number of columns in a table? 250-1600 depending on column
   types
   Maximum number of indexes on a table? unlimited
   
d719 2
a720 2
       indexes. Instead, use expression indexes, which are described in
       section 4.8.
d722 3
a724 3
       possible to know the next-greatest character in a non-C locale.
       You can create a special text_pattern_ops index for such cases
       that work only for LIKE indexing.
d727 1
a727 1
   types exactly match the index's column types. This was particularly
d748 1
a748 1
   expresssion index, it will be used:
d757 8
a764 7
       Type    Internal Name                    Notes
    VARCHAR(n) varchar       size specifies maximum length, no padding
    CHAR(n)    bpchar        blank padded to the specified fixed length
    TEXT       text          no specific upper limit on length
    BYTEA      bytea         variable-length byte array (null-byte safe)
    "char"     char          one character
   
d800 3
a802 1
   sequences.
d824 6
d832 2
a833 2
   No. currval() returns the current value assigned by your session, not
   by all sessions.
d859 19
a877 1
    4.13) Why do I get the error "ERROR: Memory exhausted in AllocSetAlloc()"?
d892 1
a892 1
    4.14) How do I tell what PostgreSQL version I am running?
d896 1
a896 1
    4.15) Why does my large-object operations get "invalid large obj
d911 1
a911 1
    4.16) How do I create a column that will default to the current time?
d914 1
a914 1
    CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
d916 1
a916 1
    4.17) How do I perform an outer join?
d934 13
a946 1
    4.18) How do I perform queries using multiple databases?
d953 1
a953 1
   course, a client can also make simultaneous connections to different
d956 1
a956 1
    4.19) How do I return multiple rows or columns from a function?
d958 2
a959 2
   It is easy using set-returning functions,
   http://techdocs.postgresql.org/guides/SetReturningFunctions.
d961 1
a961 1
    4.20) Why can't I reliably create/drop temporary tables in PL/PgSQL
d964 1
a964 1
   PL/PgSQL caches function scripts, and an unfortunate side effect is
d972 1
a972 1
    4.21) What encryption options are available?
d983 2
a984 1
       the system tables.
@


1.292.4.7
log
@Backpatch FAQ to 8.0.X.
@
text
@d4 1
a4 1
   Last updated: Wed Feb 2 08:40:42 EST 2005
d44 2
a45 1
   3.6) Why do I need to do a dump and restore to upgrade PostgreSQL
d47 1
a47 1
   3.7) What computer hardware should I use?
d381 1
a381 1
          x.html and http://www.powerpostgresql.com/PerfList/.
d433 12
a444 1
    3.6) Why do I need to do a dump and restore to upgrade between major
d455 1
a455 1
    3.7) What computer hardware should I use?
d654 6
a659 6
        Type    Internal Name                    Notes
     VARCHAR(n) varchar       size specifies maximum length, no padding
     CHAR(n)    bpchar        blank padded to the specified fixed length
     TEXT       text          no specific upper limit on length
     BYTEA      bytea         variable-length byte array (null-byte safe)
     "char"     char          one character
@


1.292.4.8
log
@Backpatch FAQ to 8.0.X.
@
text
@d4 1
a4 1
   Last updated: Wed Feb 2 12:44:03 EST 2005
d64 4
a67 4
   4.11.1) How do I create a serial/auto-incrementing field?
   4.11.2) How do I get the value of a SERIAL insert?
   4.11.3) Doesn't currval() lead to a race condition with other users?
   4.11.4) Why aren't my sequence numbers reused on transaction abort?
@


1.292.4.9
log
@Backpatch FAQ to 8.0.X.
@
text
@d4 1
a4 1
   Last updated: Thu Feb 24 19:33:07 EST 2005
d62 1
a62 2
   4.9) In a query, how do I detect if a field is NULL? How can I sort on
   whether a field is NULL or not?
d79 2
a80 2
   4.20) Why do I get "missing oid" errors when accessing temporary
   tables in PL/PgSQL functions?
d122 1
a122 2
   Portions Copyright (c) 1994-1996 Regents of the University of
   California
d163 1
a163 2
   ftp://ftp.PostgreSQL.org/pub/. For mirror sites, see our main web
   site.
d180 1
a180 1
   http://techdocs.postgresql.org/companies.php.
d187 1
a187 1
   Also check out our ftp site ftp://ftp.PostgreSQL.org/pub/ to see if
d203 1
a203 1
   http://www.postgresql.org/docs/books/awbook.html and
d223 3
a225 4
   The PostgreSQL book at
   http://www.postgresql.org/docs/books/awbook.html teaches SQL. There is
   another PostgreSQL book at http://www.commandprompt.com/ppbook. There
   is a nice tutorial at
d320 1
a320 1
   For complex cases, many use the Perl DBD::Pg with CGI.pm or mod_perl.
d326 3
a328 3
   http://www.pgaccess.org), RHDB Admin (http://sources.redhat.com/rhdb/
   ), TORA ( http://www.globecom.net/tora/, partly commercial), and
   Rekall ( http://www.rekallrevealed.org/). There is also PhpPgAdmin (
d636 1
a636 2
    4.9) In a query, how do I detect if a field is NULL? How can I sort on
    whether a field is NULL or not?
d639 1
a639 12
   SELECT *
   FROM tab
   WHERE col IS NULL;

   To sort by the NULL status, use the IS NULL and IS NOT NULL modifiers
   in your WHERE clause. Things that are true will sort higher than
   things that are false, so the following will put NULL entries at the
   top of the resulting list:
   SELECT *
   FROM tab
   ORDER BY (col IS NOT NULL)

d807 2
a808 2
    4.20) Why do I get "missing oid" errors when accessing temporary tables in
    PL/PgSQL functions?
@


1.292.4.10
log
@Here's the patch to fix a lot of markup errors in the HTML FAQs. Doesn't
change content (at least not supposed to).

Magnus Hagander
@
text
@d4 1
a4 1
   Last updated: Fri Mar 11 16:42:06 EST 2005
d80 2
a81 2
   4.20) Why do I get "relation with OID ##### does not exist" errors
   when accessing temporary tables in PL/PgSQL functions?
d324 1
a324 2
   For complex cases, many use the Perl and DBD::Pg with CGI.pm or
   mod_perl.
d821 1
a821 2
   http://techdocs.postgresql.org/guides/SetReturningFunctions
   .
d823 2
a824 2
    4.20) Why do I get "relation with OID ##### does not exist" errors when
    accessing temporary tables in PL/PgSQL functions?
@


1.292.4.11
log
@Backpatch FAQ's to 8.0.X.
@
text
@d4 1
a4 1
   Last updated: Tue Mar 15 17:38:18 EST 2005
d195 1
a195 1
   The latest release of PostgreSQL is version 8.0.1.
@


1.292.4.12
log
@Backpatch FAQ's to 8.0.X for release.
@
text
@d4 1
a4 1
   Last updated: Mon May 9 13:15:04 EDT 2005
a28 1
   1.13) Who controls PostgreSQL?
d70 1
a70 1
   4.12) What is an OID? What is a CTID?
d74 7
a80 5
   4.15) How do I create a column that will default to the current time?
   4.16) How do I perform an outer join?
   4.17) How do I perform queries using multiple databases?
   4.18) How do I return multiple rows or columns from a function?
   4.19) Why do I get "relation with OID ##### does not exist" errors
d82 11
a92 1
   4.20) What replication solutions are available?
d97 2
a98 2
  1.1) What is PostgreSQL? How is it pronounced?
  
d112 2
a113 2
  1.2) What is the copyright of PostgreSQL?
  
d145 2
a146 2
  1.3) What platforms does PostgreSQL support?
  
d151 5
a155 5
   PostgreSQL also runs natively on Microsoft Windows NT-based operating
   systems like Win2000, WinXP, and Win2003. A prepackaged installer is
   available at http://pgfoundry.org/projects/pginstaller. MSDOS-based
   versions of Windows (Win95, Win98, WinMe) can run PostgreSQL using
   Cygwin.
d162 5
a166 4
  1.4) Where can I get PostgreSQL?
  
   Via web browser, use http://www.postgresql.org/ftp/, and via ftp, use
   ftp://ftp.PostgreSQL.org/pub/.
d168 2
a169 2
  1.5) Where can I get support?
  
d177 4
a180 3
   irc.freenode.net or use any other IRC clients. A Spanish one also
   exists on the same network, (#postgresql-es), and a French one,
   (#postgresqlfr). There is also a PostgreSQL channel on EFNet.
d185 2
a186 2
  1.6) How do I submit a bug report?
  
d193 3
a195 3
  1.7) What is the latest release?
  
   The latest release of PostgreSQL is version 8.0.2.
d197 1
a197 2
   We plan to have a major release every year, with minor releases every
   few months.
d199 2
a200 2
  1.8) What documentation is available?
  
d207 2
a208 3
   http://www.commandprompt.com/ppbook/. There are a number of PostgreSQL
   books available for purchase. One of the most popular ones is by Korry
   Douglas. A list of book reviews can be found at
d219 2
a220 2
  1.9) How do I find out about known bugs or missing features?
  
d224 6
a229 10
  1.10) How can I learn SQL?
  
   First, consider the PostgreSQL-specific books mentioned above. Another
   one is "Teach Yourself SQL in 21 Days, Second Edition" at
   http://members.tripod.com/er4ebus/sql/index.htm. Many of our users
   like The Practical SQL Handbook, Bowman, Judith S., et al.,
   Addison-Wesley. Others like The Complete Reference SQL, Groff et al.,
   McGraw-Hill.
   
   There is also a nice tutorial at
d234 2
a235 3
  1.11) How do I join the development team?
  
   See the Developer's FAQ.
d237 19
a255 2
  1.12) How does PostgreSQL compare to other DBMSs?
  
d270 7
a276 2
          others. Our performance is usually +/-10% compared to other
          databases.
a299 11
          
  1.13) Who controls PostgreSQL?
  
   If you are looking for a PostgreSQL gatekeeper, central committee, or
   controlling company, give up --- there isn't one. We do have a core
   committee and CVS committers, but these groups are more for
   administrative purposes than control. The project is directed by the
   community of developers and users, which anyone can join. All you need
   to do is subscribe to the mailing lists and participate in the
   discussions. (See the Developer's FAQ for information on how to get
   involved in PostgreSQL development.)
d304 2
a305 2
  2.1) What interfaces are available for PostgreSQL?
  
d316 2
a317 2
  2.2) What tools are available for using PostgreSQL with Web pages?
  
d327 11
a337 3
  2.3) Does PostgreSQL have a graphical user interface?
  
   Yes, see http://techdocs.postgresql.org/guides/GUITools for a detailed
d343 2
a344 2
  3.1) How do I install PostgreSQL somewhere other than /usr/local/pgsql?
  
d347 2
a348 2
  3.2) How do I control connections from other hosts?
  
d355 2
a356 2
  3.3) How do I tune the database engine for better performance?
  
d387 2
a388 2
  3.4) What debugging features are available?
  
d393 39
a431 2
  3.5) Why do I get "Sorry, too many clients" when trying to connect?
  
d437 3
a439 3
  3.6) Why do I need to do a dump and restore to upgrade between major
  PostgreSQL releases?
  
d441 1
a441 1
   so upgrading from 7.4.0 to 7.4.1 does not require a dump and restore.
d448 2
a449 2
  3.7) What computer hardware should I use?
  
d461 2
a462 2
  4.1) How do I SELECT only the first few rows of a query? A random row?
  
d474 3
a476 3
  4.2) How do I find out what tables, indexes, databases, and users are
  defined? How do I see the queries used by psql to display them?
  
d495 2
a496 2
  4.3) How do you change a column's data type?
  
d510 2
a511 2
  4.4) What is the maximum size for a row, a table, and a database?
  
d534 3
a536 3
  4.5) How much database disk space is required to store data from a typical
  text file?
  
d568 7
a574 7
  4.6) Why are my queries slow? Why don't they use my indexes?
  
   Indexes are not used by every query. Indexes are used only if the
   table is larger than a minimum size, and the query selects only a
   small percentage of the rows in the table. This is because the random
   disk access caused by an index scan can be slower than a straight read
   through the table, or sequential scan.
d597 2
a598 2
   scan, use SET enable_seqscan TO 'off' and run query again to see if an
   index scan is indeed faster.
d620 2
a621 2
  4.7) How do I see how the query optimizer is evaluating my query?
  
d624 4
a627 4
  4.8) How do I perform regular expression searches and case-insensitive
  regular expression searches? How do I use an index for case-insensitive
  searches?
  
d641 4
a644 4
  4.9) In a query, how do I detect if a field is NULL? How can I sort on
  whether a field is NULL or not?
  
   You test the column with IS NULL and IS NOT NULL, like this:
d650 1
a650 1
   in your ORDER BY clause. Things that are true will sort higher than
d657 2
a658 2
  4.10) What is the difference between the various character types?
  
d671 3
a673 3
   space used is slightly greater than the declared size. However, long
   values are also subject to compression, so the space on disk might
   also be less than expected.
d684 2
a685 2
  4.11.1) How do I create a serial/auto-incrementing field?
  
d703 2
a704 2
  4.11.2) How do I get the value of a SERIAL insert?
  
d715 2
a716 2
   <table>_< serialcolumn>_seq, where table and serialcolumn are the
   names of your table and your SERIAL column, respectively.
d723 2
a724 2
  4.11.3) Doesn't currval() lead to a race condition with other users?
  
d728 3
a730 3
  4.11.4) Why aren't my sequence numbers reused on transaction abort? Why are
  there gaps in the numbering of my sequence/SERIAL column?
  
d735 2
a736 2
  4.12) What is an OID? What is a CTID?
  
d748 3
a750 3
   CTIDs are used to identify specific physical rows with block and
   offset values. CTIDs change after rows are modified or reloaded. They
   are used by index entries to point to physical rows.
d752 2
a753 2
  4.13) Why do I get the error "ERROR: Memory exhausted in AllocSetAlloc()"?
  
d767 2
a768 2
  4.14) How do I tell what PostgreSQL version I am running?
  
d771 17
a787 2
  4.15) How do I create a column that will default to the current time?
  
d791 2
a792 2
  4.16) How do I perform an outer join?
  
d809 2
a810 2
  4.17) How do I perform queries using multiple databases?
  
d819 2
a820 2
  4.18) How do I return multiple rows or columns from a function?
  
d825 3
a827 3
  4.19) Why do I get "relation with OID ##### does not exist" errors when
  accessing temporary tables in PL/PgSQL functions?
  
d836 14
a849 15
  4.20) What replication solutions are available?
  
   Though "replication" is a single term, there are several technologies
   for doing replication, with advantages and disadvantages for each.
   
   Master/slave replication allows a single master to receive read/write
   queries, while slaves can only accept read/SELECT queries. The most
   popular freely available master-slave PostgreSQL replication solution
   is Slony-I.
   
   Multi-master replication allows read/write queries to be sent to
   multiple replicated computers. This capability also has a severe
   impact on performance due to the need to synchronize changes between
   servers. Pgcluster is the most popular such solution freely available
   for PostgreSQL.
d851 28
a878 2
   There are also commercial and hardware-based replication solutions
   available supporting a variety of replication models.
@


1.292.4.13
log
@Update Russian FAQ.

Viktor Vislobokov
@
text
@d4 1
a4 1
   Last updated: Mon May 30 09:11:03 EDT 2005
@


1.292.4.14
log
@Update FAQ's in 8.0.X branch.
@
text
@d4 1
a4 1
   Last updated: Fri Sep 16 14:07:22 EDT 2005
a81 1
   4.21) Why are my table and column names not recognized in my query?
d88 1
a88 3
   PostgreSQL is pronounced Post-Gres-Q-L, and is also sometimes referred
   to as just Postgres. An audio file is available in MP3 format for
   those would like to hear the pronunciation.
d182 1
a182 1
   The latest release of PostgreSQL is version 8.0.3.
a471 6
   One limitation is that indexes can not be created on columns longer
   than about 2,000 characters. Fortunately, such indexes are rarely
   needed. Uniqueness is best guaranteed by a funtion index of an MD5
   hash of the long column, and full text indexing allows for searching
   of words within the column.
   
d483 1
a483 1
    28 bytes: each row header (approximate)
d487 1
a487 1
    56 bytes per row
d492 2
a493 2
   -------------------   =  146 rows per database page (rounded down)
     56 bytes per row
d496 2
a497 2
   --------------------  =  685 database pages (rounded up)
      146 rows per page
d499 1
a499 1
685 database pages * 8192 bytes per page  =  5,611,520 bytes (5.6 MB)
a578 5
   If the above index is created as UNIQUE, though the column can store
   upper and lowercase characters, it can not have identical values that
   differ only in case. To force a particular case to be stored in the
   column, use a CHECK constraint or a trigger.
   
a776 13
   
  4.21) Why are my table and column names not recognized in my query?
  
   The most common cause is the use of double-quotes around table or
   column names during table creation. When double-quotes are used, table
   and column names (called identifiers) are stored case-sensitive,
   meaning you must use double-quotes when referencing the names in a
   query. Some interfaces, like pgAdmin, automatically double-quote
   identifiers during table creation. So, for identifiers to be
   recognized, you must either:
     * Avoid double-quoting identifiers when creating tables
     * Use only lowercase characters in identifiers
     * Double-quote identifiers when referencing them in queries
@


1.292.4.15
log
@Update FAQ's in 8.0.X branch.  (very small changes)
@
text
@d4 1
a4 1
   Last updated: Wed Sep 28 07:45:42 EDT 2005
d213 1
a213 1
   PostgreSQL supports an extended subset of SQL:2003. See our TODO list
@


1.292.4.16
log
@Update version number in faq.
@
text
@d4 1
a4 1
   Last updated: Wed Oct 5 07:24:44 EDT 2005
d185 1
a185 1
   The latest release of PostgreSQL is version 8.0.4.
@


1.292.4.17
log
@Backpatch FAQ's for 8.0.X.
@
text
@d4 1
a4 1
   Last updated: Fri Nov 4 20:35:04 EST 2005
d185 1
a185 1
   The latest release of PostgreSQL is version 8.1.
@


1.292.4.18
log
@Stamp relesae 8.0.6.
@
text
@d185 1
a185 1
   The latest release of PostgreSQL is version 8.1.2.
@


1.292.4.19
log
@Update FAQ latest version
@
text
@d185 1
a185 1
   The latest release of PostgreSQL is version 8.1.3.
@


1.292.4.20
log
@Stamp releases 7.3.15, 7.4.13, and 8.0.8.
@
text
@d185 1
a185 1
   The latest release of PostgreSQL is version 8.1.4.
@


1.292.4.21
log
@Stamp releases 7.3.16, 7.4.14, 8.0.9, and 8.1.5.
@
text
@d185 1
a185 1
   The latest release of PostgreSQL is version 8.1.5.
@


1.292.4.22
log
@Stamp release 8.0.10.
@
text
@d185 1
a185 1
   The latest release of PostgreSQL is version 8.2.1.
@


1.292.4.23
log
@Update FAQ to mention most recent release for releases
8.2.4, 8.1.9, 8.0.13, 7.4.17, 7.3.19.
@
text
@d185 1
a185 1
   The latest release of PostgreSQL is version 8.2.4.
@


1.292.4.24
log
@Stamp releases 8.2.5, 8.1.10, 8.0.14, 7.4.18, 7.3.20.

Update FAQs for 8.2.5.
@
text
@d185 1
a185 1
   The latest release of PostgreSQL is version 8.2.5.
@


1.291
log
@Mention ALTER COLUMN TYPE in FAQ.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 16 22:01:06 EST 2005
d802 1
a802 1
     * Case-insensitive searches such as ILIKE and ~* do not utilise
@


1.290
log
@Update to 8.0.0 for packaging.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 16 21:40:18 EST 2005
d693 4
a696 1
   To change the data type of a column, do this:
@


1.289
log
@Remove </a>

Alvaro
@
text
@d4 1
a4 1
   Last updated: Sat Jan 15 17:50:53 EST 2005
d247 1
a247 1
   The latest release of PostgreSQL is version 7.4.6.
@


1.288
log
@Update TORA item.

Euler Taveira de Oliveira
@
text
@d4 1
a4 1
   Last updated: Sat Jan 15 17:43:35 EST 2005
d421 4
a424 5
   ), TORA (http://www.globecom.net/tora/, partly commercial)
   , and Rekall ( http://www.thekompany.com/products/rekall/,
   proprietary). There is also PhpPgAdmin (
   http://phppgadmin.sourceforge.net/ ), a web-based interface to
   PostgreSQL.
@


1.287
log
@Merge query of system objects FAQ items.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 15 00:18:38 EST 2005
d421 5
a425 4
   ), TORA (http://www.globecom.net/tora/ (partly commercial), and Rekall
   ( http://www.thekompany.com/products/rekall/, proprietary). There is
   also PhpPgAdmin ( http://phppgadmin.sourceforge.net/ ), a web-based
   interface to PostgreSQL.
@


1.286
log
@Update OS/2 URL.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 9 14:44:04 EST 2005
d63 2
a64 1
   4.3) How do I get a list of tables or other things I can see in psql?
d70 5
a74 7
   4.7) How do I find out what tables, indexes, databases, and users are
   defined?
   4.8) My queries are slow or don't make use of the indexes. Why?
   4.9) How do I see how the query optimizer is evaluating my query?
   4.10) What is an R-tree index?
   4.11) What is the Genetic Query Optimizer?
   4.12) How do I perform regular expression searches and
d77 6
a82 6
   4.13) In a query, how do I detect if a field is NULL?
   4.14) What is the difference between the various character types?
   4.15.1) How do I create a serial/auto-incrementing field?
   4.15.2) How do I get the value of a SERIAL insert?
   4.15.3) Doesn't currval() lead to a race condition with other users?
   4.15.4) Why aren't my sequence numbers reused on transaction abort?
d84 3
a86 3
   4.16) What is an OID? What is a TID?
   4.17) What is the meaning of some of the terms used in PostgreSQL?
   4.18) Why do I get the error "ERROR: Memory exhausted in
d88 2
a89 2
   4.19) How do I tell what PostgreSQL version I am running?
   4.20) Why does my large-object operations get "invalid large obj
d91 6
a96 6
   4.21) How do I create a column that will default to the current time?
   4.22) Why are my subqueries using IN so slow?
   4.23) How do I perform an outer join?
   4.24) How do I perform queries using multiple databases?
   4.25) How do I return multiple rows or columns from a function?
   4.26) Why can't I reliably create/drop temporary tables in PL/PgSQL
d98 1
a98 1
   4.27) What encryption options are available?
d661 2
a662 1
    4.3) How do I get a list of tables or other things I can see in psql?
d670 1
a670 1
   also provides an SQLi compliant INFORMATION SCHEMA interface you can
d673 7
d759 1
a759 12
    4.7) How do I find out what tables, indexes, databases, and users are
    defined?
    
   psql has a variety of backslash commands to show such information. Use
   \? to see them. There are also system tables beginning with pg_ that
   describe these too. Also, psql -l will list all databases.
   
   Also try the file pgsql/src/tutorial/syscat.source. It illustrates
   many of the SELECTs needed to get information from the database system
   tables.
   
    4.8) My queries are slow or don't make use of the indexes. Why?
d801 1
a801 1
       section 4.12.
d814 1
a814 1
    4.9) How do I see how the query optimizer is evaluating my query?
d818 1
a818 1
    4.10) What is an R-tree index?
d841 1
a841 1
    4.11) What is the Genetic Query Optimizer?
d847 1
a847 1
    4.12) How do I perform regular expression searches and case-insensitive
d864 1
a864 1
    4.13) In a query, how do I detect if a field is NULL?
d868 1
a868 1
    4.14) What is the difference between the various character types?
d896 1
a896 1
    4.15.1) How do I create a serial/auto-incrementing field?
d917 1
a917 1
    4.15.2) How do I get the value of a SERIAL insert?
d921 1
a921 1
   explicitly. Using the example table in 4.15.1, an example in a
d943 1
a943 1
    4.15.3) Doesn't currval() lead to a race condition with other users?
d948 1
a948 1
    4.15.4) Why aren't my sequence numbers reused on transaction abort? Why are
d955 1
a955 1
    4.16) What is an OID? What is a TID?
d988 1
a988 1
    4.17) What is the meaning of some of the terms used in PostgreSQL?
d1006 1
a1006 1
    4.18) Why do I get the error "ERROR: Memory exhausted in AllocSetAlloc()"?
d1021 1
a1021 1
    4.19) How do I tell what PostgreSQL version I am running?
d1025 1
a1025 1
    4.20) Why does my large-object operations get "invalid large obj
d1040 1
a1040 1
    4.21) How do I create a column that will default to the current time?
d1045 1
a1045 1
    4.22) Why are my subqueries using IN so slow?
d1066 1
a1066 1
    4.23) How do I perform an outer join?
d1096 1
a1096 1
    4.24) How do I perform queries using multiple databases?
d1106 1
a1106 1
    4.25) How do I return multiple rows or columns from a function?
d1111 1
a1111 1
    4.26) Why can't I reliably create/drop temporary tables in PL/PgSQL
d1122 1
a1122 1
    4.27) What encryption options are available?
@


1.285
log
@Remove mp3 that is now missing.
@
text
@d4 1
a4 1
   Last updated: Fri Jan 7 22:58:29 EST 2005
d193 2
a194 2
   http://www.os2world.com/cgi-bin/news/viewnews.cgi?category=32&id=11035
   94114.
@


1.284
log
@Remove duplicate novell mention.
@
text
@d4 1
a4 1
   Last updated: Tue Jan 4 09:25:00 EST 2005
d116 1
a116 3
   PostgreSQL is pronounced Post-Gres-Q-L. An audio file is available at
   http://www.postgresql.org/postgresql.mp3 for those would like to hear
   the pronunciation.
@


1.283
log
@HTML cleanup.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 3 22:44:26 EST 2005
a197 2
   There is also a Novell Netware 6 port at http://forge.novell.com.
   
@


1.282
log
@Add OS/2 port mention.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 3 22:43:02 EST 2005
@


1.281
log
@Updates from Ian Barwick.
Update FAQ with new URL's for site.
@
text
@d4 1
a4 1
   Last updated: Fri Dec 24 12:18:49 EST 2004
d153 1
a153 1
   Portions copyright (c) 1996-2004, PostgreSQL Global Development Group
d193 5
@


1.280
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Fri Dec 24 12:13:41 EST 2004
@


1.279
log
@Update FAQ with new URL's for site.
@
text
@d4 1
a4 1
   Last updated: Fri Dec 24 11:02:21 EST 2004
@


1.278
log
@Update from Ian Barwick
@
text
@d4 1
a4 1
   Last updated: Fri Dec 17 23:12:56 EST 2004
d9 1
a9 1
   http://www.PostgreSQL.org/docs/faqs/FAQ.html.
d12 1
a12 1
   http://www.PostgreSQL.org/docs/index.html.
d133 1
a133 1
   http://www.PostgreSQL.org/docs/faqs/FAQ_DEV.html
d312 1
a312 1
   http://www.postgresql.org/bugform.html.
d384 2
a385 2
   Also, if you have a success story about PostgreSQL, please submit it
   to our advocacy site at http://advocacy.postgresql.org.
@


1.277
log
@Add French IRC channel.
@
text
@d4 1
a4 1
   Last updated: Wed Dec 15 20:06:34 EST 2004
d265 3
a267 2
   psql has some nice \d commands to show information about types,
   operators, functions, aggregates, etc.
d331 2
a332 2
          PostgreSQL has performance similar to other commercial and open
          source databases. it is faster for some things, slower for
d339 1
a339 6
          improve performance in every release. There is an interesting
          Web page comparing PostgreSQL to MySQL at
          http://openacs.org/philosophy/why-not-mysql.html Also, MySQL is
          is a company that distributes its products via open source, and
          requires a commercial license for close-source software, not an
          open source development community like PostgreSQL.
a382 1
     _________________________________________________________________
d386 1
d419 1
a419 1
   These include PgAccess http://www.pgaccess.org), PgAdmin III
d520 3
a522 3
   You can also use the sort_mem and work_mem options to increase the
   maximum amount of memory used by the backend processes for each
   temporary sort. The default is 1024 (i.e. 1MB).
d943 2
a944 3
   billion. In Perl, using DBI with Edmund Mergl's DBD::Pg module, the
   oid value is made available via $sth->{pg_oid_status} after
   $sth->execute().
@


1.276
log
@Add Spanish IRC channel to FAQ.
@
text
@d4 1
a4 1
   Last updated: Wed Dec 15 18:59:58 EST 2004
d238 3
a240 2
   Spanish one also exists on the same network (#postgresql-es). There is
   also a PostgreSQL channel on EFNet.
@


1.275
log
@Update IRC mention.
@
text
@d4 1
a4 1
   Last updated: Tue Dec 14 22:10:36 EST 2004
d237 2
a238 1
   irc.freenode.net or use any of the other popular IRC clients. There is
@


1.274
log
@Reorder IRC examples.
@
text
@d4 1
a4 1
   Last updated: Fri Dec 10 13:01:55 EST 2004
d235 4
a238 4
   There is also an IRC channel on Freenode and EFNet, channel
   #PostgreSQL. You can use the Unix command or irc -c '#PostgreSQL'
   "$USER" irc.freenode.net.
   or irc -c '#PostgreSQL' "$USER" irc.phoenix.net.
@


1.273
log
@Mega-clarifications from Joachim Wieland.
@
text
@d4 1
a4 1
   Last updated: Sat Nov 27 23:55:37 EST 2004
d236 3
a238 2
   #PostgreSQL. You can use the Unix command irc -c '#PostgreSQL' "$USER"
   irc.phoenix.net. or irc -c '#PostgreSQL' "$USER" irc.freenode.net.
@


1.272
log
@Add mention of Cygwin. Update version number.
@
text
@d4 1
a4 1
   Last updated: Sat Nov 27 00:14:59 EST 2004
d82 1
a82 2
   4.15.3) Don't currval() and nextval() lead to a race condition with
   other users?
d307 2
a308 3
   Please visit the PostgreSQL BugTool page at
   http://www.PostgreSQL.org/bugs/bugs.php, which gives guidelines and
   directions on how to submit a bug report.
d421 5
a425 4
   (http://www.pgadmin.org, RHDB Admin (http://sources.redhat.com/rhdb/ )
   and Rekall ( http://www.thekompany.com/products/rekall/, proprietary).
   There is also PhpPgAdmin ( http://phppgadmin.sourceforge.net/ ), a
   web-based interface to PostgreSQL.
d466 2
a467 1
   a minimum of ~1 MB. See the PostgreSQL Administrator's Guide for more
d510 4
a513 3
   There are several tuning options. You can disable fsync() by starting
   postmaster with a -o -F option. This will prevent fsync()s from
   flushing to disk after every transaction.
d515 2
a516 2
   You can also use the postmaster -B option to increase the number of
   shared memory buffers used by the backend processes. If you make this
d519 1
a519 1
   and the default is 64 buffers.
d521 3
a523 3
   You can also use the backend -S option to increase the maximum amount
   of memory used by the backend process for temporary sorts. The -S
   value is measured in kilobytes, and the default is 512 (i.e. 512K).
d560 16
a575 9
   of the postgres process used by psql. Use a debugger to attach to the
   postgres PID. You can set breakpoints in the debugger and issue
   queries from psql. If you are debugging postgres startup, you can set
   PGOPTIONS="-W n", then start psql. This will cause startup to delay
   for n seconds so you can attach to the process with the debugger, set
   any breakpoints, and continue through the startup sequence.
   
   The postgres program has -s, -A, and -t options that can be very
   useful for debugging and performance measurements.
d806 7
a812 1
     * The default C locale must be used during initdb.
d948 1
a948 2
    4.15.3) Don't currval() and nextval() lead to a race condition with other
    users?
@


1.271
log
@Fix typo.
@
text
@d4 1
a4 1
   Last updated: Sat Nov 20 17:28:23 EST 2004
d191 2
a192 1
   http://pgfoundry.org/projects/pginstaller.
d245 1
a245 1
   The latest release of PostgreSQL is version 7.4.5.
@


1.270
log
@Remove replicaiton FAQ item.
@
text
@d4 1
a4 1
   Last updated: Sun Nov 14 16:32:47 EST 2004
@


1.269
log
@Add index mention:

    <P>In pre-8.0 releases, indexes often can not be used unless the data
    types exactly match the index's column types.  This is particularly
    true of int2, int8, and numeric column indexes.</P>
@
text
@d4 1
a4 1
   Last updated: Tue Aug 31 23:28:02 EDT 2004
d100 1
a100 2
   4.27) What replication options are available?
   4.28) What encryption options are available?
d1113 1
a1113 10
    4.27) What replication options are available?
    
   There are several master/slave replication options available. These
   allow only the master to make database changes and the slave can only
   do database reads. The bottom of
   http://gborg.PostgreSQL.org/genpage?replication_research lists them. A
   multi-master replication solution is being worked on at
   http://gborg.PostgreSQL.org/project/pgreplication/projdisplay.php.
   
    4.28) What encryption options are available?
@


1.268
log
@Update tcp connection faq.
@
text
@d4 1
a4 1
   Last updated: Wed Aug 25 23:18:13 EDT 2004
d800 4
@


1.267
log
@Update that 8.0 will support MS Win natively.
@
text
@d4 1
a4 1
   Last updated: Mon Aug 23 17:51:33 EDT 2004
d491 4
a494 4
   using Unix domain sockets. Other machines will not be able to connect
   unless you turn on tcpip_sockets in the postgresql.conf and enable
   host-based authentication by modifying the file $PGDATA/pg_hba.conf
   accordingly. This will allow TCP/IP connections.
@


1.266
log
@Update newest version number.
@
text
@d4 1
a4 1
   Last updated: Mon Aug 23 12:16:36 EDT 2004
d189 4
a192 21
   Client
   
   It is possible to compile the libpq C library, psql, and other
   interfaces and client applications to run on MS Windows platforms. In
   this case, the client is running on MS Windows, and communicates via
   TCP/IP to a server running on one of our supported Unix platforms. A
   file win32.mak is included in the distribution for making a Win32
   libpq library and psql. PostgreSQL also communicates with ODBC
   clients.
   
   Server
   
   The database server can run on Windows NT and Win2k using Cygwin, the
   Cygnus Unix/NT porting library. See pgsql/doc/FAQ_MSWIN in the
   distribution or the MS Windows FAQ at
   http://www.PostgreSQL.org/docs/faqs/text/FAQ_MSWIN.
   
   A native port to MS Win NT/2000/XP is currently being worked on. For
   more details on the current status of PostgreSQL on Windows see
   http://techdocs.postgresql.org/guides/Windows and
   http://momjian.postgresql.org/main/writings/pgsql/win32.html.
@


1.265
log
@Fix number for FAQ item.
@
text
@d4 1
a4 1
   Last updated: Fri Jul 30 12:51:38 EDT 2004
d262 1
a262 1
   The latest release of PostgreSQL is version 7.4.3.
@


1.264
log
@Update tuple header size.
@
text
@d4 1
a4 1
   Last updated: Mon Jul 26 23:27:08 EDT 2004
d57 1
a57 1
   3.10) What computer hardware should I use?
@


1.263
log
@*** empty log message ***
@
text
@d4 1
a4 1
   Last updated: Mon Jul 19 16:28:37 EDT 2004
d738 1
a738 1
    36 bytes: each row header (approximate)
d742 1
a742 1
    64 bytes per row
d747 2
a748 2
   -------------------   =  128 rows per database page (rounded down)
     64 bytes per row
d751 1
a751 1
   --------------------  =  782 database pages (rounded up)
d754 1
a754 1
782 database pages * 8192 bytes per page  =  6,406,144 bytes (6.4 MB)
@


1.262
log
@New text.
@
text
@d4 1
a4 1
   Last updated: Sun Jul 11 23:58:24 EDT 2004
@


1.261
log
@Wording improvement.
@
text
@d4 1
a4 1
   Last updated: Sun Jul 11 21:36:51 EDT 2004
d644 3
a646 4
   hardware, but if you are building a server where you are concerned
   about reliability and performance it is wise to research your hardware
   options thoroughly. Our email lists can be used to discuss hardware
   options and tradeoffs.
@


1.260
log
@Move comma.
@
text
@d4 1
a4 1
   Last updated: Sun Jul 11 21:10:08 EDT 2004
d644 4
a647 4
   hardware but, if you are building a server where reliability and
   performance are concerns, it is wise to research your hardware options
   thoroughly. Our email lists can be used to discuss hardware options
   and tradeoffs.
@


1.259
log
@Add FAQ entry on hardware selection.
@
text
@d4 1
a4 1
   Last updated: Sun Jul 11 20:18:47 EDT 2004
d644 1
a644 1
   hardware, but if you are building a server where reliability and
@


1.258
log
@This is a small fix in FAQ. It just clean up some old comments and
change an old -not-working piece of code.
@
text
@d4 1
a4 1
   Last updated: Fri Jun 4 00:09:16 EDT 2004
d57 1
d262 1
a262 1
   The latest release of PostgreSQL is version 7.4.2.
d637 11
@


1.257
log
@Update FAQ from Robert Treat
@
text
@d4 1
a4 1
   Last updated: Mon Mar 29 00:07:11 EST 2004
d968 5
a972 5
        CREATE TABLE new_table(old_oid oid, mycol int);
        SELECT old_oid, mycol INTO new FROM old;
        COPY new TO '/tmp/pgtable';
        DELETE FROM new;
        COPY new WITH OIDS FROM '/tmp/pgtable';
@


1.256
log
@Update FAQ with current release version.
@
text
@d4 1
a4 1
   Last updated: Fri Mar 12 08:51:11 EST 2004
d117 3
a119 2
   PostgreSQL is pronounced Post-Gres-Q-L. The name "Postgres" is also
   used in conversation.
d122 5
a126 4
   system, a next-generation DBMS research prototype. While PostgreSQL
   retains the powerful data model and rich data types of POSTGRES, it
   replaces the PostQuel query language with an extended subset of SQL.
   PostgreSQL is free and the complete source is available.
d133 2
a134 2
   company. To get involved, see the developer's
   FAQ,http://www.PostgreSQL.org/docs/faqs/FAQ_DEV.html
d154 1
a154 1
   Portions copyright (c) 1996-2002, PostgreSQL Global Development Group
d182 1
a182 1
   In general, a modern Unix-compatible platform should be able to run
d441 1
a441 1
   There is also PHPPgAdmin ( http://phppgadmin.sourceforge.net/ ), a
d508 3
a510 3
   unless you add the -i flag to postmaster, and enable host-based
   authentication by modifying the file $PGDATA/pg_hba.conf accordingly.
   This will allow TCP/IP connections.
d514 2
a515 2
   Certainly, indexes can speed up queries. The EXPLAIN command allows
   you to see how PostgreSQL is interpreting your query, and which
d662 8
a669 5
   You can read the source code for psql in file
   pgsql/src/bin/psql/describe.c. It contains SQL commands that generate
   the output for psql's backslash commands. You can also start psql with
   the -E option so it will print out the queries it uses to execute the
   commands you give.
@


1.255
log
@Add mention of the developer's FAQ.
@
text
@d4 1
a4 1
   Last updated: Sat Feb 7 22:16:21 EST 2004
d259 1
a259 1
   The latest release of PostgreSQL is version 7.4.1.
@


1.254
log
@Add mention of PostgreSQL as a community project.
@
text
@d4 1
a4 1
   Last updated: Sat Feb 7 22:09:05 EST 2004
d131 2
a132 1
   company.
@


1.253
log
@Update datestamp.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 26 00:33:17 EST 2004
d117 2
a118 1
   PostgreSQL is pronounced Post-Gres-Q-L.
d130 2
a131 1
   of PostgreSQL.
@


1.252
log
@*** empty log message ***
@
text
@d4 1
a4 1
   Last updated: Sat Jan 24 23:56:24 EST 2004
@


1.251
log
@Update null storage description.
@
text
@d4 1
a4 1
   Last updated: Sat Jan 24 21:28:41 EST 2004
@


1.250
log
@Add MySQL mention of licensing difference.
@
text
@d4 1
a4 1
   Last updated: Fri Jan 23 09:41:43 EST 2004
d740 1
a740 1
   NULLs are stored in bitmaps, so they use very little space.
@


1.249
log
@Favor Freenode rather than EFnet in IRC listing.  Freenode is more popular.
@
text
@d4 1
a4 1
   Last updated: Tue Jan 6 16:42:01 EST 2004
d351 3
a353 2
          is a company that distributes its products via open source, not
          an open source development community like PostgreSQL.
@


1.248
log
@Update for 7.4.1 as newest version.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 4 19:54:19 EST 2004
d247 1
a247 1
   There is also an IRC channel on EFNet and Freenode, channel
@


1.247
log
@*** empty log message ***
@
text
@d4 1
a4 1
   Last updated: Sat Nov 29 23:54:03 EST 2003
d256 1
a256 1
   The latest release of PostgreSQL is version 7.4.
@


1.246
log
@Remove win32-only mention for pgadmin.
@
text
@d4 1
a4 1
   Last updated: Sat Nov 29 23:35:39 EST 2003
@


1.245
log
@*** empty log message ***
@
text
@d4 1
a4 1
   Last updated: Sat Nov 29 23:34:05 EST 2003
d433 4
a436 5
   (http://www.pgadmin.org, Win32-only), RHDB Admin
   (http://sources.redhat.com/rhdb/ ) and Rekall (
   http://www.thekompany.com/products/rekall/, proprietary). There is
   also PHPPgAdmin ( http://phppgadmin.sourceforge.net/ ), a web-based
   interface to PostgreSQL.
@


1.244
log
@Update most recent version to 7.4.
@
text
@d4 1
a4 1
   Last updated: Fri Nov 28 15:09:21 EST 2003
@


1.243
log
@SERIAL no longer creates an index by default, as of 7.3.
@
text
@d4 1
a4 1
   Last updated: Wed Nov 19 11:50:04 EST 2003
d256 1
a256 1
   The latest release of PostgreSQL is version 7.3.4.
@


1.242
log
@pgadmin III released.
@
text
@d4 1
a4 1
   Last updated: Sat Nov 15 23:41:03 EST 2003
d882 2
a883 2
   PostgreSQL supports a SERIAL data type. It auto-creates a sequence and
   index on the column. For example, this:
a894 1
    CREATE UNIQUE INDEX person_id_key ON person ( id );
@


1.241
log
@Update freenode mention.
@
text
@d4 1
a4 1
   Last updated: Mon Nov 10 17:47:25 EST 2003
d432 1
a432 1
   These include PgAccess http://www.pgaccess.org), PgAdmin II
@


1.240
log
@Update IRC to mention freenet instead of openprojects.
@
text
@d4 1
a4 1
   Last updated: Mon Nov 10 16:55:52 EST 2003
d247 3
a249 3
   There is also an IRC channel on EFNet and Freenet, channel
   #PostgreSQL. I use the Unix command irc -c '#PostgreSQL' "$USER"
   irc.phoenix.net.
@


1.239
log
@Typo fix.
@
text
@d4 1
a4 1
   Last updated: Fri Nov 7 12:01:57 EST 2003
d247 1
a247 1
   There is also an IRC channel on EFNet and OpenProjects, channel
@


1.238
log
@Update for 7.4 --- prefer IN to EXISTS.
@
text
@d4 1
a4 1
   Last updated: Wed Oct 29 15:19:43 EST 2003
d352 1
a352 1
          an open source development community ilke PostgreSQL.
@


1.238.2.1
log
@Update FAQ and TODO for 7.4.
@
text
@d4 1
a4 1
   Last updated: Mon Nov 10 17:47:25 EST 2003
d247 3
a249 3
   There is also an IRC channel on EFNet and Freenode, channel
   #PostgreSQL. You can use the Unix command irc -c '#PostgreSQL' "$USER"
   irc.phoenix.net. or irc -c '#PostgreSQL' "$USER" irc.freenode.net.
d352 1
a352 1
          an open source development community like PostgreSQL.
@


1.238.2.2
log
@Update FAQ for 7.4 branch.
@
text
@d4 1
a4 1
   Last updated: Sat Nov 15 23:41:03 EST 2003
d432 1
a432 1
   These include PgAccess http://www.pgaccess.org), PgAdmin III
@


1.238.2.3
log
@Stamp 7.4.1.

Update 7.4.1 FAQ's to current.
@
text
@d4 1
a4 1
   Last updated: Sat Nov 29 23:54:03 EST 2003
d256 1
a256 1
   The latest release of PostgreSQL is version 7.4.
d433 5
a437 4
   (http://www.pgadmin.org, RHDB Admin (http://sources.redhat.com/rhdb/ )
   and Rekall ( http://www.thekompany.com/products/rekall/, proprietary).
   There is also PHPPgAdmin ( http://phppgadmin.sourceforge.net/ ), a
   web-based interface to PostgreSQL.
d882 2
a883 2
   PostgreSQL supports a SERIAL data type. It auto-creates a sequence.
   For example, this:
d895 1
@


1.238.2.4
log
@Stamp release 7.4.11.
@
text
@d256 1
a256 1
   The latest release of PostgreSQL is version 8.1.2.
@


1.238.2.5
log
@Update FAQ latest version
@
text
@d256 1
a256 1
   The latest release of PostgreSQL is version 8.1.3.
@


1.238.2.6
log
@Stamp releases 7.3.15, 7.4.13, and 8.0.8.
@
text
@d256 1
a256 1
   The latest release of PostgreSQL is version 8.1.4.
@


1.238.2.7
log
@Stamp releases 7.3.16, 7.4.14, 8.0.9, and 8.1.5.
@
text
@d256 1
a256 1
   The latest release of PostgreSQL is version 8.1.5.
@


1.238.2.8
log
@Stamp release 7.4.15.
@
text
@d256 1
a256 1
   The latest release of PostgreSQL is version 8.2.1.
@


1.238.2.9
log
@Update FAQ to mention most recent release for releases
8.2.4, 8.1.9, 8.0.13, 7.4.17, 7.3.19.
@
text
@d256 1
a256 1
   The latest release of PostgreSQL is version 8.2.4.
@


1.238.2.10
log
@Stamp releases 8.2.5, 8.1.10, 8.0.14, 7.4.18, 7.3.20.

Update FAQs for 8.2.5.
@
text
@d256 1
a256 1
   The latest release of PostgreSQL is version 8.2.5.
@


1.237
log
@Update max existing db size to 32tb.
@
text
@d4 1
a4 1
   Last updated: Fri Oct 10 17:27:02 EDT 2003
d1034 5
a1038 5
   Currently, we join subqueries to outer queries by sequentially
   scanning the result of the subquery for each row of the outer query.
   If the subquery returns only a few rows and the outer query returns
   many rows, IN is fastest. To speed up other queries, replace IN with
   EXISTS:
d1048 4
a1051 2
   For this to be fast, subcol should be an indexed column. This
   preformance problem will be fixed in 7.4.
@


1.236
log
@Update MySQL mention.
@
text
@a1 2
   ]
   
d4 1
a4 1
   Last updated: Sun Oct 5 10:25:21 EDT 2003
d689 1
a689 1
    Maximum size for a database?             unlimited (4 TB databases exist)
@


1.235
log
@Update MySQL mention.
@
text
@d6 1
a6 1
   Last updated: Sat Oct 4 23:52:01 EDT 2003
d352 3
a354 1
          http://openacs.org/philosophy/why-not-mysql.html
@


1.234
log
@Update MySQL mention.
@
text
@d6 1
a6 1
   Last updated: Fri Oct 3 22:36:54 EDT 2003
d347 3
a349 3
          queries done by a few users. Of course, MySQL does not have any
          of the features mentioned in the Features section above. We are
          built for reliability and features, though we continue to
@


1.233
log
@Update MySQL mention.
@
text
@d2 2
d6 1
a6 1
   Last updated: Fri Oct 3 21:39:47 EDT 2003
d346 6
a351 6
          read/write query load. MySQL is faster for SELECT queries done
          by a few users. Of course, MySQL does not have any of the
          features mentioned in the Features section above. We are built
          for reliability and features, though we continue to improve
          performance in every release. There is an interesting Web page
          comparing PostgreSQL to MySQL at
@


1.232
log
@Improve wording of increasing page size.
@
text
@d4 1
a4 1
   Last updated: Tue Sep 9 18:42:51 EDT 2003
d343 8
a350 6
          are slower on inserts/updates because of transaction overhead.
          Of course, MySQL does not have any of the features mentioned in
          the Features section above. We are built for reliability and
          features, though we continue to improve performance in every
          release. There is an interesting Web page comparing PostgreSQL
          to MySQL at http://openacs.org/philosophy/why-not-mysql.html
@


1.231
log
@Update max tasble size to 32TB.
@
text
@d4 1
a4 1
   Last updated: Tue Sep 9 14:25:24 EDT 2003
d701 2
a702 2
   The maximum table size and maximum number of columns can be increased
   if the default block size is increased to 32k.
@


1.230
log
@Update URL.
@
text
@d4 1
a4 1
   Last updated: Sun Sep 7 18:02:46 EDT 2003
d686 1
a686 1
    Maximum size for a table?                16 TB
d697 1
a697 1
   The maximum table size of 16 TB does not require large file support
@


1.229
log
@Update URL to be momjian.postgresql.org.
@
text
@d4 1
a4 1
   Last updated: Sun Sep 7 18:01:28 EDT 2003
d203 1
a203 1
   http://candle.pha.pa.us/main/writings/pgsql/win32.html.
@


1.228
log
@Add WIN32 URL.
@
text
@d4 1
a4 1
   Last updated: Fri Sep 5 12:42:57 EDT 2003
@


1.227
log
@Add mention of OID wraparound.
@
text
@d4 1
a4 1
   Last updated: Mon Sep 1 12:47:42 EDT 2003
d202 2
a203 1
   http://techdocs.postgresql.org/guides/Windows.
@


1.226
log
@Fix unixware template --- had spaces around equals.
@
text
@d4 1
a4 1
   Last updated: Fri Aug 29 21:40:10 EDT 2003
d919 2
a920 1
   approach. In Perl, using DBI with Edmund Mergl's DBD::Pg module, the
@


1.225
log
@Add mention of new SSL capabilities.
@
text
@d4 1
a4 1
   Last updated: Fri Jul 25 18:07:30 EDT 2003
@


1.225.2.1
log
@Update this branch to match CVS head, includes WIN32 improvements.
@
text
@d4 1
a4 1
   Last updated: Fri Sep 5 12:42:57 EDT 2003
d202 1
a202 2
   http://techdocs.postgresql.org/guides/Windows and
   http://candle.pha.pa.us/main/writings/pgsql/win32.html.
d919 1
a919 2
   approach, and the oid value will wrap around when it reaches 4
   billion. In Perl, using DBI with Edmund Mergl's DBD::Pg module, the
@


1.224
log
@Update FAQ.

Ian Barwick
@
text
@d4 1
a4 1
   Last updated: Wed Jul 23 12:53:27 EDT 2003
d1114 6
a1119 2
     * The only way to encrypt transmission from the client to the server
       is by using hostssl in pg_hba.conf.
@


1.223
log
@Update to 7.3.4 as newest release.
@
text
@d4 1
a4 1
   Last updated: Wed Jul 23 00:11:07 EDT 2003
d257 1
a257 1
   We plan to have major releases every four months.
@


1.222
log
@Update URL's.
@
text
@d4 1
a4 1
   Last updated: Sun Jul 20 17:52:41 EDT 2003
d255 1
a255 1
   The latest release of PostgreSQL is version 7.3.3.
@


1.221
log
@Update FAQ from Ian Barwick.
@
text
@d4 1
a4 1
   Last updated: Fri Jun 6 18:20:23 EDT 2003
d251 1
a251 1
   http://www.ca.PostgreSQL.org/users-lounge/commercial-support.html.
@


1.220
log
@Add item about sending success stories to http://advocacy.postgresql.org.
@
text
@d4 1
a4 1
   Last updated: Fri May 30 22:24:56 EDT 2003
d255 1
a255 1
   The latest release of PostgreSQL is version 7.3.2.
d268 3
a270 2
   books available for purchase at http://www.ca.PostgreSQL.org/books/.
   There is also a collection of PostgreSQL technical articles at
d675 1
a675 1
    ALTER TABLE DROP COLUMN old_col;
@


1.219
log
@Add info about selecting a random row.
@
text
@d4 1
a4 1
   Last updated: Wed May 28 00:35:16 EDT 2003
d391 3
@


1.218
log
@Add item for changing a column's data type.
@
text
@d4 1
a4 1
   Last updated: Mon May 26 15:25:04 EDT 2003
d61 1
a61 1
   4.2) How do I SELECT only the first few rows of a query?
d630 1
a630 1
    4.2) How do I SELECT only the first few rows of a query?
d640 6
@


1.217
log
@Update CVS with new FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Apr 22 14:02:41 EDT 2003
d63 2
a64 1
   4.4) How do you remove a column from a table?
d648 1
a648 1
    4.4) How do you remove a column from a table?
d650 2
a651 2
   This functionality was added in release 7.3 with ALTER TABLE DROP
   COLUMN. In earlier versions, you can do this:
d661 10
@


1.216
log
@Add mention of Novell Netware 6 port.
@
text
@d4 1
a4 1
   Last updated: Mon Apr 21 10:54:04 EDT 2003
@


1.215
log
@Add mention of OpenProjects IRC channel.  It is as large as EFNet now.
@
text
@d4 1
a4 1
   Last updated: Wed Apr 16 14:55:59 EDT 2003
d202 2
@


1.214
log
@Add mention of new sets returning functions capability.
@
text
@d4 1
a4 1
   Last updated: Mon Mar 17 14:52:36 EST 2003
d243 3
a245 2
   There is also an IRC channel on EFNet, channel #PostgreSQL. I use the
   Unix command irc -c '#PostgreSQL' "$USER" irc.phoenix.net.
@


1.213
log
@Update links, from Ian Barwick
@
text
@d4 1
a4 1
   Last updated: Mon Mar 17 14:47:21 EST 2003
d1063 2
a1064 4
   You can return result sets from PL/pgSQL functions using refcursors.
   See
   http://www.PostgreSQL.org/docs/view.php?version=current&idoc=1&file=pl
   pgsql-cursors.html, section 23.7.3.3.
@


1.212
log
@Increase max known database size.
@
text
@d4 1
a4 1
   Last updated: Mon Mar 17 11:32:59 EST 2003
d197 1
a197 1
   http://www.PostgreSQL.org/docs/faqs/faq-mswin.html.
d199 3
a201 1
   A native port to MS Win NT/2000/XP is currently being worked on.
d259 1
a259 2
   browse the manual online at
   http://www.ca.PostgreSQL.org/users-lounge/docs/.
d1064 3
a1066 2
   See http://www.PostgreSQL.org/idocs/index.php?plpgsql-cursors.html,
   section 23.7.3.3.
@


1.211
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Fri Mar 7 00:48:42 EST 2003
d659 1
a659 1
    Maximum size for a database?             unlimited (1 TB databases exist)
@


1.210
log
@Update URL.
@
text
@d4 1
a4 1
   Last updated: Tue Feb 18 12:23:04 EST 2003
@


1.209
log
@New URL for FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Feb 18 11:37:22 EST 2003
d9 1
a9 1
   http://www.PostgreSQL.org/docs/faqs/faq-english.html.
d12 1
a12 1
   http://www.PostgreSQL.org/users-lounge/docs/index.html.
@


1.208
log
@*** empty log message ***
@
text
@d4 1
a4 1
   Last updated: Tue Feb 18 00:07:35 EST 2003
d9 1
a9 1
   http://www.ca.PostgreSQL.org/docs/faq-english.html.
d12 1
a12 1
   http://www.ca.PostgreSQL.org/users-lounge/docs/faq.html.
d197 1
a197 1
   http://www.ca.PostgreSQL.org/docs/faq-mswin.html.
@


1.207
log
@Update changes from Ian Barwick.
@
text
@d4 1
a4 1
   Last updated: Tue Feb 18 00:06:42 EST 2003
@


1.206
log
@Update to 7.3.2 as newest release.
@
text
@d4 1
a4 1
   Last updated: Fri Feb 14 09:03:00 EST 2003
d197 1
a197 1
   http://www.PostgreSQL.org/docs/faq-mswin.html.
d425 3
d829 1
a830 1
BYTEA           bytea           variable-length byte array (null-byte safe)
d835 1
a835 1
   The last four types above are "varlena" types (i.e., the first four
d847 2
a848 2
   particularly values that include NULL bytes. These types have similar
   performance characteristics.
@


1.205
log
@Update URL's.
@
text
@d4 1
a4 1
   Last updated: Fri Feb 14 08:58:51 EST 2003
d249 1
a249 1
   The latest release of PostgreSQL is version 7.3.1.
@


1.204
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Feb 13 23:07:35 EST 2003
d9 1
a9 1
   http://www.PostgreSQL.org/docs/faq-english.html.
d12 1
a12 1
   http://www.PostgreSQL.org/users-lounge/docs/faq.html.
d245 1
a245 1
   http://www.PostgreSQL.org/users-lounge/commercial-support.html.
d258 1
a258 1
   http://www.PostgreSQL.org/users-lounge/docs/.
@


1.203
log
@Remove mention of 6.5 max backends.
@
text
@d4 1
a4 1
   Last updated: Mon Jan 27 01:24:42 EST 2003
@


1.202
log
@Mark IN performance problem as fixed in 7.4
@
text
@d4 1
a4 1
   Last updated: Sat Jan 25 21:43:37 EST 2003
a587 4
   
   In PostgreSQL versions prior to 6.5, the maximum number of backends
   was 64, and changing it required a rebuild after altering the
   MaxBackendId constant in include/storage/sinvaladt.h.
@


1.201
log
@Add section on testing index scan.
@
text
@d4 1
a4 1
   Last updated: Fri Jan 17 12:15:04 EST 2003
d1018 2
a1019 2
   For this to be fast, subcol should be an indexed column. We hope to
   fix this limitation in a future release.
@


1.200
log
@Update CHAR().
@
text
@d4 1
a4 1
   Last updated: Sun Jan 12 13:36:11 EST 2003
d752 4
@


1.199
log
@Update CHAR() description.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 12 09:58:38 EST 2003
d823 1
a823 1
"char"          char            1 character
a824 1
VARCHAR(n)      varchar         size specifies maximum length, no padding
d826 1
d837 1
a837 1
   VARCHAR(n) is best when storing variable-length strings but it limits
d839 1
a839 1
   maximum 1 gigabyte.
@


1.198
log
@Improve CHAR() description.
@
text
@d4 1
a4 1
   Last updated: Sun Jan 12 00:16:01 EST 2003
d842 4
a845 3
   stores trailing spaces, while VARCHAR(n) trims them. BYTEA is for
   storing binary data, particularly values that include NULL bytes.
   These types have similar performance characteristics.
@


1.197
log
@*** empty log message ***
@
text
@d4 1
a4 1
   Last updated: Tue Dec 17 23:56:27 EST 2002
a836 2
   
   CHAR(n) is best when storing strings that are usually the same length.
d839 6
a844 3
   maximum 1 gigabyte. BYTEA is for storing binary data, particularly
   values that include NULL bytes. These types have similar performance
   characteristics.
@


1.196
log
@Stamp 7.3.1
@
text
@d4 1
a4 1
   Last updated: Tue Dec 17 23:39:40 EST 2002
@


1.195
log
@Update release to mark 7.3.
@
text
@d4 1
a4 1
   Last updated: Mon Dec 16 13:40:20 EST 2002
d249 1
a249 1
   The latest release of PostgreSQL is version 7.3.
@


1.194
log
@Improvements from Neil Conway.
@
text
@d4 1
a4 1
   Last updated: Thu Dec 5 00:47:26 EST 2002
d249 1
a249 1
   The latest release of PostgreSQL is version 7.2.3.
d418 1
a418 1
   These include PgAccess http://www.pgaccess.com), PgAdmin II
a423 4
   
   We have a nice graphical user interface called PgAccess which can also
   be used as a report generator. The Web page is
   http://www.pgaccess.org/.
@


1.193
log
@Updates from Ian Barwick.
@
text
@d4 1
a4 1
   Last updated: Sun Oct 20 20:47:14 EDT 2002
d37 1
a37 2
   2.3) Does PostgreSQL have a graphical user interface? A report
   generator? An embedded query language interface?
d393 2
a394 2
   PsqlODBC is included in the distribution. More information about it
   can be gotten from ftp://ftp.PostgreSQL.org/pub/odbc/.
a404 2
   See also the ODBC chapter of the Programmer's Guide.
   
d415 1
a415 2
    2.3) Does PostgreSQL have a graphical user interface? A report generator?
    An embedded query language interface?
d417 8
a428 3
   We also include ecpg, which is an embedded SQL query language
   interface for C.
   
d431 4
a434 1
   We have:
a435 1
     * C++ (libpq++)
a437 2
     * Perl (DBD::Pg and perl5)
     * ODBC (odbc)
a439 2
     * C Easy API (libpgeasy)
     * PHP ('pg_' functions, Pear::DB)
d441 2
a442 3
   Additional interfaces are available at
   http://www.PostgreSQL.org/interfaces.html and
   http://gborg.PostgreSQL.org.
@


1.193.2.1
log
@Update FAQ for 7.3.1.
@
text
@d4 1
a4 1
   Last updated: Tue Dec 17 23:39:40 EST 2002
d37 2
a38 1
   2.3) Does PostgreSQL have a graphical user interface?
d250 1
a250 1
   The latest release of PostgreSQL is version 7.3.1.
d394 2
a395 2
   You can download PsqlODBC from
   http://gborg.postgresql.org/project/psqlodbc/projdisplay.php.
d406 2
d418 2
a419 1
    2.3) Does PostgreSQL have a graphical user interface?
d421 6
a426 7
   Yes, there are several graphical interfaces to PostgreSQL available.
   These include PgAccess http://www.pgaccess.org), PgAdmin II
   (http://www.pgadmin.org, Win32-only), RHDB Admin
   (http://sources.redhat.com/rhdb/ ) and Rekall (
   http://www.thekompany.com/products/rekall/, proprietary). There is
   also PHPPgAdmin ( http://phppgadmin.sourceforge.net/ ), a web-based
   interface to PostgreSQL.
d430 1
a430 4
   Most popular programming languages contain an interface to PostgreSQL.
   Check your programming language's list of extension modules.
   
   The following interfaces are included in the PostgreSQL distribution:
d432 1
d435 2
d439 2
d442 3
a444 2
   Additional interfaces are available at http://gborg.postgresql.org in
   the Drivers/Interfaces section.
@


1.193.2.2
log
@Update Russian FAQ.  Update all FAQ's for 7.3.X branch.
@
text
@d4 1
a4 1
   Last updated: Tue Dec 17 23:56:27 EST 2002
@


1.193.2.3
log
@Update FAQ's in head and 7.3.X.
@
text
@d4 1
a4 1
   Last updated: Fri Feb 14 09:03:00 EST 2003
d9 1
a9 1
   http://www.ca.PostgreSQL.org/docs/faq-english.html.
d12 1
a12 1
   http://www.ca.PostgreSQL.org/users-lounge/docs/faq.html.
d245 1
a245 1
   http://www.ca.PostgreSQL.org/users-lounge/commercial-support.html.
d249 1
a249 1
   The latest release of PostgreSQL is version 7.3.2.
d258 1
a258 1
   http://www.ca.PostgreSQL.org/users-lounge/docs/.
d589 4
a751 4
   If you believe the optimizer is incorrect in choosing a sequential
   scan, use SET enable_seqscan TO 'off' and run tests to see if an index
   scan is indeed faster.
   
d823 2
a825 1
CHAR(n)         bpchar          blank padded to the specified fixed length
a826 1
"char"          char            one character
d837 3
a839 1
   VARCHAR(n) is best when storing variable-length strings and it limits
d841 3
a843 7
   with a maximum of one gigabyte.
   
   CHAR(n) is for storing strings that are all the same length. CHAR(n)
   pads with blanks to the specified length, while VARCHAR(n) only stores
   the characters supplied. BYTEA is for storing binary data,
   particularly values that include NULL bytes. These types have similar
   performance characteristics.
d1012 2
a1013 2
   For this to be fast, subcol should be an indexed column. This
   preformance problem will be fixed in 7.4.
@


1.193.2.4
log
@Stamp 7.3.4 release.
@
text
@d249 1
a249 1
   The latest release of PostgreSQL is version 7.3.4.
@


1.193.2.5
log
@Stamp release 7.3.13.
@
text
@d249 1
a249 1
   The latest release of PostgreSQL is version 8.1.2.
@


1.193.2.6
log
@Update FAQ latest version
@
text
@d249 1
a249 1
   The latest release of PostgreSQL is version 8.1.3.
@


1.193.2.7
log
@Stamp releases 7.3.15, 7.4.13, and 8.0.8.
@
text
@d249 1
a249 1
   The latest release of PostgreSQL is version 8.1.4.
@


1.193.2.8
log
@Stamp releases 7.3.16, 7.4.14, 8.0.9, and 8.1.5.
@
text
@d249 1
a249 1
   The latest release of PostgreSQL is version 8.1.5.
@


1.193.2.9
log
@Stamp release 7.3.17.
@
text
@d249 1
a249 1
   The latest release of PostgreSQL is version 8.2.1.
@


1.193.2.10
log
@Update FAQ to mention most recent release for releases
8.2.4, 8.1.9, 8.0.13, 7.4.17, 7.3.19.
@
text
@d249 1
a249 1
   The latest release of PostgreSQL is version 8.2.4.
@


1.193.2.11
log
@Stamp releases 8.2.5, 8.1.10, 8.0.14, 7.4.18, 7.3.20.

Update FAQs for 8.2.5.
@
text
@d249 1
a249 1
   The latest release of PostgreSQL is version 8.2.5.
@


1.192
log
@Update char/varchar()/text/bytea to mention they have similar performance
characteristics.
@
text
@d4 1
a4 1
   Last updated: Sat Oct 19 22:58:02 EDT 2002
d342 1
a342 1
          to MySQL at http://openacs.org/why-not-mysql.html
d599 1
a599 1
    3.9) What are the pgsql_tmp directory?
d601 4
a604 4
   They are temporary files generated by the query executor. For example,
   if a sort needs to be done to satisfy an ORDER BY, and the sort
   requires more space than the backend's -S parameter allows, then
   temporary files are created to hold the extra data.
d761 9
a769 1
       of the string, i.e.:
a770 11
     * LIKE patterns must not start with %.
     * ~ (regular expression) patterns must start with ^.
       
     The search string can not start with a character class, e.g. [a-e].
   
     Case-insensitive searches such as ILIKE and ~* do not utilise
   indexes. Instead, use functional indexes, which are described in
   section 4.12.
   
     The default C locale must be used during initdb.
   
d1057 1
a1057 1
   /contrib/dblink allows cross-database queries using function calls. Of
d1089 2
a1090 2
     * /contrib/pgcrypto contains many encryption functions for use in
       SQL queries.
@


1.191
log
@Update for tables returning function, item 5.3, from Joe Conway.
@
text
@d4 1
a4 1
   Last updated: Thu Oct 17 19:33:40 EDT 2002
d851 2
a852 1
   values that include NULL bytes.
@


1.190
log
@Improvements to Ian Barwick patch.
@
text
@d4 1
a4 1
   Last updated: Sun Oct 13 23:15:09 EDT 2002
d1116 5
a1120 2
   This requires wizardry so extreme that the authors have never tried
   it, though in principle it can be done.
@


1.189
log
@FAQ updates from Ian Barwick.
@
text
@d4 1
a4 1
   Last updated: Sun Oct 13 22:49:56 EDT 2002
d55 1
a55 1
   3.9) What are the pg_sorttempNNN.NN files in my database directory?
d200 1
a200 2
   A native port to some Microsoft platforms is currently being worked
   upon.
d370 1
a370 1
   1994. This is all thanks to Marc Fournier, who has created and managed
d421 3
a423 3
   We have a nice graphical user interface called PgAccess, which is
   shipped as part of the distribution. PgAccess also has a report
   generator. The Web page is http://www.pgaccess.org/.
d435 1
a435 1
     * Perl (DBD::Pg)
d443 2
a444 1
   http://www.PostgreSQL.org/interfaces.html.
d599 1
a599 1
    3.9) What are the pg_tempNNN.NN files in my database directory?
d606 3
a608 3
   The temporary files should be deleted automatically, but might not if
   a backend crashes during a sort. If you have no backends running at
   the time, it is safe to delete the pg_tempNNN.NN files.
d652 2
a653 2
   Prior to version 7.3, ALTER TABLE DROP COLUMN is not supported. You
   can do this instead:
d818 1
a818 1
    WHERE LOWER(col) = 'abc';
d822 1
a822 1
    CREATE INDEX tabindex ON tab (LOWER(col));
@


1.188
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Fri Oct 11 13:54:56 EDT 2002
d115 1
a115 1
    1.1) What is PostgreSQL?
d125 5
a129 5
   PostgreSQL development is performed by a team of Internet developers
   who all subscribe to the PostgreSQL development mailing list. The
   current coordinator is Marc G. Fournier (scrappy@@PostgreSQL.org). (See
   below on how to join). This team is now responsible for all
   development of PostgreSQL.
d186 6
a191 5
   interfaces and binaries to run on MS Windows platforms. In this case,
   the client is running on MS Windows, and communicates via TCP/IP to a
   server running on one of our supported Unix platforms. A file
   win31.mak is included in the distribution for making a Win32 libpq
   library and psql. PostgreSQL also communicates with ODBC clients.
d197 5
a201 2
   distribution or the MS Windows FAQ on our web site. We have no plan to
   do a native port to any Microsoft platform.
d247 1
a247 1
   http://www.postgresql.org/users-lounge/commercial-support.html.
d265 1
a265 1
   books available for purchase at http://www.postgresql.org/books/.
d267 1
a267 1
   http://techdocs.postgresql.org/.
d314 3
a316 2
   Please visit the PostgreSQL BugTool page, which gives guidelines and
   directions on how to submit a bug.
d354 8
a361 8
          Our mailing list provides a large group of developers and users
          to help resolve any problems encountered. While we can not
          guarantee a fix, commercial DBMSs do not always supply a fix
          either. Direct access to developers, the user community,
          manuals, and the source code often make PostgreSQL support
          superior to other DBMSs. There is commercial per-incident
          support available for those who need it. (See support FAQ
          item.)
d370 3
a372 3
   PostgreSQL has had a first-class infrastructure since we started six
   years ago. This is all thanks to Marc Fournier, who has created and
   managed this infrastructure over the years.
d381 1
a381 2
   please go to https://store.pgsql.com/shopping/index.php?id=1 and make
   a donation.
a413 2
   There is also one at http://www.phone.net/home/mwm/hotlist/.
   
d417 1
a417 1
   For complex cases, many use the Perl interface and CGI.pm.
d422 3
a424 3
   We have a nice graphical user interface called pgaccess, which is
   shipped as part of the distribution. pgaccess also has a report
   generator. The Web page is http://www.flex.ro/pgaccess
d429 1
a429 1
    2.4) What languages are available to communicate with PostgreSQL?
d436 1
a436 1
     * Perl (perl5)
d441 1
a441 1
     * Embedded HTML (PHP from http://www.php.net)
d444 1
a444 1
   http://www.postgresql.org/interfaces.html.
d599 1
a599 1
    3.9) What are the pg_sorttempNNN.NN files in my database directory?
d615 5
a619 5
   However, major releases often change the internal format of system
   tables and data files. These changes are often complex, so we don't
   maintain backward compatability for data files. A dump outputs data in
   a generic format that can then be loaded in using the new internal
   format.
d637 4
a640 4
   first few rows. Consider a query that has an ORDER BY. If there is an
   index that matches the ORDER BY, PostgreSQL may be able to evaluate
   only the first few records requested, or the entire query may have to
   be evaluated until the desired rows have been generated.
d652 2
a653 1
   We do not support ALTER TABLE DROP COLUMN, but do this:
d697 1
a697 1
    24 bytes: one int field and one text filed
d756 1
a756 1
    LIMIT 1
d768 3
a770 3
     Case-insensitive searches like ILIKE and ~* can not be used.
   Instead, use functional indexes, which are described later in this
   FAQ.
d772 1
a772 1
     The default C local must be used during initdb.
d818 1
a818 1
    WHERE lower(col) = 'abc'
d822 1
a822 1
    CREATE INDEX tabindex on tab (lower(col));
d833 2
a834 2
CHAR(#)         bpchar          blank padded to the specified fixed length
VARCHAR(#)      varchar         size specifies maximum length, no padding
d847 2
a848 2
   CHAR() is best when storing strings that are usually the same length.
   VARCHAR() is best when storing variable-length strings but it limits
d879 4
a882 4
   explicitly. Using the example table in 4.15.1, that might look like
   this in Perl:
    new_id = output of "SELECT nextval('person_id_seq')"
    INSERT INTO person (id, name) VALUES (new_id, 'Blaise Pascal');
d892 2
a893 2
    INSERT INTO person (name) VALUES ('Blaise Pascal');
    new_id = output of "SELECT currval('person_id_seq')";
d904 1
a904 1
   No. Currval() returns the current value assigned by your backend, not
d918 1
a918 1
   initdb are less than 16384 (from backend/access/transam.h). All
d962 2
a963 1
   http://www.comptechnews.com/~reaster/dbdesign.html
d982 1
a982 1
   From psql, type select version();
d1011 1
a1011 1
SELECT *
d1013 1
a1013 1
    WHERE col IN (SELECT subcol FROM subtab)
d1016 1
a1016 1
SELECT *
d1018 1
a1018 1
    WHERE EXISTS (SELECT subcol FROM subtab WHERE subcol = col)
d1066 1
a1066 2
   See
   http://developer.postgresql.org/docs/postgres/plpgsql-cursors.html,
d1085 1
a1085 1
   http://gborg.postgresql.org/genpage?replication_research lists them. A
d1087 1
a1087 1
   http://gborg.postgresql.org/project/pgreplication/projdisplay.php.
d1089 1
a1089 1
    4.27) What encryption options are available?
d1096 2
a1097 2
       version 7.3. In previous versions, you must enable
       password_encryption in postgresql.conf.
@


1.187
log
@Add replication, encryption, and cross database FAQ items.
@
text
@d4 1
a4 1
   Last updated: Fri Oct 11 00:59:31 EDT 2002
d1079 1
a1079 1
   There are several master/slave replication solutions available. These
d1095 1
@


1.186
log
@Update IN/EXISTS item.
@
text
@d4 1
a4 1
   Last updated: Wed Oct 9 23:14:53 EDT 2002
d99 2
d1051 7
a1057 6
   There is no way to query any database except the current one. Because
   PostgreSQL loads database-specific system catalogs, it is uncertain
   how a cross-database query should even behave.
   
   Of course, a client can make simultaneous connections to different
   databases and merge the information that way.
d1076 19
@


1.185
log
@Update FAQ for 7.2.3 version.
@
text
@d4 1
a4 1
   Last updated: Mon Sep 30 23:28:35 EDT 2002
d1001 4
a1004 2
   scanning the result of the subquery for each row of the outer query. A
   workaround is to replace IN with EXISTS:
d1007 1
a1007 1
    WHERE col1 IN (SELECT col2 FROM TAB2)
d1012 1
a1012 1
    WHERE EXISTS (SELECT col2 FROM TAB2 WHERE col1 = col2)
d1014 2
a1015 1
   We hope to fix this limitation in a future release.
@


1.184
log
@Add mention of 1 terrabyte databases.
@
text
@d4 1
a4 1
   Last updated: Sun Aug 25 21:05:29 EDT 2002
d245 1
a245 1
   The latest release of PostgreSQL is version 7.2.2.
@


1.183
log
@Mark 7.2.2 as newest release.
@
text
@d4 1
a4 1
   Last updated: Thu Aug 22 19:20:40 EDT 2002
d661 1
a661 1
    Maximum size for a database?             unlimited (500 GB databases exist)
@


1.182
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Aug 22 19:20:17 EDT 2002
d245 1
a245 1
   The latest release of PostgreSQL is version 7.2.1.
@


1.181
log
@Improve wording of upgrade section.
@
text
@d4 1
a4 1
   Last updated: Thu Aug 22 11:30:58 EDT 2002
@


1.180
log
@Update contributions link.
@
text
@d4 1
a4 1
   Last updated: Tue Jul 30 11:05:09 EDT 2002
d56 2
a57 1
   3.10) Why do I need to do a dump and restore to upgrade PostgreSQL?
d606 2
a607 1
    3.10) Why do I need to do a dump and restore to upgrade PostgreSQL?
d609 11
a619 15
   The PostgreSQL team tries very heard to maintain compatability across
   minor releases. So upgrading from 7.2 to 7.2.1 does not require a dump
   a restore. However, new features are continuously being adding and
   sometimes this requires new fields to be added to system tables.
   
   These changes may be across many tables and so maintaining backward
   compatability would be quite difficult. Thus, restoring from a dump is
   required to make everything work.
   
   Note that the actual on-disk file format does not change very often, a
   feature the pg_upgrade script uses quite successfully. There the dump
   is used create the necessary information in the system tables. The
   data files are then just copied across. This method is not as
   guarenteed as the dump/restore method but when it works it can make
   upgrades very efficient.
@


1.179
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Jul 29 21:35:23 EDT 2002
d373 2
a374 1
   please go to http://www.pgsql.com/pg_goodies and make a donation.
@


1.178
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Jul 29 19:56:45 EDT 2002
d436 3
@


1.177
log
@Remove references to pre-7.1;  too old.
@
text
@d4 1
a4 1
   Last updated: Thu Jul 11 12:37:48 EDT 2002
@


1.176
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Jul 11 12:35:53 EDT 2002
d806 1
a806 1
   variant of LIKE is called ILIKE in PostgreSQL 7.1 and later.
d959 3
a961 4
   If you are running a version older than 7.1, an upgrade may fix the
   problem. Also it is possible you have run out of virtual memory on
   your system, or your kernel has a low limit for certain resources. Try
   this before starting postmaster:
d1014 2
a1015 2
   PostgreSQL 7.1 and later supports outer joins using the SQL standard
   syntax. Here are two examples:
@


1.175
log
@Add NULL space mention.
@
text
@d4 1
a4 1
   Last updated: Thu Jul 4 15:25:57 EDT 2002
d661 2
a662 2
    Maximum size for a row?                  unlimited in 7.1 and later
    Maximum size for a field?                1 GB in 7.1 and later
@


1.174
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Jun 24 23:35:08 EDT 2002
d709 2
@


1.173
log
@Add more info on regex's using INDEX.
@
text
@d4 1
a4 1
   Last updated: Mon Jun 24 23:32:16 EDT 2002
d755 1
a755 1
     * ~(regular expression) patterns must start with ^.
d763 1
a763 1
     The default C local must have been used during initdb.
@


1.172
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Jun 24 21:45:50 EDT 2002
d750 14
a763 4
   used if the default C local is used during initdb and the beginning of
   the search is anchored to the start of the string. Therefore, to use
   indexes, LIKE patterns must not start with %, and ~(regular
   expression) patterns must start with ^.
@


1.171
log
@Add MIN/MAX LIMIT/OFFSET mention.
@
text
@d4 1
a4 1
   Last updated: Sun Jun 23 17:16:13 EDT 2002
d746 1
a746 1
    ORDER BY col
d750 4
a753 3
   used if the beginning of the search is anchored to the start of the
   string. Therefore, to use indexes, LIKE patterns must not start with
   %, and ~(regular expression) patterns must start with ^.
@


1.170
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Jun 20 22:00:57 EDT 2002
d726 1
a726 1
   random disk access caused by an index scan is sometimes slower than a
d741 8
a748 2
   only a small portion of the table is returned.
   
@


1.169
log
@Fix link.
@
text
@d4 1
a4 1
   Last updated: Tue Jun 11 06:36:10 EDT 2002
d56 1
d600 18
@


1.168
log
@Update performance section.
@
text
@d4 1
a4 1
   Last updated: Tue Jun 11 06:29:44 EDT 2002
@


1.167
log
@Update fsync FAQ item.
@
text
@d4 1
a4 1
   Last updated: Mon Jun 10 22:22:31 EDT 2002
d328 2
a329 3
          others.
          In comparison to MySQL or leaner database systems, we are
          slower on inserts/updates because we have transaction overhead.
@


1.166
log
@Fix link.
@
text
@d4 1
a4 1
   Last updated: Mon Jun 10 16:44:55 EDT 2002
d326 3
a328 11
          PostgreSQL runs in two modes. Normal fsync mode flushes every
          completed transaction to disk, guaranteeing that if the OS
          crashes or loses power in the next few seconds, all your data
          is safely stored on disk. In this mode, we are slower than most
          commercial databases, partly because few of them do such
          conservative flushing to disk in their default modes. In
          no-fsync mode, we are usually faster than commercial databases,
          though in this mode, an OS crash could cause data corruption.
          We are working to provide an intermediate mode that suffers
          less performance overhead than full fsync mode, and will allow
          data integrity within 30 seconds of an OS crash.
d332 4
a335 9
          the Features section above. We are built for flexibility and
          features, though we continue to improve performance through
          profiling and source code analysis. There is an interesting Web
          page comparing PostgreSQL to MySQL at
          http://openacs.org/why-not-mysql.html
          We handle each user connection by creating a Unix process.
          Backend processes share data buffers and locking information.
          With multiple CPUs, multiple backends can easily run on
          different CPUs.
@


1.165
log
@Move ruler to separate sections.
@
text
@d4 1
a4 1
   Last updated: Mon Jun 10 15:49:44 EDT 2002
@


1.164
log
@Add item for plpgsql temp table access.
@
text
@d4 1
a4 1
   Last updated: Mon Jun 10 15:47:38 EDT 2002
a1026 1
     _________________________________________________________________
d1045 1
@


1.163
log
@Update DROP COLUMN example to use transactions and rollback-able DROP TABLE>
@
text
@d4 1
a4 1
   Last updated: Fri Apr 26 23:03:46 EDT 2002
d95 2
d1035 11
@


1.162
log
@Add how to get database/user listing information.
@
text
@d4 1
a4 1
   Last updated: Thu Apr 18 00:44:51 EDT 2002
d640 2
d647 1
@


1.161
log
@Add mention of -DLINUX_PROFILE to profile mention.
@
text
@d4 1
a4 1
   Last updated: Wed Apr 17 22:48:04 EDT 2002
d66 2
a67 2
   4.7) How do I find out what tables or indexes are defined in the
   database?
d700 2
a701 1
    4.7) How do I find out what tables or indexes are defined in the database?
d704 2
a705 1
   \? to see them.
@


1.160
log
@Point to developers site, not my hostname.
@
text
@d4 1
a4 1
   Last updated: Tue Apr 9 10:53:30 EDT 2002
d574 2
a575 1
   in the client's current directory.
@


1.159
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Apr 9 10:21:18 EDT 2002
@


1.158
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Apr 8 23:22:06 EDT 2002
d1025 1
a1025 1
   http://candle.pha.pa.us/main/writings/pgsql/sgml/plpgsql-cursors.html,
@


1.157
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Mar 18 14:34:57 EST 2002
d94 1
d1020 7
@


1.156
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Mar 5 01:28:16 EST 2002
d240 1
a240 1
   The latest release of PostgreSQL is version 7.2.
@


1.155
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Sun Mar 3 13:35:39 EST 2002
d647 1
a647 1
    Maximum size for a database?             unlimited (60 GB databases exist)
@


1.154
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Sun Mar 3 11:02:16 EST 2002
d710 1
a710 1
   used if the table is larger than a minimum size, and the index selects
@


1.153
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Feb 26 23:52:13 EST 2002
d709 19
a727 17
   PostgreSQL does not automatically maintain statistics. VACUUM must be
   run to update the statistics. After statistics are updated, the
   optimizer knows how many rows in the table, and can better decide if
   it should use indexes. Note that the optimizer does not use indexes in
   cases when the table is small because a sequential scan would be
   faster.
   
   For column-specific optimization statistics, use VACUUM ANALYZE.
   VACUUM ANALYZE is important for complex multijoin queries, so the
   optimizer can estimate the number of rows returned from each table,
   and choose the proper join order. The backend does not keep track of
   column statistics on its own, so VACUUM ANALYZE must be run to collect
   them periodically.
   
   Indexes are usually not used for ORDER BY or joins. A sequential scan
   followed by an explicit sort is faster than an indexscan of all tuples
   of a large table. This is because random disk access is very slow.
d731 2
a732 2
   string. So, to use indexes, LIKE searches should not begin with %, and
   ~(regular expression searches) should start with ^.
@


1.152
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Feb 25 15:29:02 EST 2002
@


1.151
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Feb 21 17:56:04 EST 2002
@


1.150
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Feb 21 17:19:22 EST 2002
@


1.149
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Feb 21 15:14:52 EST 2002
d254 3
a256 3
   books available for purchase at
   http://www.postgresql.org/books/index.html. There is also a collection
   of PostgreSQL technical articles at http://techdocs.postgresql.org/.
@


1.148
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Feb 21 15:13:31 EST 2002
@


1.147
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Feb 18 00:08:54 EST 2002
d251 6
a256 2
   There is a PostgreSQL book available at
   http://www.PostgreSQL.org/docs/awbook.html.
@


1.146
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Feb 14 12:14:47 EST 2002
d670 3
a672 3
   twenty characters in length. The flat file would be 2.8 MB. The size
   of the PostgreSQL database file containing this data can be estimated
   as 6.6 MB:
d674 1
a674 1
    26 bytes: two int fields @@ 4 bytes each
d677 1
a677 1
    66 bytes per row
d682 2
a683 2
   -------------------   =  124 rows per database page (rounded down)
     66 bytes per row
d686 2
a687 2
   --------------------  =  807 database pages (rounded up)
      124 rows per page
d689 1
a689 1
807 database pages * 8192 bytes per page  =  6,610,944 bytes (6.6 MB)
@


1.146.2.1
log
@Update FAQ for 7.2.1.
@
text
@d4 1
a4 1
   Last updated: Tue Mar 5 01:28:16 EST 2002
d251 2
a252 6
   There are two PostgreSQL books available online at
   http://www.PostgreSQL.org/docs/awbook.html and
   http://www.commandprompt.com/ppbook/. There is a list of PostgreSQL
   books available for purchase at http://www.postgresql.org/books/.
   There is also a collection of PostgreSQL technical articles at
   http://techdocs.postgresql.org/.
d643 1
a643 1
    Maximum size for a database?             unlimited (500 GB databases exist)
d670 3
a672 3
   twenty bytes in length. The flat file would be 2.8 MB. The size of the
   PostgreSQL database file containing this data can be estimated as 6.4
   MB:
d674 1
a674 1
    24 bytes: one int field and one text filed
d677 1
a677 1
    64 bytes per row
d682 2
a683 2
   -------------------   =  128 rows per database page (rounded down)
     64 bytes per row
d686 2
a687 2
   --------------------  =  782 database pages (rounded up)
      128 rows per page
d689 1
a689 1
782 database pages * 8192 bytes per page  =  6,406,144 bytes (6.4 MB)
d705 17
a721 19
   Indexes are not automatically used by every query. Indexes are only
   used if the table is larger than a minimum size, and the query selects
   only a small percentage of the rows in the table. This is because the
   random disk access caused by an index scan is sometimes slower than a
   straight read through the table, or sequential scan.
   
   To determine if an index should be used, PostgreSQL must have
   statistics about the table. These statistics are collected using
   VACUUM ANALYZE, or simply ANALYZE. Using statistics, the optimizer
   knows how many rows are in the table, and can better determine if
   indexes should be used. Statistics are also valuable in determining
   optimal join order and join methods. Statistics collection should be
   performed periodically as the contents of the table change.
   
   Indexes are normally not used for ORDER BY or to perform joins. A
   sequential scan followed by an explicit sort is usually faster than an
   index scan of a large table.
   However, LIMIT combined with ORDER BY often will use an index because
   only a small portion of the table is returned.
d725 2
a726 2
   string. Therefore, to use indexes, LIKE patterns must not start with
   %, and ~(regular expression) patterns must start with ^.
@


1.146.2.2
log
@Update for 7.2.1.
@
text
@d4 1
a4 1
   Last updated: Mon Mar 18 14:34:57 EST 2002
d240 1
a240 1
   The latest release of PostgreSQL is version 7.2.1.
@


1.146.2.3
log
@Brand 7.2.3.
@
text
@d4 1
a4 1
   Last updated: Mon Sep 30 23:28:35 EDT 2002
a55 2
   3.10) Why do I need to do a dump and restore to upgrade PostgreSQL
   releases?
d66 2
a67 2
   4.7) How do I find out what tables, indexes, databases, and users are
   defined?
a93 3
   4.25) How do I return multiple rows or columns from a function?
   4.26) Why can't I reliably create/drop temporary tables in PL/PgSQL
   functions?
d240 1
a240 1
   The latest release of PostgreSQL is version 7.2.3.
d323 13
a335 4
          PostgreSQL has performance similar to other commercial and open
          source databases. it is faster for some things, slower for
          others. In comparison to MySQL or leaner database systems, we
          are slower on inserts/updates because of transaction overhead.
d337 9
a345 4
          the Features section above. We are built for reliability and
          features, though we continue to improve performance in every
          release. There is an interesting Web page comparing PostgreSQL
          to MySQL at http://openacs.org/why-not-mysql.html
d383 1
a383 2
   please go to https://store.pgsql.com/shopping/index.php?id=1 and make
   a donation.
a445 3
       
   Additional interfaces are available at
   http://www.postgresql.org/interfaces.html.
d573 1
a573 2
   in the client's current directory. Linux requires a compile with
   -DLINUX_PROFILE for proper profiling.
a608 15
   
    3.10) Why do I need to do a dump and restore to upgrade between major
    PostgreSQL releases?
    
   The PostgreSQL team makes only small changes between minor releases,
   so upgrading from 7.2 to 7.2.1 does not require a dump and restore.
   However, major releases often change the internal format of system
   tables and data files. These changes are often complex, so we don't
   maintain backward compatability for data files. A dump outputs data in
   a generic format that can then be loaded in using the new internal
   format.
   
   In releases where the on-disk format does not change, the pg_upgrade
   script can be used to upgrade without a dump/restore. The release
   notes mention whether pg_upgrade is available for the release.
a637 2
    BEGIN;
    LOCK TABLE old_table;
a642 1
    COMMIT;
d647 1
a647 1
    Maximum size for a database?             unlimited (1 TB databases exist)
d649 2
a650 2
    Maximum size for a row?                  1.6TB
    Maximum size for a field?                1 GB
d698 1
a698 4
   NULLs are stored in bitmaps, so they use very little space.
   
    4.7) How do I find out what tables, indexes, databases, and users are
    defined?
d701 1
a701 2
   \? to see them. There are also system tables beginning with pg_ that
   describe these too. Also, psql -l will list all databases.
d712 1
a712 1
   random disk access caused by an index scan can be slower than a
d727 2
a728 8
   only a small portion of the table is returned. In fact, though MAX()
   and MIN() don't use indexes, it is possible to retrieve such values
   using an index with ORDER BY and LIMIT:
    SELECT col
    FROM tab
    ORDER BY col [ DESC ]
    LIMIT 1

d730 3
a732 14
   used in certain circumstances:
     * The beginning of the search string must be anchored to the start
       of the string, i.e.:
       
     * LIKE patterns must not start with %.
     * ~ (regular expression) patterns must start with ^.
       
     The search string can not start with a character class, e.g. [a-e].
   
     Case-insensitive searches like ILIKE and ~* can not be used.
   Instead, use functional indexes, which are described later in this
   FAQ.
   
     The default C local must be used during initdb.
d773 1
a773 1
   variant of LIKE is called ILIKE.
d926 4
a929 3
   You probably have run out of virtual memory on your system, or your
   kernel has a low limit for certain resources. Try this before starting
   postmaster:
d982 2
a983 2
   PostgreSQL supports outer joins using the SQL standard syntax. Here
   are two examples:
a1017 18
   
    4.25) How do I return multiple rows or columns from a function?
    
   You can return result sets from PL/pgSQL functions using refcursors.
   See
   http://developer.postgresql.org/docs/postgres/plpgsql-cursors.html,
   section 23.7.3.3.
   
    4.26) Why can't I reliably create/drop temporary tables in PL/PgSQL
    functions?
    
   PL/PgSQL caches function contents, and an unfortunate side effect is
   that if a PL/PgSQL function accesses a temporary table, and that table
   is later dropped and recreated, and the function called again, the
   function will fail because the cached function contents still point to
   the old temporary table. The solution is to use EXECUTE for temporary
   table access in PL/PgSQL. This will cause the query to be reparsed
   every time.
@


1.145
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Feb 12 12:18:09 EST 2002
d51 5
a55 7
   3.5) How do I prevent other hosts from accessing my PostgreSQL
   database?
   3.6) Why can't I connect to my database from another machine?
   3.7) How do I tune the database engine for better performance?
   3.8) What debugging features are available?
   3.9) Why do I get "Sorry, too many clients" when trying to connect?
   3.10) What are the pg_sorttempNNN.NN files in my database directory?
d485 1
a485 1
    3.5) How do I prevent other hosts from accessing my PostgreSQL database?
d493 1
a493 8
    3.6) Why can't I connect to my database from another machine?
    
   The default configuration allows only Unix domain socket connections
   from the local machine. To enable TCP/IP connections, make sure
   postmaster has been started with the -i option, and add an appropriate
   host entry to the file pgsql/data/pg_hba.conf.
   
    3.7) How do I tune the database engine for better performance?
d524 1
a524 1
    3.8) What debugging features are available?
d571 1
a571 1
    3.9) Why do I get "Sorry, too many clients" when trying to connect?
d595 1
a595 1
    3.10) What are the pg_sorttempNNN.NN files in my database directory?
d665 2
a666 2
   A PostgreSQL database may need six-and-a-half times the disk space
   required to store the data in a flat file.
d668 5
a672 3
   Consider a file of 300,000 lines with two integers on each line. The
   flat file is 2.4 MB. The size of the PostgreSQL database file
   containing this data can be estimated at 14 MB:
d674 1
a674 1
   + 8 bytes: two int fields @@ 4 bytes each
d677 1
a677 1
    48 bytes per row
d682 2
a683 2
   -------------------   =  171 rows per database page (rounded up)
     48 bytes per row
d685 3
a687 3
   300000 data rows
   --------------------  =  1755 database pages
      171 rows per page
d689 1
a689 1
1755 database pages * 8192 bytes per page  =  14,376,960 bytes (14 MB)
@


1.144
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Feb 12 12:14:52 EST 2002
d84 1
a84 1
   Why are there gaps in the numbers of my sequence/SERIAL column?
d869 1
a869 1
    there gaps in the numbers of my sequence/SERIAL column?
d872 1
a872 1
   transactions as needed and are now locked until the transaction
@


1.143
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Sat Feb 2 16:46:36 EST 2002
d83 2
d867 7
@


1.142
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Sat Feb 2 15:34:26 EST 2002
d267 5
a271 3
   teaches SQL. There is a nice tutorial at
   http://www.intermedia.net/support/sql/sqltut.shtm and at
   http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM.
@


1.141
log
@Update for 7.2:

This fixes references to 7.1.3 (I think).  It also
modifies the japanese
FAQ, so I'm not sure if that's done correctly.

Chris
@
text
@d4 1
a4 1
   Last updated: Tue Jan 22 15:23:58 EST 2002
@


1.140
log
@Update FAQ.
@
text
@d240 1
a240 1
   The latest release of PostgreSQL is version 7.1.3.
@


1.139
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Jan 10 18:41:45 EST 2002
d163 4
@


1.138
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Jan 10 18:35:15 EST 2002
d789 1
a789 1
BYTEA           bytea           variable-length byte array (null-safe)
@


1.137
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Jan 10 18:34:11 EST 2002
@


1.136
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Jan 10 18:33:31 EST 2002
@


1.135
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Jan 10 18:32:07 EST 2002
@


1.134
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Jan 10 18:07:03 EST 2002
@


1.133
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Fri Jan 4 00:44:42 EST 2002
d17 2
a18 2
   1.1) What is PostgreSQL?
   1.2) What's the copyright on PostgreSQL?
d20 1
a20 1
   1.4) What non-unix ports are available?
d30 1
a30 1
   1.14) How does PostgreSQL compare to other DBMS's?
d36 1
a36 1
   2.2) What tools are available for use PostgreSQL with Web pages?
d45 5
a49 3
   3.2) When I start the postmaster, I get a Bad System Call or core
   dumped message. Why?
   3.3) When I try to start the postmaster, I get IpcMemoryCreate errors.
a50 2
   3.4) When I try to start the postmaster, I get IpcSemaphoreCreate
   errors. Why?
d56 1
a56 1
   3.9) I get "Sorry, too many clients" when trying to connect. Why?
d65 1
a65 1
   4.5) What is the maximum size for a row, table, database?
d86 1
a86 1
   AllocSetAlloc()?"
d88 2
a89 2
   4.20) My large-object operations get invalid large obj descriptor.
   Why?
d102 1
a102 1
   5.3) I have changed a source file. Why does the recompile not see the
d110 2
d136 1
a136 3
   It is pronounced Post-Gres-Q-L.
   
    1.2) What's the copyright on PostgreSQL?
d142 1
a142 1
   Portions copyright (c) 1996-2001, PostgreSQL Global Development Group
d170 1
a170 1
    1.4) What non-unix ports are available?
d172 2
a173 2
        Client
        
d181 2
a182 2
        Server
        
d191 1
a191 1
   ftp://ftp.PostgreSQL.org/pub. For mirror sites, see our main Web site.
d198 1
a198 1
   subject line)
d229 1
a229 1
   unix command irc -c '#PostgreSQL' "$USER" irc.phoenix.net.
d253 1
a253 1
   Our Web site contains even more documentation.
d264 1
a264 1
   http://w3.one.net/~jhoffman/sqltut.htm and at
d276 1
a276 1
   Yes, we easily handle dates past the year 2000AD, and before 2000BC.
d281 1
a281 1
   documentation on our Web site, or in the distribution. Second,
d283 1
a283 1
   submit high-quality patches to pgsql-patches.
d293 2
a294 2
   Fill out the "bug-template" file and send it to:
   pgsql-bugs@@PostgreSQL.org
d299 1
a299 1
    1.14) How does PostgreSQL compare to other DBMS's?
d305 4
a308 4
          PostgreSQL has most features present in large commercial
          DBMS's, like transactions, subselects, triggers, views, foreign
          key referential integrity, and sophisticated locking. We have
          some features they don't have, like user-defined types,
d326 1
a326 1
          Of course, MySQL doesn't have any of the features mentioned in
d334 2
a335 2
          With multiple CPU's, multiple backends can easily run on
          different CPU's.
d348 1
a348 1
          guarantee a fix, commercial DBMS's don't always supply a fix
d351 1
a351 1
          superior to other DBMS's. There is commercial per-incident
d362 1
a362 1
   PostgreSQL has had a first-class infrastructure since we started five
d397 1
a397 1
   available. Questions to postgres95@@openlink.co.uk.
d404 1
a404 1
   http://www.webtools.com
d409 1
a409 1
   http://www.php.net
d417 1
a417 1
   shipped as part of the distribution. Pgaccess also has a report
d444 1
a444 1
    3.2) When I start the postmaster, I get a Bad System Call or core dumped
d451 1
a451 1
    3.3) When I try to start the postmaster, I get IpcMemoryCreate errors. Why?
d456 4
a459 4
   many buffers and backend processes you configure for the postmaster.
   For most systems, with default numbers of buffers and processes, you
   need a minimum of ~1MB. See the PostgreSQL Administrator's Guide for
   more detailed information about shared memory and semaphores.
d461 1
a461 2
    3.4) When I try to start the postmaster, I get IpcSemaphoreCreate errors.
    Why?
d466 7
a472 4
   process. A temporary solution is to start the postmaster with a
   smaller limit on the number of backend processes. Use -N with a
   parameter less than the default of 32. A more permanent solution is to
   increase your kernel's SEMMNS and SEMMNI parameters.
d483 1
a483 1
   unless you add the -i flag to the postmaster, and enable host-based
a486 3
   Inoperative semaphores can also cause crashes during heavy database
   access.
   
d489 2
a490 2
   The default configuration allows only unix domain socket connections
   from the local machine. To enable TCP/IP connections, make sure the
d496 1
a496 1
   Certainly, indices can speed up queries. The EXPLAIN command allows
d498 1
a498 1
   indices are being used.
d500 7
a506 7
   If you are doing a lot of INSERTs, consider doing them in a large
   batch using the COPY command. This is much faster than individual
   INSERTS. Second, statements not in a BEGIN WORK/COMMIT transaction
   block are considered to be in their own transaction. Consider
   performing several statements in a single transaction block. This
   reduces the transaction overhead. Also consider dropping and
   recreating indices when making large data changes.
d509 1
a509 1
   the postmaster with a -o -F option. This will prevent fsync()'s from
d514 1
a514 1
   parameter too high, the postmaster may not start because you've
d520 1
a520 1
   value is measured in kilobytes, and the default is 512 (ie, 512K).
d531 1
a531 1
   assert()'s monitor the progress of the backend and halt the program
d535 2
a536 2
   First, whenever you start the postmaster, make sure you send the
   standard output and error to a log file, like:
d547 1
a547 1
   If the postmaster is not running, you can actually run the postgres
d552 7
a558 7
   Because the backend was not started from the postmaster, it is not
   running in an identical environment and locking/backend interaction
   problems may not be duplicated.
   
   If the postmaster is running, start psql in one window, then find the
   PID of the postgres process used by psql. Use a debugger to attach to
   the postgres PID. You can set breakpoints in the debugger and issue
d572 1
a572 1
    3.9) I get 'Sorry, too many clients' when trying to connect. Why?
d574 2
a575 2
   You need to increase the postmaster's limit on how many concurrent
   backend processes it can start.
d578 1
a578 1
   the postmaster with a suitable -N value or modifying postgresql.conf.
d641 1
a641 1
    4.5) What is the maximum size for a row, table, database?
d644 1
a644 1
    Maximum size for a database?             unlimited (60GB databases exist)
d647 1
a647 1
    Maximum size for a field?                1GB in 7.1 and later
d656 2
a657 2
   The maximum table size of 16TB does not require large file support
   from the operating system. Large tables are stored as multiple 1GB
d670 2
a671 2
   flat file is 2.4MB. The size of the PostgreSQL database file
   containing this data can be estimated at 14MB:
d688 1
a688 1
1755 database pages * 8192 bytes per page  =  14,376,960 bytes (14MB)
d707 1
a707 1
   it should use indices. Note that the optimizer does not use indices in
d722 1
a722 1
   When using wild-card operators such as LIKE or ~, indices can only be
d724 1
a724 1
   string. So, to use indices, LIKE searches should not begin with %, and
d735 1
a735 1
   single dimension. R-tree's can handle multi-dimensional data. For
d743 2
a744 2
   Searching." Proc of the 1984 ACM SIGMOD Int'l Conf on Mgmt of Data,
   45-57.
a772 1

a776 1

d779 1
a779 1
   You test the column with IS NULLIS NOT NULL.
a827 2
   Numbering Rows.
   
d830 1
a830 1
   One approach is to to retrieve the next SERIAL value from the sequence
d837 5
a841 5
   You would then also have the new value stored in $newSerialID for use
   in other queries (e.g., as a foreign key to the person table). Note
   that the name of the automatically created SEQUENCE object will be
   named <table>_<serialcolumn>_seq, where table and serialcolumn are the
   names of your table and your SERIAL column, respectively.
d875 1
a875 1
   Oids are assigned to all new rows from a central area that is used by
d877 2
a878 2
   you want to make a copy of the table, with the original OID's, there
   is no reason you can't do it:
d890 1
a890 1
   values. Tids change after rows are modified or reloaded. They are used
d910 1
a910 1
    4.18) Why do I get the error "ERROR: Memory exhausted in AllocSetAlloc()?"
d915 1
a915 1
   this before starting the postmaster:
d930 2
a931 1
    4.20) My large-object operations get invalid large obj descriptor. Why?
@


1.132
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Wed Dec 5 00:41:12 EST 2001
d61 6
a66 9
   4.1) Why is the system confused about commas, decimal points, and date
   formats.
   4.2) What is the exact difference between binary cursors and normal
   cursors?
   4.3) How do I SELECT only the first few rows of a query?
   4.4) How do I get a list of tables or other things I can see in psql?
   4.5) How do you remove a column from a table?
   4.6) What is the maximum size for a row, table, database?
   4.7) How much database disk space is required to store data from a
d68 1
a68 1
   4.8) How do I find out what tables or indexes are defined in the
d70 5
a74 5
   4.9) My queries are slow or don't make use of the indexes. Why?
   4.10) How do I see how the query optimizer is evaluating my query?
   4.11) What is an R-tree index?
   4.12) What is the Genetic Query Optimizer?
   4.13) How do I perform regular expression searches and
d77 5
a81 5
   4.14) In a query, how do I detect if a field is NULL?
   4.15) What is the difference between the various character types?
   4.16.1) How do I create a serial/auto-incrementing field?
   4.16.2) How do I get the value of a SERIAL insert?
   4.16.3) Don't currval() and nextval() lead to a race condition with
d83 3
a85 3
   4.17) What is an OID? What is a TID?
   4.18) What is the meaning of some of the terms used in PostgreSQL?
   4.19) Why do I get the error "ERROR: Memory exhausted in
d87 2
a88 2
   4.20) How do I tell what PostgreSQL version I am running?
   4.21) My large-object operations get invalid large obj descriptor.
d90 4
a93 4
   4.22) How do I create a column that will default to the current time?
   4.23) Why are my subqueries using IN so slow?
   4.24) How do I perform an outer join?
   4.25) How do I perform queries using multiple databases?
d611 1
a611 9
    4.1) Why is system confused about commas, decimal points, and date formats.
    
   Check your locale configuration. PostgreSQL uses the locale setting of
   the user that ran the postmaster process. There are postgres and psql
   SET commands to control the date format. Set those accordingly for
   your operating environment.
   
    4.2) What is the exact difference between binary cursors and normal
    cursors?
d615 1
a615 1
    4.3) How do I SELECT only the first few rows of a query?
d625 1
a625 1
    4.4) How do I get a list of tables or other things I can see in psql?
d633 1
a633 1
    4.5) How do you remove a column from a table?
d642 1
a642 1
    4.6) What is the maximum size for a row, table, database?
d664 1
a664 1
    4.7) How much database disk space is required to store data from a typical
d694 1
a694 1
    4.8) How do I find out what tables or indexes are defined in the database?
d703 1
a703 1
    4.9) My queries are slow or don't make use of the indexes. Why?
d728 1
a728 1
    4.10) How do I see how the query optimizer is evaluating my query?
d732 1
a732 1
    4.11) What is an R-tree index?
d755 1
a755 1
    4.12) What is the Genetic Query Optimizer?
d761 1
a761 1
    4.13) How do I perform regular expression searches and case-insensitive
d780 1
a780 1
    4.14) In a query, how do I detect if a field is NULL?
d784 1
a784 1
    4.15) What is the difference between the various character types?
d809 1
a809 1
    4.16.1) How do I create a serial/auto-incrementing field?
d833 1
a833 1
    4.16.2) How do I get the value of a SERIAL insert?
d837 1
a837 1
   explicitly. Using the example table in 4.16.1, that might look like
d859 1
a859 1
    4.16.3) Don't currval() and nextval() lead to a race condition with other
d865 1
a865 1
    4.17) What is an OID? What is a TID?
d898 1
a898 1
    4.18) What is the meaning of some of the terms used in PostgreSQL?
d915 1
a915 1
    4.19) Why do I get the error "ERROR: Memory exhausted in AllocSetAlloc()?"
d931 1
a931 1
    4.20) How do I tell what PostgreSQL version I am running?
d935 1
a935 1
    4.21) My large-object operations get invalid large obj descriptor. Why?
d949 1
a949 1
    4.22) How do I create a column that will default to the current time?
d954 1
a954 1
    4.23) Why are my subqueries using IN so slow?
d970 1
a970 1
    4.24) How do I perform an outer join?
d1000 1
a1000 1
    4.25) How do I perform queries using multiple databases?
@


1.131
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Wed Dec 5 00:38:51 EST 2001
d376 2
a377 3
   please go to the following URL and make a donation:
   http://www.pgsql.com/pg_goodies
       
@


1.130
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Wed Dec 5 00:33:46 EST 2001
a376 1
   
d378 1
a378 1
   
d657 7
a663 7
Maximum size for a database?             unlimited (60GB databases exist)
Maximum size for a table?                16 TB
Maximum size for a row?                  unlimited in 7.1 and later
Maximum size for a field?                1GB in 7.1 and later
Maximum number of rows in a table?       unlimited
Maximum number of columns in a table?    250-1600 depending on column types
Maximum number of indexes on a table?    unlimited
@


1.129
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Dec 4 02:12:01 EST 2001
d31 1
a31 1
   1.14) How can I financially assist PostgreSQL?
d363 1
a363 1
    1.13) How can I financially assist PostgreSQL?
@


1.128
log
@Test of double-commit.
@
text
@d2 1
a2 1
                Frequently Asked Questions (FAQ) for PostgreSQL 
d4 1
a4 1
   Last updated: Wed Nov 28 16:11:32 EST 2001
@


1.127
log
@Update FAQ.
@
text
@d2 1
a2 1
                Frequently Asked Questions (FAQ) for PostgreSQL
@


1.126
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Nov 27 19:36:57 EST 2001
d567 2
a568 2
   for n seconds so you can attach with the debugger and trace through
   the startup sequence.
@


1.125
log
@Remove unused entries.
@
text
@d4 1
a4 1
   Last updated: Tue Nov 27 14:16:49 EST 2001
@


1.124
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Nov 12 02:38:47 EST 2001
d31 1
d362 22
@


1.123
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Sun Oct 14 19:27:20 EDT 2001
d941 2
a942 2
   Use now():
CREATE TABLE test (x int, modtime timestamp DEFAULT now() );
@


1.122
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Sat Oct 13 01:26:55 EDT 2001
d829 2
a830 4
    $sql = "SELECT nextval('person_id_seq')";
    $newSerialID = ($conn->selectrow_array($sql))[0];
    INSERT INTO person (id, name) VALUES ($newSerialID, 'Blaise Pascal');
    $res = $dbh->do($sql);
d841 1
a841 3
    $res = $conn->do($sql);
    $sql = "SELECT currval('person_id_seq')";
    $newSerialID = ($conn->selectrow_array($sql))[0];
@


1.121
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Fri Oct 12 23:53:35 EDT 2001
d794 4
a797 4
   VARCHAR() is best when storing variable-length strings, but you want
   to limit how long a string can be. TEXT is for strings of unlimited
   length, maximum 1 gigabyte. BYTEA is for storing binary data,
   particularly values that include NULL bytes.
@


1.120
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Fri Oct 12 23:37:30 EDT 2001
d828 3
a830 2
   this:
    $newSerialID = nextval('person_id_seq');
d832 1
d843 3
a845 1
    $newID = currval('person_id_seq');
d856 2
a857 1
   No. This is handled by the backends.
@


1.119
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Fri Oct 12 21:32:36 EDT 2001
@


1.118
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Sat Sep 22 20:07:41 EDT 2001
d792 6
@


1.117
log
@Update tab completion for \d*.
@
text
@d4 1
a4 1
   Last updated: Thu Sep 6 20:51:03 EDT 2001
@


1.116
log
@Add java mention.
@
text
@d4 1
a4 1
   Last updated: Tue Sep 4 01:14:28 EDT 2001
d560 2
a561 6
   In PostgreSQL 6.5 and up, the default limit is 32 processes. You can
   increase it by restarting the postmaster with a suitable -N value.
   With the default configuration you can set -N as large as 1024. If you
   need more, increase MAXBACKENDS in include/pg_config.h and rebuild.
   You can set the default value of -N at configuration time, if you
   like, using configure's --with-maxbackends switch.
@


1.115
log
@Rename config.h to pg_config.h and os.h to pg_config_os.h, fix a number of
places that were including the wrong files.
@
text
@d4 1
a4 1
   Last updated: Tue Aug 21 07:05:48 EDT 2001
d95 1
d563 3
a565 3
   need more, increase MAXBACKENDS in include/pg_config.h and rebuild. You
   can set the default value of -N at configuration time, if you like,
   using configure's --with-maxbackends switch.
d986 9
@


1.114
log
@Update FAQ.
@
text
@d562 1
a562 1
   need more, increase MAXBACKENDS in include/config.h and rebuild. You
@


1.113
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Aug 20 16:37:10 EDT 2001
d237 1
a237 1
   The latest release of PostgreSQL is version 7.1.2.
@


1.112
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Jul 10 21:01:47 EDT 2001
@


1.111
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Jun 18 14:55:56 EDT 2001
d652 1
a652 1
   files.
@


1.110
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Jun 11 12:27:44 EDT 2001
@


1.109
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Sat Jun 9 10:40:33 EDT 2001
d903 4
a906 3
   It is possible you have run out of virtual memory on your system, or
   your kernel has a low limit for certain resources. Try this before
   starting the postmaster:
@


1.108
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Wed May 30 19:00:33 EDT 2001
d237 1
a237 1
   The latest release of PostgreSQL is version 7.1.1.
@


1.107
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Wed May 30 18:57:52 EDT 2001
d712 1
a712 1
   Indexes are usually not used for ORDER BY or joins: a sequential scan
d714 1
a714 1
   of a large table, because it takes fewer disk accesses.
@


1.106
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue May 22 17:50:25 EDT 2001
d712 3
a714 3
   Indexes are usually not used for ORDER BY operations: a sequential
   scan followed by an explicit sort is faster than an indexscan of all
   tuples of a large table, because it takes fewer disk accesses.
@


1.105
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu May 10 21:32:49 EDT 2001
@


1.104
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Apr 26 20:55:41 EDT 2001
d77 2
a78 1
   case-insensitive regular expression searches?
d237 1
a237 1
   The latest release of PostgreSQL is version 7.1.
d755 2
a756 1
    regular expression searches?
d762 11
@


1.104.2.1
log
@Stamp for 7.1.2.  Ready when you are...
@
text
@d4 1
a4 1
   Last updated: Thu May 10 21:32:49 EDT 2001
d77 1
a77 2
   case-insensitive regular expression searches? How do I use an index
   for case-insensitive searches?
d236 1
a236 1
   The latest release of PostgreSQL is version 7.1.1.
d754 1
a754 2
    regular expression searches? How do I use an index for case-insensitive
    searches?
a759 11
   Case-insensitive equality comparisons are normally expressed as:
    SELECT *
    FROM tab
    WHERE lower(col) = 'abc'


   This will not use an standard index. However, if you create a
   functional index, it will be used:
    CREATE INDEX tabindex on tab (lower(col));


@


1.103
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Apr 26 20:22:51 EDT 2001
@


1.102
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Apr 26 20:21:34 EDT 2001
a391 3
   
   A WWW gateway based on WDB using Perl can be downloaded from
   http://www.eol.ists.ca/~dunlop/wdb-p95
@


1.101
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Mon Apr 9 15:27:47 EDT 2001
d236 1
a236 1
   The latest release of PostgreSQL is version 7.0.3.
@


1.100
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Sun Apr 8 18:51:15 EDT 2001
d441 2
a442 1
   need a minimum of ~1MB.
d456 3
a458 1
   support configured in your kernel at all.
@


1.99
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Mar 13 09:41:02 EST 2001
@


1.98
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Mar 8 11:52:03 EST 2001
@


1.97
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Oct 17 00:21:20 EDT 2000
@


1.96
log
@Update FAQ.
@
text
@d86 4
a89 2
   4.19) How do I tell what PostgreSQL version I am running?
   4.20) My large-object operations get invalid large obj descriptor.
d91 3
a93 3
   4.21) How do I create a column that will default to the current time?
   4.22) Why are my subqueries using IN so slow?
   4.23) How do I perform an outer join?
d102 1
a102 1
   5.4) I have changed a source file. Why does the recompile not see the
d888 16
a903 1
    4.19) How do I tell what PostgreSQL version I am running?
d907 1
a907 1
    4.20) My large-object operations get invalid large obj descriptor. Why?
d921 1
a921 1
    4.21) How do I create a column that will default to the current time?
d926 1
a926 1
    4.22) Why are my subqueries using IN so slow?
d942 1
a942 1
    4.23) How do I perform an outer join?
@


1.95
log
@Update FAQ.
@
text
@d86 2
a87 4
   4.19) Why do I get the error "FATAL: palloc failure: memory
   exhausted?"
   4.20) How do I tell what PostgreSQL version I am running?
   4.21) My large-object operations get invalid large obj descriptor.
d89 3
a91 3
   4.22) How do I create a column that will default to the current time?
   4.23) Why are my subqueries using IN so slow?
   4.24) How do I perform an outer join?
d97 1
a97 3
   5.2) What does the message "NOTICE:PortalHeapMemoryFree: 0x402251d0
   not in alloc set!" mean?
   5.3) How can I contribute some nifty new types and functions to
d99 2
a100 2
   5.4) How do I write a C function to return a tuple?
   5.5) I have changed a source file. Why does the recompile not see the
d886 1
a886 16
    4.19) Why do I get the error "FATAL: palloc failure: memory exhausted?"
    
   It is possible you have run out of virtual memory on your system, or
   your kernel has a low limit for certain resources. Try this before
   starting the postmaster:
    ulimit -d 65536
    limit datasize 64m

   Depending on your shell, only one of these may succeed, but it will
   set your process data segment limit much higher and perhaps allow the
   query to complete. This command applies to the current process, and
   all subprocesses created after the command is run. If you are having a
   problem with the SQL client because the backend is returning too much
   data, try it before starting the client.
   
    4.20) How do I tell what PostgreSQL version I am running?
d890 1
a890 1
    4.21) My large-object operations get invalid large obj descriptor. Why?
d904 1
a904 1
    4.22) How do I create a column that will default to the current time?
d909 1
a909 1
    4.23) Why are my subqueries using IN so slow?
d925 1
a925 1
    4.24) How do I perform an outer join?
d964 1
a964 7
    5.2) What does the message "NOTICE:PortalHeapMemoryFree: 0x402251d0 not in
    alloc set!" mean?
    
   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?
d969 1
a969 1
    5.4) How do I write a C function to return a tuple?
d974 1
a974 1
    5.5) I have changed a source file. Why does the recompile not see the
@


1.94
log
@Update FAQ.
@
text
@d760 1
a760 1
   variant of LIKE is called ILIKE and will appear in 7.1.
@


1.93
log
@Update FAQ.
@
text
@d760 1
a760 1
   variant of LIKE is called ILIKE.
@


1.92
log
@Update FAQ.
@
text
@d185 4
a188 4
   The database server can run on Windows NT, Win2k, and Win98 using
   Cygwin, the Cygnus Unix/NT porting library. See pgsql/doc/FAQ_MSWIN in
   the distribution or the MS Windows FAQ on our web site. We have no
   plan to do a native port to any Microsoft platform.
@


1.91
log
@Update FAQ.
@
text
@d185 4
a188 6
   The database server can run on Windows NT and later using Cygwin, the
   Cygnus Unix/NT porting library. See pgsql/doc/FAQ_MSWIN in the
   distribution or the MS Windows FAQ on our web site. The database
   server does not run on MS Windows 9X because Cygwin does not support
   the required features on those platforms. We have no plan to do a
   native port to any Microsoft platform.
@


1.90
log
@Update FAQ.
@
text
@d658 1
a658 1
   by a factor of four if the default block size is increased to 32k.
@


1.89
log
@Update FAQ.
@
text
@d658 1
a658 1
   by four if the default block size is increased to 32k.
@


1.88
log
@Update FAQ.
@
text
@d642 1
a642 1
Maximum size for a table?                64 TB on all operating systems
d652 7
@


1.87
log
@Update FAQ.
@
text
@d646 1
a646 1
Maximum number of columns in a table?    1600
@


1.86
log
@Update FAQ.
@
text
@d642 1
a642 1
Maximum size for a table?                unlimited on all operating systems
d644 1
d646 1
a646 1
Maximum number of columns in a table?    unlimited
d650 2
a651 1
   disk space.
@


1.85
log
@Update FAQ.
@
text
@d249 1
a249 1
   http://www.PostgreSQL.org/users-lounge/docs/postgres.
@


1.84
log
@Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.
@
text
@d12 1
a12 1
   http://www.PostgreSQL.org/docs/.
d144 2
a145 2
   Portions copyright (c) 1996-2001, PostgreSQL Global Development Group Portions Copyright
   (c) 1994-6 Regents of the University of California
d248 2
a249 1
   browse the manual online at http://www.PostgreSQL.org/docs/postgres.
@


1.83
log
@Update FAQ.
@
text
@d144 1
a144 1
   Portions copyright (c) 1996-2000, PostgreSQL, Inc Portions Copyright
@


1.82
log
@Update FAQ.
@
text
@d70 1
a70 1
   4.8) How do I find out what indices or operations are defined in the
d75 3
a77 3
   4.12) What is Genetic Query Optimization?
   4.13) How do I do regular expression searches and case-insensitive
   regular expression searches?
d93 1
a93 1
   4.24) How do I do an outer join?
d680 1
a680 2
    4.8) How do I find out what indices or operations are defined in the
    database?
d741 1
a741 1
    4.12) What is Genetic Query Optimization?
d747 2
a748 2
    4.13) How do I do regular expression searches and case-insensitive regular
    expression searches?
d751 3
a753 5
   case-insensitive regular expression matching. There is no
   case-insensitive variant of the LIKE operator, but you can get the
   effect of case-insensitive LIKE with this:
    WHERE lower(textfield) LIKE lower(pattern)

d893 3
a895 7
   all subprocessesHTML & CSS specifications are available from
   http://www.w3.org/ To learn more about Tidy see
   http://www.w3.org/People/Raggett/tidy/ Please send bug reports to Dave
   Raggett care of Lobby your company to join W3C, see
   http://www.w3.org/Consortium created after the command is run. If you
   are having a problem with the SQL client because the backend is
   returning too much data, try it before starting the client.
d936 1
a936 1
    4.24) How do I do an outer join?
@


1.81
log
@Update FAQ.
@
text
@d35 1
a35 1
   2.2) What tools are available for hooking PostgreSQL to Web pages?
d53 4
a56 5
   3.7) All my servers crash under concurrent table access. Why?
   3.8) How do I tune the database engine for better performance?
   3.9) What debugging features are available?
   3.10) I get "Sorry, too many clients" when trying to connect. Why?
   3.11) What are the pg_sorttempNNN.NN files in my database directory?
a198 3
   There is no support for PostgreSQL from the University of California,
   Berkeley. It is maintained through volunteer effort.
   
d235 1
a235 1
   A list of commercial PostgreSQL support is available at
d384 1
a384 1
    2.2) What tools are available for hooking PostgreSQL to Web pages?
d468 3
d478 1
a478 6
    3.7) All my servers crash under concurrent table access. Why?
    
   This problem can be caused by a kernel that is not configured to
   support semaphores.
   
    3.8) How do I tune the database engine for better performance?
d509 1
a509 1
    3.9) What debugging features are available?
d556 1
a556 1
    3.10) I get 'Sorry, too many clients' when trying to connect. Why?
d584 1
a584 1
    3.11) What are the pg_sorttempNNN.NN files in my database directory?
@


1.80
log
@Update FAQ.
@
text
@d977 1
a977 1
    ORDER BY tab1.col1
@


1.79
log
@Update FAQ.
@
text
@d951 2
a952 1
   PostgreSQL 7.1 and later supports outer joins. Here are two examples:
d960 6
a965 5
   These identical queries join t1.col to t2.col, and return any unjoined
   rows in t1. A RIGHT join would return unjoined rows of table t2. A
   FULL join would return unjoined rows from t1 and t2. The word OUTER is
   optional and is assumed in LEFT, RIGHT, and FULL joins. Ordinary joins
   are called INNER joins.
@


1.78
log
@Update FAQ.
@
text
@d951 5
a955 1
   PostgreSQL 7.1 and later supports outer joins. Here is an example:
d959 6
a964 5
   This will join t1.col to t2.col, and return any unjoined rows in t1
   with NULL values for t2 columns. A RIGHT join would return unjoined
   rows of table t2. A FULL join would return unjoined rows from t1 and
   t2. The word OUTER is optional and is assumed in LEFT, RIGHT, and FULL
   joins. Ordinary joins are called INNER joins.
@


1.77
log
@Update FAQ.
@
text
@d175 2
d182 1
a182 1
   library and psql.
d184 2
d188 4
a191 4
   distribution. The database server does not run on MS Windows 9X
   because Cygwin does not support the required features on those
   platforms. We have no plans to do a native port to any Microsoft
   platform.
d317 1
a317 2
          reduce lock contention. We don't have outer joins, but are
          working on them.
d765 1
a765 1
   You test the column with IS NULL and IS NOT NULL.
d902 7
a908 3
   all subprocesses created after the command is run. If you are having a
   problem with the SQL client because the backend is returning too much
   data, try it before starting the client.
d951 12
a962 4
   PostgreSQL 7.1 and later supports outer joins. In previous releases,
   outer joins can be simulated using UNION and NOT IN. For example, when
   joining tab1 and tab2, the following query does an outer join of the
   two tables:
@


1.76
log
@Update FAQ.
@
text
@d42 1
a42 2
   3.1) Why does initdb fail?
   3.2) How do I install PostgreSQL somewhere other than
d44 1
a44 1
   3.3) When I start the postmaster, I get a Bad System Call or core
d46 1
a46 1
   3.4) When I try to start the postmaster, I get IpcMemoryCreate errors.
d48 1
a48 1
   3.5) When I try to start the postmaster, I get IpcSemaphoreCreate
d50 1
a50 1
   3.6) How do I prevent other hosts from accessing my PostgreSQL
d52 6
a57 7
   3.7) Why can't I connect to my database from another machine?
   3.8) Why can't I access the database as the root user?
   3.9) All my servers crash under concurrent table access. Why?
   3.10) How do I tune the database engine for better performance?
   3.11) What debugging features are available?
   3.12) I get "Sorry, too many clients" when trying to connect. Why?
   3.13) What are the pg_sorttempNNN.NN files in my database directory?
d178 10
a187 9
   server running on one of our supported Unix platforms.
   
   A file win31.mak is included in the distribution for making a Win32
   libpq library and psql.
   
   The database server is now working on Windows NT using Cygwin, the
   Cygnus Unix/NT porting library. See pgsql/doc/FAQ_NT in the
   distribution. It does not work on MS Windows 9X because Cygwin does
   not support the features we need on those platforms.
d240 1
a240 1
   The latest release of PostgreSQL is version 7.0.2.
d427 1
a427 12
    3.1) Why does initdb fail?
    
   Try these:
     * check that you don't have any of the previous version's binaries
       in your path
     * check to see that you have the proper paths set
     * check that the postgres user owns the proper files
       
   If you see an error message about oidvector, you definately have a
   version mismatch.
   
    3.2) How do I install PostgreSQL somewhere other than /usr/local/pgsql?
d429 1
a429 4
   The simplest way is to specify the --prefix option when running
   configure. If you forgot to do that, you can edit Makefile.global and
   change POSTGRESDIR accordingly, or create a Makefile.custom and define
   POSTGRESDIR there.
d431 1
a431 1
    3.3) When I start the postmaster, I get a Bad System Call or core dumped
d438 1
a438 1
    3.4) When I try to start the postmaster, I get IpcMemoryCreate errors. Why?
d447 1
a447 1
    3.5) When I try to start the postmaster, I get IpcSemaphoreCreate errors.
d461 1
a461 1
    3.6) How do I prevent other hosts from accessing my PostgreSQL database?
d469 1
a469 1
    3.7) Why can't I connect to my database from another machine?
d476 1
a476 8
    3.8) Why can't I access the database as the root user?
    
   You should not create database users with user id 0 (root). They will
   be unable to access the database. This is a security precaution
   because of the ability of users to dynamically link object modules
   into the database engine.
   
    3.9) All my servers crash under concurrent table access. Why?
d481 1
a481 1
    3.10) How do I tune the database engine for better performance?
d512 1
a512 1
    3.11) What debugging features are available?
d559 1
a559 1
    3.12) I get 'Sorry, too many clients' when trying to connect. Why?
d587 1
a587 1
    3.13) What are the pg_sorttempNNN.NN files in my database directory?
d626 3
a628 3
   pgsql/src/bin/psql/psql.c. It contains SQL commands that generate the
   output for psql's backslash commands. You can also start psql with the
   -E option so it will print out the queries it uses to execute the
d645 2
a646 2
Maximum size for a row?                  8k, configurable to 32k
Maximum number of rows in a table?   unlimited
a652 6
   To change the maximum row size, edit include/config.h and change
   BLCKSZ. To use attributes larger than 8K, you can also use the large
   object interface.
   
   The row length limit will be removed in 7.1.
   
d944 4
a947 4
   PostgreSQL does not support outer joins in the current release. They
   can be simulated using UNION and NOT IN. For example, when joining
   tab1 and tab2, the following query does an outer join of the two
   tables:
d986 3
a988 1
   You have to do a make clean and then another make.
@


1.75
log
@Update FAQ.
@
text
@d171 4
a174 17
   The authors have compiled and tested PostgreSQL on the following
   platforms (some of these compiles require gcc):
     * aix - IBM on AIX 3.2.5 or 4.x
     * alpha - DEC Alpha AXP on Digital Unix 2.0, 3.2, 4.0
     * BSD44_derived - OSs derived from 4.4-lite BSD (NetBSD, FreeBSD)
     * bsdi - BSD/OS 2.x, 3.x, 4.x
     * dgux - DG/UX 5.4R4.11
     * hpux - HP PA-RISC on HP-UX 9.*, 10.*
     * i386_solaris - i386 Solaris
     * irix5 - SGI MIPS on IRIX 5.3
     * linux - Intel i86 Alpha SPARC PPC M68k
     * sco - SCO 3.2v5 Unixware
     * sparc_solaris - SUN SPARC on Solaris 2.4, 2.5, 2.5.1
     * sunos4 - SUN SPARC on SunOS 4.1.3
     * svr4 - Intel x86 on Intel SVR4 and MIPS
     * ultrix4 - DEC MIPS on Ultrix 4.4
       
d236 2
a237 2
   Commercial support for PostgreSQL is available at
   http://www.pgsql.com/.
@


1.74
log
@Remove obsolete claim that char(n) is more efficient than other text types.
@
text
@d217 2
a218 2
        subscribe
        end
d224 2
a225 2
        subscribe
        end
d232 2
a233 3
   
        subscribe
        end
d238 2
a239 3
   
        subscribe
        end
d285 1
a285 1
   http://members.tripod.com/er4ebus/sql/index.htm 
d559 2
a560 2
        cd /usr/local/pgsql
        ./bin/postmaster >server.log 2>&1 &
d669 5
a673 5
        SELECT ...  -- select all columns but the one you want to remove
        INTO TABLE new_table
        FROM old_table;
        DROP TABLE old_table;
        ALTER TABLE new_table RENAME TO old_table;
d681 1
a681 1
Maximum number of rows in a table?       unlimited
d799 1
a799 1
        WHERE lower(textfield) LIKE lower(pattern)
d819 2
a820 2
   bytes on disk are the length, followed by the data).  Thus the actual
   space used is slightly greater than the declared size.  However, these
d828 4
a831 4
        CREATE TABLE person (
                id   SERIAL,
                name TEXT
        );
d834 6
a839 6
        CREATE SEQUENCE person_id_seq;
        CREATE TABLE person (
                id   INT4 NOT NULL DEFAULT nextval('person_id_seq'),
                name TEXT
        );
        CREATE UNIQUE INDEX person_id_key ON person ( id );
d854 2
a855 2
        $newSerialID = nextval('person_id_seq');
        INSERT INTO person (id, name) VALUES ($newSerialID, 'Blaise Pascal');
d865 2
a866 2
        INSERT INTO person (name) VALUES ('Blaise Pascal');
        $newID = currval('person_id_seq');
d934 2
a935 2
        ulimit -d 65536
        limit datasize 64m
d965 1
a965 1
        CREATE TABLE test (x int, modtime timestamp DEFAULT now() );
d972 3
a974 3
        SELECT *
        FROM tab
        WHERE col1 IN (SELECT col2 FROM TAB2)
d977 3
a979 3
        SELECT *
        FROM tab
        WHERE EXISTS (SELECT col2 FROM TAB2 WHERE col1 = col2)
d989 8
a996 8
        SELECT tab1.col1, tab2.col2
        FROM tab1, tab2
        WHERE tab1.col1 = tab2.col1
        UNION ALL
        SELECT tab1.col1, NULL
        FROM tab1
        WHERE tab1.col1 NOT IN (SELECT tab2.col1 FROM tab2)
        ORDER BY tab1.col1
@


1.73
log
@Update FAQ.
@
text
@d814 2
a815 2
TEXT            text            length limited only by maximum row length
BYTEA           bytea           variable-length array of bytes
d821 4
a824 6
   bytes are the length, followed by the data). char(#) allocates the
   maximum number of bytes no matter how much data is stored in the
   field. text, varchar(#), and bytea all have variable length on the
   disk, and because of this, there is a small performance penalty for
   using them. Specifically, the penalty is for access to all columns
   after the first column of this type.
@


1.72
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Oct 12 17:21:11 EDT 2000
d451 3
@


1.71
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Oct 12 13:33:23 EDT 2000
d693 1
a693 1
    4.7)How much database disk space is required to store data from a typical
@


1.70
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Wed Oct 11 23:12:29 EDT 2000
@


1.69
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Fri Sep 29 23:04:02 EDT 2000
d198 4
a201 2
   The database server is now working on Windows NT using the Cygnus
   Unix/NT porting library. See pgsql/doc/FAQ_NT in the distribution.
@


1.68
log
@Update FAQ.
@
text
@d288 1
a288 1
   et al., Addison Wesley. Others like The Complete Reference SQL, Groff
@


1.67
log
@Update FAQ.
@
text
@d776 1
a776 1
   Systems"
@


1.66
log
@Update FAQ.
@
text
@d694 1
a694 1
   A PostgreSQL database may need six and a half times the disk space
d741 1
a741 1
   VACUUM ANALYZE is important for complex multi-join queries, so the
d766 2
a767 2
   point, the system can more efficient answer queries like select all
   points within a bounding rectangle.
d769 1
a769 1
   The canonical paper that describes the original R-Tree design is:
d771 1
a771 1
   Guttman, A. "R-Trees: A Dynamic Index Structure for Spatial
d778 1
a778 1
   Builtin R-Trees can handle polygons and boxes. In theory, R-trees can
d780 1
a780 1
   extending R-trees require a bit of work and we don't currently have
d787 1
a787 1
   join queries through non-exhaustive search.
d792 2
a793 2
   The ~ operator does regular-expression matching, and ~* does
   case-insensitive regular-expression matching. There is no
d815 1
a815 1
   The last four types above are "varlena" types (i.e. the first four
d858 1
a858 1
   that the name of the automatically-created SEQUENCE object will be
d862 2
a863 2
   Alternatively, you could retrieve the just-assigned SERIAL value with
   the currval() function after it was inserted by default, e.g.,
d868 1
a868 1
   lookup the default value, though this is probably the least portable
d883 2
a884 2
   user-created OIDs are equal or greater that this. By default, all
   these OIDs are unique not only within a table, or database, but unique
d968 2
a969 2
   Currently, we join subqueries to outer queries by sequential scanning
   the result of the subquery for each row of the outer query. A
d1004 1
a1004 1
   function in a stand alone test program first.
@


1.65
log
@Update FAQ.
@
text
@d679 1
a679 1
Maximum number of columns table?         unlimited
@


1.64
log
@Update FAQ.
@
text
@d608 3
a610 3
   include the maximum size of shared memory blocks, SHMMAX, the maximum
   number of semaphores, SEMMNS and SEMMNI, the maximum number of
   processes, NPROC, the maximum number of processes per user, MAXUPRC,
@


1.63
log
@Update FAQ.
@
text
@d262 1
a262 1
   browse the manual on-line at http://www.PostgreSQL.org/docs/postgres.
@


1.62
log
@Update FAQ.
@
text
@d128 1
a128 1
   others have contributed to the porting, testing, debugging and
d143 1
a143 1
   PostgreSQL is subject to the following COPYRIGHT.
d204 1
a204 1
   ftp://ftp.PostgreSQL.org/pub. For mirror sites, see our main web site.
d270 1
a270 1
   Our web site contains even more documentation.
d298 1
a298 1
   documentation on our web site, or in the distribution. Second,
d347 1
a347 1
          profiling and source code analysis. There is an interesting web
d406 1
a406 1
   For web integration, PHP is an excellent interface. It is at
d419 1
a419 1
   generator. The web page is http://www.flex.ro/pgaccess
@


1.61
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Thu Jul 27 12:52:35 EDT 2000
d925 3
@


1.60
log
@Update FAQ.
@
text
@d961 1
a961 1
        CREATE TABLE test (x int, modtime timestamp default now() );
@


1.59
log
@Update FAQ.
@
text
@d409 1
a409 1
   For complex cases, many use the perl interface and CGI.pm.
d411 1
a411 1
   A WWW gateway based on WDB using perl can be downloaded from
d869 1
a869 1
   approach. In perl, using DBI with Edmund Mergl's DBD::Pg module, the
@


1.58
log
@Update FAQ.
@
text
@d281 1
@


1.57
log
@Update FAQ.
@
text
@d286 3
a288 3
   Many of our users like The Practical SQL Handbook, Bowman et al.,
   Addison Wesley. Others like The Complete Reference SQL, Groff et al.,
   McGraw-Hill.
@


1.56
log
@Update FAQ.
@
text
@a280 1
   http://w3.one.net/~jhoffman/sqltut.htm and at
@


1.55
log
@Update FAQ.
@
text
@d904 1
a904 1
   one has reported this every happening, and we plan to have the limit
@


1.54
log
@Update FAQ.
@
text
@d903 4
@


1.53
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Wed Jul 26 13:33:21 EDT 2000
d229 1
a229 1
   email to bugs-request@@PostgreSQL.org with a body of:
d235 2
a236 2
   subscribe to this list, send email to hackers-request@@PostgreSQL.org
   with a body of:
d310 2
a311 1
   Fill out the "bug-template" file and send it to: bugs@@PostgreSQL.org
@


1.52
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Fri Jun 2 11:32:13 EDT 2000
d11 2
a12 11
   Linux-specific questions are answered in
   http://www.PostgreSQL.org/docs/faq-linux.html.
   
   HPUX-specific questions are answered in
   http://www.PostgreSQL.org/docs/faq-hpux.html.
   
   Solaris-specific questions are answered in
   http://www.PostgreSQL.org/docs/faq-solaris.html.
   
   Irix-specific questions are answered in
   http://www.PostgreSQL.org/docs/faq-irix.html.
d80 1
a80 1
   regular expression searching?
d121 5
a125 5
   PostgreSQL development is being performed by a team of Internet
   developers who all subscribe to the PostgreSQL development mailing
   list. The current coordinator is Marc G. Fournier
   (scrappy@@PostgreSQL.org). (See below on how to join). This team is now
   responsible for all development of PostgreSQL.
d208 2
a209 2
   There is no official support for PostgreSQL from the University of
   California, Berkeley. It is maintained through volunteer effort.
d408 1
a408 2
   PHP is great for simple stuff, but for more complex cases, many use
   the perl interface and CGI.pm.
d426 9
a434 9
     * C(libpq)
     * C++(libpq++)
     * Embedded C(ecpg)
     * Java(jdbc)
     * Perl(perl5)
     * ODBC(odbc)
     * Python(PyGreSQL)
     * TCL(libpgtcl)
     * C Easy API(libpgeasy)
d625 3
a627 3
   The temp files should be deleted automatically, but might not if a
   backend crashes during a sort. If you have no backends running at the
   time, it is safe to delete the pg_tempNNN.NN files.
d789 1
a789 1
    expression searching?
@


1.51
log
@Update FAQ.
@
text
@d93 1
a93 1
   4.16.2) How do I get the value of a serial insert?
d95 2
a96 2
   other concurrent backend processes?
   4.17) What is an oid? What is a tid?
d111 2
a112 2
   5.2) What does the message: NOTICE:PortalHeapMemoryFree: 0x402251d0
   not in alloc set! mean?
d116 2
a117 2
   5.5) I have changed a source file. Why does the recompile does not see
   the change?
d222 2
a223 2
   subscribe, send a mail with the lines in the body (not the subject
   line)
d283 2
a284 2
   PostgreSQL supports an extended subset of SQL-92. See our TODO for a
   list of known bugs, missing features, and future plans.
d306 1
a306 1
   First, download the latest sources and read the PostgreSQL Developers
d313 3
a315 3
   patches that it was a pain for the existing committers to keep up, and
   we had confidence that patches they committed were likely to be of
   high quality.
d336 1
a336 1
          working on them for our next release.
d445 1
a445 1
     * Embedded HTML(PHP from http://www.php.net)
d477 3
a479 3
   many buffers and backend processes you configure postmaster to run
   with. For most systems, with default numbers of buffers and processes,
   you need a minimum of ~1MB.
d514 1
a514 1
   because of the ability of any user to dynamically link object modules
d536 3
a538 3
   There are several tuning things that can be done. You can disable
   fsync() by starting the postmaster with a -o -F option. This will
   prevent fsync()'s from flushing to disk after every transaction.
d551 1
a551 1
   an index. See the cluster(l) manual page for more details.
d632 2
a633 2
   requires more space than the backend's -S parameter allows, then temp
   files are created to hold the extra data.
d698 1
a698 1
   Row length limit will be removed in 7.1.
d850 1
a850 1
   sequences. You can also use each row's oid field as a unique value.
d852 1
a852 1
   pg_dump's -o option or COPY WITH OIDS option to preserve the oids.
d856 1
a856 1
    4.16.2) How do I get the back the generated SERIAL value after an insert?
d876 1
a876 1
   Finally, you could use the oid returned from the INSERT statement to
d883 1
a883 1
    concurrent backend processes?
d887 1
a887 1
    4.17) What is an oid? What is a tid?
d890 1
a890 1
   created in PostgreSQL gets a unique oid. All oids generated during
d892 2
a893 2
   user-created oids are equal or greater that this. By default, all
   these oids are unique not only within a table, or database, but unique
d896 4
a899 4
   PostgreSQL uses oids in its internal system tables to link rows
   between tables. These oids can be used to identify specific user rows
   and used in joins. It is recommended you use column type oid to store
   oid values. You can create an index on the oid field for faster
d903 2
a904 2
   all databases. If you want to change the oid to something else, or if
   you want to make a copy of the table, with the original oid's, there
d912 1
a912 1
   Tids are used to identify specific physical rows with block and offset
d926 1
a926 1
     * oid, serial value
d972 1
a972 1
   workaround is to replace IN with EXISTS. For example, change:
d1008 2
a1009 2
    5.2) What does the message: NOTICE:PortalHeapMemoryFree: 0x402251d0 not in
    alloc set! mean?
d1024 1
a1024 1
    5.5) I have changed a source file. Why does the recompile does not see the
d1028 1
a1028 2
   You have to do a make clean and then another make. You have to do a
   make clean and then another make.
@


1.50
log
@Update FAQ.
@
text
@d8 2
a9 2
   The most recent version of this document can be viewed at the
   PostgreSQL Web site, http://www.PostgreSQL.org.
d31 3
a33 3
   1.6) Where can I get support for PostgreSQL?
   1.7) What is the latest release of PostgreSQL?
   1.8) What documentation is available for PostgreSQL?
d56 2
a57 2
   3.4) When I try to start the postmaster, I get IpcMemoryCreate
   errors3. Why?
d66 3
a68 3
   3.11) What debugging features are available in PostgreSQL?
   3.12) I get 'Sorry, too many clients' when trying to connect. Why?
   3.13) What are the pg_psort.XXX files in my database directory?
d72 2
a73 2
   4.1) The system seems to be confused about commas, decimal points, and
   date formats.
d76 2
a77 2
   4.3) How do I select only the first few rows of a query?
   4.4) How do I get a list of tables, or other things I can see in psql?
d81 1
a81 1
   typical flat file?
d89 1
a89 1
   regexp searching?
d113 1
a113 1
   5.3) How can I contribute some nifty new types and functions for
d134 1
a134 1
   responsible for all current and future development of PostgreSQL.
d208 1
a208 1
   Unix/NT porting library. See pgsql/doc/README.NT in the distribution.
d215 1
a215 1
    1.6) Where can I get support for PostgreSQL?
d261 1
a261 1
    1.7) What is the latest release of PostgreSQL?
d267 1
a267 1
    1.8) What documentation is available for PostgreSQL?
a271 1
   in the distribution.
d273 2
a274 2
   There is a PostgreSQL book availiable at
   http://www.PostgreSQL.org/docs/awbook.html
d279 1
a279 1
   The web site contains even more documentation.
d312 4
a315 4
   PostgreSQL CVS archive. All of them have submitted so many
   high-quality patches that it was a pain for the existing committers to
   keep up, and we had confidence that patches they committed were likely
   to be of high quality.
d349 1
a349 2
          data integrity within 30 seconds of an OS crash. The mode is
          select-able by the database administrator.
d394 1
a394 1
   can be gotten from: ftp://ftp.PostgreSQL.org/pub/odbc/index.html
d414 1
a414 1
   For web integration, PHP is an excellent interface. It is at:
d474 6
a479 6
   You either do not have shared memory configured properly in kernel or
   you need to enlarge the shared memory available in the kernel. The
   exact amount you need depends on your architecture and how many
   buffers and backend processes you configure postmaster to run with.
   For most systems, with default numbers of buffers and processes, you
   need a minimum of ~1MB.
d508 1
a508 2
   host entry to the file pgsql/data/pg_hba.conf. See the pg_hba.conf
   manual page.
d529 5
a533 5
   batch using the COPY command. This is much faster than single
   individual INSERTS. Second, statements not in a BEGIN WORK/COMMIT
   transaction block are considered to be in their own transaction.
   Consider performing several statements in a single transaction block.
   This reduces the transaction overhead. Also consider dropping and
d542 1
a542 1
   parameter too high, the postmaster may not start up because you've
d550 2
a551 2
   You can also use the CLUSTER command to group data in base tables to
   match an index. See the cluster(l) manual page for more details.
d553 1
a553 1
    3.11) What debugging features are available in PostgreSQL?
d607 1
a607 1
   With the default configuration you can set -N as large as 1024; if you
d622 1
a622 1
   is so that you can ensure that your system won't run out of resources.
d628 1
a628 1
    3.13) What are the pg_tempNNN.NN files in my database directory?
d635 3
a637 3
   The temp files should go away automatically, but might not if a
   backend crashes during a sort. If you have no transactions running at
   the time, it is safe to delete the pg_tempNNN.NN files.
d642 1
a642 2
    4.1) The system seems to be confused about commas, decimal points, and date
    formats.
d644 4
a647 4
   Check your locale configuration. PostgreSQL uses the locale settings
   of the user that ran the postmaster process. There are postgres and
   psql SET commands to control the date format. Set those accordingly
   for your operating environment.
d664 1
a664 1
    4.4) How do I get a list of tables, or other information I see in psql?
d666 5
a670 4
   You can read the source code for psql, file pgsql/src/bin/psql/psql.c.
   It contains SQL commands that generate the output for psql's backslash
   commands. You can also start psql with the -E option so that it will
   print out the queries it uses to execute the commands you give.
d701 1
a701 1
    flat file?
d703 2
a704 2
   A PostgreSQL database can require about six and a half times the disk
   space required to store the data in a flat file.
d727 1
a727 1
   Indexes do not contain as much overhead, but do contain the data that
d742 6
a747 6
   PostgreSQL does not automatically maintain statistics. One has to make
   an explicit VACUUM call to update the statistics. After statistics are
   updated, the optimizer knows how many rows in the table, and can
   better decide if it should use indices. Note that the optimizer does
   not use indices in cases when the table is small because a sequential
   scan would be faster.
d794 3
a796 6
   The GEQO module in PostgreSQL is intended to solve the query
   optimization problem of joining many tables by means of a Genetic
   Algorithm (GA). It allows the handling of large join queries through
   non-exhaustive search.
   
   For further information see the documentation.
d798 2
a799 2
    4.13) How do I do regular expression searches and case-insensitive regexp
    searching?
d834 1
a834 1
   PostgreSQL supports SERIAL data type. It auto-creates a sequence and
d858 4
a861 4
   Probably the simplest approach is to to retrieve the next SERIAL value
   from the sequence object with the nextval() function before inserting
   and then insert it explicitly. Using the example table in 4.16.1, that
   might look like this:
d871 2
a872 2
   Similarly, you could retrieve the just-assigned SERIAL value with the
   currval() function after it was inserted by default, e.g.,
d885 1
a885 1
   No. That has been handled by the backends.
d889 1
a889 1
   Oids are PostgreSQL's answer to unique row ids. Every row that is
d899 2
a900 2
   oid values. See the sql(l) manual page to see the other internal
   columns. You can create an index on the oid field for faster access.
d907 1
a907 1
        SELECT INTO new SELECT old_oid, mycol FROM old;
d954 5
a958 6
   Current PostgreSQL enforces the rule by closing large object handles
   at transaction commit, which will be instantly upon completion of the
   lo_open command if you are not inside a transaction. So the first
   attempt to do anything with the handle will draw invalid large obj
   descriptor. So code that used to work (at least most of the time) will
   now generate that error message if you fail to use a transaction.
d1014 1
a1014 2
    5.3) How can I contribute some nifty new types and functions for
    PostgreSQL?
@


1.49
log
@Update FAQ.
@
text
@d9 1
a9 1
   postgreSQL Web site, http://www.PostgreSQL.org.
d18 1
a18 1
   http://www.postgresql.org/docs/faq-solaris.html.
d133 1
a133 1
   (scrappy@@postgreSQL.org). (See below on how to join). This team is now
d213 1
a213 3
   ftp://ftp.postgreSQL.org/pub
   
   For mirror sites, see our main web site.
d220 1
a220 1
   The main mailing list is: pgsql-general@@postgreSQL.org. It is
d227 1
a227 1
   to pgsql-general-request@@postgreSQL.org.
d230 1
a230 1
   email to: pgsql-general-digest-request@@postgreSQL.org with a body of:
d238 1
a238 1
   email to bugs-request@@postgreSQL.org with a body of:
d244 1
a244 1
   subscribe to this list, send email to hackers-request@@postgreSQL.org
d253 1
a253 1
     http://www.postgreSQL.org
d271 1
a271 1
   browse the manual on-line at http://www.postgresql.org/docs/postgres.
d275 1
a275 1
   http://www.postgresql.org/docs/awbook.html
d289 1
a289 1
   The PostgreSQL book at http://www.postgresql.org/docs/awbook.html
d320 1
a320 1
   Fill out the "bug-template" file and send it to: bugs@@postgreSQL.org
d322 1
a322 1
   Also check out our ftp site ftp://ftp.postgreSQL.org/pub to see if
d396 1
a396 1
   can be gotten from: ftp://ftp.postgresql.org/pub/odbc/index.html
@


1.48
log
@Update FAQ.
@
text
@d255 1
a255 1
     http://postgreSQL.org
d456 1
d473 1
a473 1
   have system V extensions installed in your kernel. PostgreSQL requires
d610 1
a610 1
   In Postgres 6.5 and up, the default limit is 32 processes. You can
d626 1
a626 1
   that Postgres has a limit on the number of allowed backend processes
d629 3
a631 3
   In Postgres versions prior to 6.5, the maximum number of backends was
   64, and changing it required a rebuild after altering the MaxBackendId
   constant in include/storage/sinvaladt.h.
d708 1
a708 1
   A Postgres database can require about six and a half times the disk
d776 1
a776 1
   An r-tree index is used for indexing spatial data. A hash index can't
d843 1
a843 1
   index on the column. For example, this...
d849 1
a849 1
   ...is automatically translated into this...
d862 1
a862 1
   For more details, see Bruce Momjian's chapter on Numbering Rows.
@


1.47
log
@Update FAQ.
@
text
@d261 1
a261 1
   http://www.pgsql.com/
d314 1
a314 1
   There are about a dozen people who have COMMIT privileges to the
@


1.46
log
@Update FAQ.
@
text
@d258 1
a258 1
   unix command irc -c '#PostgreSQL' "$USER" irc.phoenix.net
@


1.45
log
@Update FAQ.
@
text
@d240 1
a240 1
   email to bugs-request@@postgreSQL.org with a BODY of:
d247 1
a247 1
   with a BODY of:
@


1.44
log
@Update FAQ.
@
text
@d232 1
a232 1
   email to: pgsql-general-digest-request@@postgreSQL.org with a BODY of:
@


1.43
log
@Update FAQ.
@
text
@a209 4
   There is also a web page at
   http://www.freebsd.org/~kevlo/postgres/portNT.html. There is another
   port using U/Win at http://surya.wipro.com/uwin/ported.html.
   
@


1.42
log
@Update FAQ.
@
text
@d338 5
a342 5
          DBMS's, like transactions, subselects, triggers, views, and
          sophisticated locking. We have some features they don't have,
          like user-defined types, inheritance, rules, and multi-version
          concurrency control to reduce lock contention. We don't have
          foreign key referential integrity or outer joins, but are
d399 1
a399 1
   There are two ODBC drivers available, PostODBC and OpenLink ODBC.
d401 2
a402 2
   PostODBC is included in the distribution. More information about it
   can be gotten from: http://www.insightdist.com/psqlodbc
d413 2
d977 1
a977 1
   This way always works:
a978 3

   In releases 7.0 and later, you may use:
        create table test (x int, modtime timestamp default 'now');
@


1.41
log
@Update FAQ.
@
text
@d105 1
d996 15
@


1.40
log
@Update HISTORY file for 7.0.
@
text
@d4 1
a4 1
   Last updated: Tue Mar 21 16:09:11 EST 2000
d14 6
a21 3
   
   HPUX-specific questions are answered in
   http://www.PostgreSQL.org/docs/faq-hpux.shtml.
a68 1
   3.14) How do I set up a pg_group?
d94 2
a95 2
   4.16.3) Wouldn't use of currval() and nextval() lead to a race
   condition with other concurrent backend processes?
d109 1
a109 1
   it dumps core?
d147 2
d268 1
a268 1
   The latest release of PostgreSQL is version 6.5.2.
d275 6
a280 1
   included in the distribution. See the /doc directory.
d294 4
a297 3
   There is a nice tutorial at http://w3.one.net/~jhoffman/sqltut.htm and
   at
   http://ourworld.compuserve.com/homepages/Graeme_Birchall/HTM_COOK.HTM.
d303 2
a304 2
   Addison Wesley. Others like Lan Times Guide to SQL, Groff et al.,
   Osborne McGraw-Hill.
d362 3
a364 1
          profiling and source code analysis.
d449 1
a449 1
     * A crude C/4GL(contrib/pginterface)
d458 1
a458 2
       in your path (If you see the message WARN:heap_modifytuple: repl
       is \ 9, this is the problem.)
d473 1
a473 1
   have system V extensions installed on your kernel. PostgreSQL requires
d502 1
a502 1
   using unix domain sockets. Other machines will not be able to connect
d552 2
a553 4
   of memory used by each backend process for temporary sorts. The -S
   value is measured in kilobytes, and the default is 512 (ie, 512K). It
   is unwise to make this value too large, or you may run out of memory
   when a query invokes several concurrent sorts.
d580 16
a595 9
   You can actually run the postgres backend from the command line, and
   type your SQL statement directly. This is recommended only for
   debugging purposes. Note that a newline terminates the query, not a
   semicolon. If you have compiled with debugging symbols, you can use a
   debugger to see what is happening. Because the backend was not started
   from the postmaster, it is not running in an identical environment and
   locking/backend interaction problems may not be duplicated. Some
   operating system can attach to a running backend directly to diagnose
   problems.
d603 1
a603 1
   in the current directory.
d610 18
a627 17
   In Postgres 6.5.*, the default limit is 32 processes. You can increase
   it by restarting the postmaster with a suitable -N value. With the
   default configuration you can set -N as large as 1024; if you need
   more, increase MAXBACKENDS in include/config.h and rebuild. You can
   set the default value of -N at configuration time, if you like, using
   configure's --with-maxbackends switch.
   
   Note that if you make -N larger than 32, you should consider
   increasing -B beyond its default of 64. For large numbers of backend
   processes, you are also likely to find that you need to increase
   various Unix kernel configuration parameters. Things to check include
   the maximum size of shared memory blocks, SHMMAX, the maximum number
   of semaphores, SEMMNS and SEMMNI, the maximum number of processes,
   NPROC, the maximum number of processes per user, MAXUPRC, and the
   maximum number of open files, NFILE and NINODE. The reason that
   Postgres has a limit on the number of allowed backend processes is so
   that you can ensure that your system won't run out of resources.
a642 19
   
    3.14) How do I set up a pg_group?
    
   Currently, there is no easy interface to set up user groups. You have
   to explicitly insert/update the pg_group table. For example:
        jolly=> insert into pg_group (groname, grosysid, grolist)
        jolly=>     values ('posthackers', '1234', '{5443, 8261}');
        INSERT 548224
        jolly=> grant insert on foo to group posthackers;
        CHANGE
        jolly=>

   The fields in pg_group are:
     * groname: the group name. This a name and should be purely
       alphanumeric. Do not include underscores or other punctuation.
     * grosysid: the group id. This is an int4. This should be unique for
       each group.
     * grolist: the list of pg_user id's that belong in the group. This
       is an int4[].
d674 2
a675 3
   commands. Beginning in Postgres 6.5, you can also start psql with the
   -E option so that it will print out the queries it uses to execute the
   commands you give.
d688 14
a701 3
   Rows are limited to 8K bytes, but this can be changed by editing
   include/config.h and changing BLCKSZ. To use attributes larger than
   8K, you can also use the large object interface.
d703 1
a703 5
   Rows do not cross 8k boundaries so a 5k row will require 8k of
   storage.
   
   Table and database sizes are unlimited. There are many databases that
   are tens of gigabytes, and probably some that are hundreds.
d761 3
a763 1
   Indexes are not used for ORDER BY operations.
d767 2
a768 3
   string. So, to use indices, LIKE searches can should not begin with %,
   and ~(regular expression searches) should start with ^. If you have
   locale enabled, indexes can't be used for wild-card searches.
d809 6
a814 2
   ~ and ~* are probably what you want. See psql's \do command.
   
d823 1
a823 1
CHAR            char            1 character
d829 2
a830 1
   You need to use the internal name when doing internal operations.
d890 2
a891 2
    4.16.3) Wouldn't use of currval() and nextval() lead to a race condition
    with other concurrent backend processes?
a961 4
   The documentation has always stated that lo_open must be wrapped in a
   transaction, but PostgreSQL versions prior to 6.5 didn't enforce that
   rule. Instead, they'd just fail occasionally if you broke it.
   
d974 4
a977 1
   The tempation is to do:
a979 8
   but this makes the column default to the time of table creation, not
   the time of row insertion. Instead do:
        CREATE TABLE test (x int, modtime timestamp default now() );

   The calling of the function now() prevents the default value from
   being computed at table creation time, and delays it until insertion
   time. We believe this will not be a problem in post-6.5.* releases.
   
d1003 1
a1003 3
   function in a stand alone test program first. Also, make sure you are
   not sending elog NOTICES when the front-end is expecting data, such as
   during a type_in() or type_out() functions
d1026 2
a1027 1
   You have to do a make clean and then another make.
@


1.40.2.1
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Fri Jun 2 11:32:13 EDT 2000
a13 6
   HPUX-specific questions are answered in
   http://www.PostgreSQL.org/docs/faq-hpux.html.
   
   Solaris-specific questions are answered in
   http://www.postgresql.org/docs/faq-solaris.html.
   
d16 3
d66 1
d92 2
a93 2
   4.16.3) Don't currval() and nextval() lead to a race condition with
   other concurrent backend processes?
d107 1
a107 1
   it dump core?
a144 2
   It is pronounced Post-Gres-Q-L.
   
d264 1
a264 1
   The latest release of PostgreSQL is version 7.0.2.
d271 1
a271 6
   included in the distribution. See the /doc directory. You can also
   browse the manual on-line at http://www.postgresql.org/docs/postgres.
   in the distribution.
   
   There is a PostgreSQL book availiable at
   http://www.postgresql.org/docs/awbook.html
d285 3
a287 4
   The PostgreSQL book at http://www.postgresql.org/docs/awbook.html
   teaches SQL. There is a nice tutorial at
   http://w3.one.net/~jhoffman/sqltut.htm and at
   http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM.
d293 2
a294 2
   Addison Wesley. Others like The Complete Reference SQL, Groff et al.,
   McGraw-Hill.
d352 1
a352 3
          profiling and source code analysis. There is an interesting web
          page comparing PostgreSQL to MySQL at
          http://openacs.org/why-not-mysql.html
d437 1
a437 1
     * C Easy API(libpgeasy)
d446 2
a447 1
       in your path
d462 1
a462 1
   have system V extensions installed in your kernel. PostgreSQL requires
d491 1
a491 1
   using Unix domain sockets. Other machines will not be able to connect
d541 4
a544 2
   of memory used by the backend process for temporary sorts. The -S
   value is measured in kilobytes, and the default is 512 (ie, 512K).
d571 9
a579 16
   If the postmaster is not running, you can actually run the postgres
   backend from the command line, and type your SQL statement directly.
   This is recommended only for debugging purposes. Note that a newline
   terminates the query, not a semicolon. If you have compiled with
   debugging symbols, you can use a debugger to see what is happening.
   Because the backend was not started from the postmaster, it is not
   running in an identical environment and locking/backend interaction
   problems may not be duplicated.
   
   If the postmaster is running, start psql in one window, then find the
   PID of the postgres process used by psql. Use a debugger to attach to
   the postgres PID. You can set breakpoints in the debugger and issue
   queries from psql. If you are debugging postgres startup, you can set
   PGOPTIONS="-W n", then start psql. This will cause startup to delay
   for n seconds so you can attach with the debugger and trace through
   the startup sequence.
d587 1
a587 1
   in the client's current directory.
d594 17
a610 18
   In Postgres 6.5 and up, the default limit is 32 processes. You can
   increase it by restarting the postmaster with a suitable -N value.
   With the default configuration you can set -N as large as 1024; if you
   need more, increase MAXBACKENDS in include/config.h and rebuild. You
   can set the default value of -N at configuration time, if you like,
   using configure's --with-maxbackends switch.
   
   Note that if you make -N larger than 32, you must also increase -B
   beyond its default of 64; -B must be at least twice -N, and probably
   should be more than that for best performance. For large numbers of
   backend processes, you are also likely to find that you need to
   increase various Unix kernel configuration parameters. Things to check
   include the maximum size of shared memory blocks, SHMMAX, the maximum
   number of semaphores, SEMMNS and SEMMNI, the maximum number of
   processes, NPROC, the maximum number of processes per user, MAXUPRC,
   and the maximum number of open files, NFILE and NINODE. The reason
   that Postgres has a limit on the number of allowed backend processes
   is so that you can ensure that your system won't run out of resources.
d626 19
d676 3
a678 2
   commands. You can also start psql with the -E option so that it will
   print out the queries it uses to execute the commands you give.
d691 3
a693 14
   These are the limits:
Maximum size for a database?             unlimited (60GB databases exist)
Maximum size for a table?                unlimited on all operating systems
Maximum size for a row?                  8k, configurable to 32k
Maximum number of rows in a table?       unlimited
Maximum number of columns table?         unlimited
Maximum number of indexes on a table?    unlimited

   Of course, these are not actually unlimited, but limited to available
   disk space.
   
   To change the maximum row size, edit include/config.h and change
   BLCKSZ. To use attributes larger than 8K, you can also use the large
   object interface.
d695 5
a699 1
   Row length limit will be removed in 7.1.
d757 1
a757 3
   Indexes are usually not used for ORDER BY operations: a sequential
   scan followed by an explicit sort is faster than an indexscan of all
   tuples of a large table, because it takes fewer disk accesses.
d761 3
a763 2
   string. So, to use indices, LIKE searches should not begin with %, and
   ~(regular expression searches) should start with ^.
d804 2
a805 6
   The ~ operator does regular-expression matching, and ~* does
   case-insensitive regular-expression matching. There is no
   case-insensitive variant of the LIKE operator, but you can get the
   effect of case-insensitive LIKE with this:
        WHERE lower(textfield) LIKE lower(pattern)

d814 1
a814 1
"char"          char            1 character
d820 1
a820 2
   You will see the internal name when examining system catalogs and in
   some error messages.
d880 2
a881 2
    4.16.3) Don't currval() and nextval() lead to a race condition with other
    concurrent backend processes?
d952 4
d968 5
a972 1
   This way always works:
d975 4
a978 3
   In releases 7.0 and later, you may use:
        create table test (x int, modtime timestamp default 'now');

d1002 3
a1004 1
   function in a stand alone test program first.
d1027 1
a1027 2
   You have to do a make clean and then another make. You have to do a
   make clean and then another make.
@


1.40.2.2
log
@Update FAQ.
@
text
@a104 1
   4.24) How do I do an outer join?
d337 5
a341 5
          DBMS's, like transactions, subselects, triggers, views, foreign
          key referential integrity, and sophisticated locking. We have
          some features they don't have, like user-defined types,
          inheritance, rules, and multi-version concurrency control to
          reduce lock contention. We don't have outer joins, but are
d398 1
a398 1
   There are two ODBC drivers available, PsqlODBC and OpenLink ODBC.
d400 2
a401 2
   PsqlODBC is included in the distribution. More information about it
   can be gotten from: ftp://ftp.postgresql.org/pub/odbc/index.html
a411 2
   See also the ODBC chapter of the Programmer's Guide.
   
d974 1
a974 1
   Use now():
d977 3
a994 15
   
    4.24) How do I do an outer join?
    
   PostgreSQL does not support outer joins in the current release. They
   can be simulated using UNION and NOT IN. For example, when joining
   tab1 and tab2, the following query does an outer join of the two
   tables:
        SELECT tab1.col1, tab2.col2
        FROM tab1, tab2
        WHERE tab1.col1 = tab2.col1
        UNION ALL
        SELECT tab1.col1, NULL
        FROM tab1
        WHERE tab1.col1 NOT IN (SELECT tab2.col1 FROM tab2)
        ORDER BY tab1.col1
@


1.40.2.3
log
@Brand 7.0.3.
@
text
@d4 1
a4 1
   Last updated: Tue Oct 17 00:21:20 EDT 2000
d8 2
a9 2
   The most recent version of this document can be viewed at
   http://www.PostgreSQL.org/docs/faq-english.html.
d11 11
a21 2
   Platform-specific questions are answered at
   http://www.PostgreSQL.org/docs/.
d31 3
a33 3
   1.6) Where can I get support?
   1.7) What is the latest release?
   1.8) What documentation is available?
d56 2
a57 2
   3.4) When I try to start the postmaster, I get IpcMemoryCreate errors.
   Why?
d66 3
a68 3
   3.11) What debugging features are available?
   3.12) I get "Sorry, too many clients" when trying to connect. Why?
   3.13) What are the pg_sorttempNNN.NN files in my database directory?
d72 2
a73 2
   4.1) Why is the system confused about commas, decimal points, and date
   formats.
d76 2
a77 2
   4.3) How do I SELECT only the first few rows of a query?
   4.4) How do I get a list of tables or other things I can see in psql?
d81 1
a81 1
   typical text file?
d89 1
a89 1
   regular expression searches?
d93 1
a93 1
   4.16.2) How do I get the value of a SERIAL insert?
d95 2
a96 2
   other users?
   4.17) What is an OID? What is a TID?
d111 3
a113 3
   5.2) What does the message "NOTICE:PortalHeapMemoryFree: 0x402251d0
   not in alloc set!" mean?
   5.3) How can I contribute some nifty new types and functions to
d116 2
a117 2
   5.5) I have changed a source file. Why does the recompile not see the
   change?
d130 5
a134 5
   PostgreSQL development is performed by a team of Internet developers
   who all subscribe to the PostgreSQL development mailing list. The
   current coordinator is Marc G. Fournier (scrappy@@PostgreSQL.org). (See
   below on how to join). This team is now responsible for all
   development of PostgreSQL.
d137 1
a137 1
   others have contributed to the porting, testing, debugging, and
d152 1
a152 1
   PostgreSQL is subject to the following COPYRIGHT:
d207 6
a212 4
   The database server is now working on Windows NT using Cygwin, the
   Cygnus Unix/NT porting library. See pgsql/doc/FAQ_NT in the
   distribution. It does not work on MS Windows 9X because Cygwin does
   not support the features we need on those platforms.
d217 1
a217 1
   ftp://ftp.PostgreSQL.org/pub. For mirror sites, see our main Web site.
d219 3
a221 1
    1.6) Where can I get support?
d223 2
a224 2
   There is no support for PostgreSQL from the University of California,
   Berkeley. It is maintained through volunteer effort.
d226 1
a226 1
   The main mailing list is: pgsql-general@@PostgreSQL.org. It is
d228 2
a229 2
   subscribe, send mail with the following lines in the body (not the
   subject line)
d233 1
a233 1
   to pgsql-general-request@@PostgreSQL.org.
d236 1
a236 1
   email to: pgsql-general-digest-request@@PostgreSQL.org with a body of:
d244 1
a244 1
   email to pgsql-bugs-request@@PostgreSQL.org with a body of:
d250 2
a251 2
   subscribe to this list, send email to
   pgsql-hackers-request@@PostgreSQL.org with a body of:
d259 1
a259 1
     http://www.PostgreSQL.org
d262 1
a262 1
   unix command irc -c '#PostgreSQL' "$USER" irc.phoenix.net.
d265 1
a265 1
   http://www.pgsql.com/.
d267 1
a267 1
    1.7) What is the latest release?
d273 1
a273 1
    1.8) What documentation is available?
d277 2
a278 1
   browse the manual online at http://www.PostgreSQL.org/docs/postgres.
d280 2
a281 2
   There is a PostgreSQL book available at
   http://www.PostgreSQL.org/docs/awbook.html.
d286 1
a286 1
   Our Web site contains even more documentation.
d290 2
a291 2
   PostgreSQL supports an extended subset of SQL-92. See our TODO list
   for known bugs, missing features, and future plans.
d295 1
a295 1
   The PostgreSQL book at http://www.PostgreSQL.org/docs/awbook.html
d303 3
a305 3
   Many of our users like The Practical SQL Handbook, Bowman, Judith S.,
   et al., Addison-Wesley. Others like The Complete Reference SQL, Groff
   et al., McGraw-Hill.
d313 2
a314 2
   First, download the latest source and read the PostgreSQL Developers
   documentation on our Web site, or in the distribution. Second,
d318 5
a322 5
   There are about a dozen people who have commit privileges to the
   PostgreSQL CVS archive. They each have submitted so many high-quality
   patches that it was impossible for the existing committers to keep up,
   and we had confidence that patches they committed were of high
   quality.
d326 1
a326 2
   Fill out the "bug-template" file and send it to:
   pgsql-bugs@@PostgreSQL.org
d328 1
a328 1
   Also check out our ftp site ftp://ftp.PostgreSQL.org/pub to see if
d343 1
a343 1
          working on them.
d356 2
a357 1
          data integrity within 30 seconds of an OS crash.
d363 1
a363 1
          profiling and source code analysis. There is an interesting Web
d402 1
a402 1
   can be gotten from ftp://ftp.PostgreSQL.org/pub/odbc/.
d422 1
a422 1
   For Web integration, PHP is an excellent interface. It is at
d425 2
a426 1
   For complex cases, many use the Perl interface and CGI.pm.
d428 1
a428 1
   A WWW gateway based on WDB using Perl can be downloaded from
d436 1
a436 1
   generator. The Web page is http://www.flex.ro/pgaccess
d444 10
a453 10
     * C (libpq)
     * C++ (libpq++)
     * Embedded C (ecpg)
     * Java (jdbc)
     * Perl (perl5)
     * ODBC (odbc)
     * Python (PyGreSQL)
     * TCL (libpgtcl)
     * C Easy API (libpgeasy)
     * Embedded HTML (PHP from http://www.php.net)
a459 1
   Try these:
a464 3
   If you see an error message about oidvector, you definately have a
   version mismatch.
   
d476 1
a476 1
   have System V extensions installed in your kernel. PostgreSQL requires
d481 4
a484 4
   You either do not have shared memory configured properly in your
   kernel or you need to enlarge the shared memory available in the
   kernel. The exact amount you need depends on your architecture and how
   many buffers and backend processes you configure for the postmaster.
d515 2
a516 1
   host entry to the file pgsql/data/pg_hba.conf.
d522 1
a522 1
   because of the ability of users to dynamically link object modules
d537 5
a541 5
   batch using the COPY command. This is much faster than individual
   INSERTS. Second, statements not in a BEGIN WORK/COMMIT transaction
   block are considered to be in their own transaction. Consider
   performing several statements in a single transaction block. This
   reduces the transaction overhead. Also consider dropping and
d544 3
a546 3
   There are several tuning options. You can disable fsync() by starting
   the postmaster with a -o -F option. This will prevent fsync()'s from
   flushing to disk after every transaction.
d550 1
a550 1
   parameter too high, the postmaster may not start because you've
d558 2
a559 2
   You can also use the CLUSTER command to group data in tables to match
   an index. See the CLUSTER manual page for more details.
d561 1
a561 1
    3.11) What debugging features are available?
d613 1
a613 1
   In PostgreSQL 6.5 and up, the default limit is 32 processes. You can
d615 1
a615 1
   With the default configuration you can set -N as large as 1024. If you
d625 3
a627 3
   include the maximum size of shared memory blocks, SHMMAX; the maximum
   number of semaphores, SEMMNS and SEMMNI; the maximum number of
   processes, NPROC; the maximum number of processes per user, MAXUPRC;
d629 2
a630 2
   that PostgreSQL has a limit on the number of allowed backend processes
   is so your system won't run out of resources.
d632 3
a634 3
   In PostgreSQL versions prior to 6.5, the maximum number of backends
   was 64, and changing it required a rebuild after altering the
   MaxBackendId constant in include/storage/sinvaladt.h.
d636 1
a636 1
    3.13) What are the pg_sorttempNNN.NN files in my database directory?
d640 2
a641 2
   requires more space than the backend's -S parameter allows, then
   temporary files are created to hold the extra data.
d643 2
a644 2
   The temporary files should be deleted automatically, but might not if
   a backend crashes during a sort. If you have no backends running at
d650 2
a651 1
    4.1) Why is system confused about commas, decimal points, and date formats.
d653 4
a656 4
   Check your locale configuration. PostgreSQL uses the locale setting of
   the user that ran the postmaster process. There are postgres and psql
   SET commands to control the date format. Set those accordingly for
   your operating environment.
d673 1
a673 1
    4.4) How do I get a list of tables or other things I can see in psql?
d675 4
a678 5
   You can read the source code for psql in file
   pgsql/src/bin/psql/psql.c. It contains SQL commands that generate the
   output for psql's backslash commands. You can also start psql with the
   -E option so it will print out the queries it uses to execute the
   commands you give.
d696 1
a696 1
Maximum number of columns in a table?    unlimited
d706 1
a706 1
   The row length limit will be removed in 7.1.
d708 2
a709 2
    4.7) How much database disk space is required to store data from a typical
    text file?
d711 2
a712 2
   A PostgreSQL database may need six-and-a-half times the disk space
   required to store the data in a flat file.
d735 1
a735 1
   Indexes do not require as much overhead, but do contain the data that
d750 6
a755 6
   PostgreSQL does not automatically maintain statistics. VACUUM must be
   run to update the statistics. After statistics are updated, the
   optimizer knows how many rows in the table, and can better decide if
   it should use indices. Note that the optimizer does not use indices in
   cases when the table is small because a sequential scan would be
   faster.
d758 1
a758 1
   VACUUM ANALYZE is important for complex multijoin queries, so the
d779 1
a779 1
   An R-tree index is used for indexing spatial data. A hash index can't
d783 2
a784 2
   point, the system can more efficiently answer queries such as "select
   all points within a bounding rectangle."
d786 1
a786 1
   The canonical paper that describes the original R-tree design is:
d788 1
a788 1
   Guttman, A. "R-trees: A Dynamic Index Structure for Spatial
d793 1
a793 1
   Systems".
d795 1
a795 1
   Built-in R-trees can handle polygons and boxes. In theory, R-trees can
d797 1
a797 1
   extending R-trees requires a bit of work and we don't currently have
d802 6
a807 3
   The GEQO module speeds query optimization when joining many tables by
   means of a Genetic Algorithm (GA). It allows the handling of large
   join queries through nonexhaustive search.
d809 2
a810 2
    4.13) How do I do regular expression searches and case-insensitive regular
    expression searches?
d812 2
a813 2
   The ~ operator does regular expression matching, and ~* does
   case-insensitive regular expression matching. There is no
d835 1
a835 1
   The last four types above are "varlena" types (i.e., the first four
d845 2
a846 2
   PostgreSQL supports a SERIAL data type. It auto-creates a sequence and
   index on the column. For example, this:
d852 1
a852 1
   is automatically translated into this:
d861 1
a861 1
   sequences. You can also use each row's OID field as a unique value.
d863 1
a863 1
   pg_dump's -o option or COPY WITH OIDS option to preserve the OIDs.
d865 1
a865 1
   Numbering Rows.
d867 1
a867 1
    4.16.2) How do I get the value of a SERIAL insert?
d869 4
a872 4
   One approach is to to retrieve the next SERIAL value from the sequence
   object with the nextval() function before inserting and then insert it
   explicitly. Using the example table in 4.16.1, that might look like
   this:
d878 1
a878 1
   that the name of the automatically created SEQUENCE object will be
d882 1
a882 1
   Alternatively, you could retrieve the assigned SERIAL value with the
d887 3
a889 3
   Finally, you could use the OID returned from the INSERT statement to
   look up the default value, though this is probably the least portable
   approach. In Perl, using DBI with Edmund Mergl's DBD::Pg module, the
d894 1
a894 1
    users?
d896 1
a896 1
   No. This is handled by the backends.
d898 1
a898 1
    4.17) What is an OID? What is a TID?
d900 2
a901 2
   OIDs are PostgreSQL's answer to unique row ids. Every row that is
   created in PostgreSQL gets a unique OID. All OIDs generated during
d903 2
a904 2
   user-created OIDs are equal to or greater than this. By default, all
   these OIDs are unique not only within a table or database, but unique
d907 5
a911 5
   PostgreSQL uses OIDs in its internal system tables to link rows
   between tables. These OIDs can be used to identify specific user rows
   and used in joins. It is recommended you use column type OID to store
   OID values. You can create an index on the OID field for faster
   access.
d914 2
a915 2
   all databases. If you want to change the OID to something else, or if
   you want to make a copy of the table, with the original OID's, there
d918 1
a918 1
        SELECT old_oid, mycol INTO new FROM old;
d923 1
a923 5
   OIDs are stored as 4-byte integers, and will overflow at 4 billion. No
   one has reported this ever happening, and we plan to have the limit
   removed before anyone does.
   
   TIDs are used to identify specific physical rows with block and offset
d937 1
a937 1
     * OID, serial value
a940 3
   A list of general database terms can be found at:
   http://www.comptechnews.com/~reaster/dbdesign.html
   
d965 6
a970 5
   Currently PostgreSQL enforces the rule by closing large object handles
   at transaction commit. So the first attempt to do anything with the
   handle will draw invalid large obj descriptor. So code that used to
   work (at least most of the time) will now generate that error message
   if you fail to use a transaction.
d978 1
a978 1
        CREATE TABLE test (x int, modtime timestamp DEFAULT now() );
d982 3
a984 3
   Currently, we join subqueries to outer queries by sequentially
   scanning the result of the subquery for each row of the outer query. A
   workaround is to replace IN with EXISTS:
d1018 1
a1018 1
   function in a stand-alone test program first.
d1020 2
a1021 2
    5.2) What does the message "NOTICE:PortalHeapMemoryFree: 0x402251d0 not in
    alloc set!" mean?
d1026 2
a1027 1
    5.3) How can I contribute some nifty new types and functions to PostgreSQL?
d1037 1
a1037 1
    5.5) I have changed a source file. Why does the recompile not see the
d1041 2
a1042 1
   You have to do a make clean and then another make.
@


1.39
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Sep 28 01:06:15 EDT 1999
d6 1
a6 1
   Current maintainer: Bruce Momjian (maillist@@candle.pha.pa.us)
d90 4
a93 1
   4.16) How do I create a serial/auto-incrementing field?
d102 1
d151 2
a152 1
   Copyright (c) 1994-6 Regents of the University of California
d206 2
a207 2
   http://members.tripod.com/~kevlo/postgres/portNT.html. There is
   another port using U/Win at http://surya.wipro.com/uwin/ported.html.
d287 4
a290 1
   http://ourworld.compuserve.com/homepages/Graeme_Birchall/DB2_COOK.HTM.
d293 2
a294 1
   Addison Wesley.
d307 1
a307 1
   There are about a dozen people who have commit privileges to the
d518 1
a518 1
   Certainly, indices can speed up queries. The explain command allows
d522 3
a524 3
   If you are doing a lot of inserts, consider doing them in a large
   batch using the copy command. This is much faster than single
   individual inserts. Second, statements not in a begin work/commit
d546 1
a546 1
   You can also use the cluster command to group data in base tables to
d619 1
a619 1
   if a sort needs to be done to satisfy an order by, and the sort
d660 1
a660 1
   See the declare manual page for a description.
d662 1
a662 1
    4.3) How do I select only the first few rows of a query?
d664 1
a664 1
   See the fetch manual page, or use SELECT ... LIMIT....
d666 5
a670 4
   This only prevents all row results from being transferred to the
   client. The entire query must be evaluated, even if you only want just
   the first few rows. Consider a query that has an order by. There is no
   way to return any rows until the entire query is evaluated and sorted.
d682 1
a682 1
   We do not support alter table drop column, but do this:
d738 1
a738 1
   many of the selects needed to get information from the database system
d744 1
a744 1
   an explicit vacuum call to update the statistics. After statistics are
d750 2
a751 2
   For column-specific optimization statistics, use vacuum analyze.
   Vacuum analyze is important for complex multi-join queries, so the
d754 1
a754 1
   column statistics on its own, so vacuum analyze must be run to collect
d757 1
a757 1
   Indexes are not used for order by operations.
d762 2
a763 1
   and ~(regular expression searches) should start with ^.
d767 1
a767 1
   See the explain manual page.
d830 52
a881 1
    4.16) How do I create a serial/auto-incrementing field?
d883 1
a883 6
   PostgreSQL supports a serial data type. It auto-creates a sequence and
   index on the column. See the create_sequence manual page for more
   information about sequences. You can also use each row's oid field as
   a unique value. However, if you need to dump and reload the database,
   you need to use pg_dump's -o option or copy with oids option to
   preserve the oids.
d918 1
d920 1
a920 2
     * attribute, field, column
     * table, class
d973 19
a991 1
        create table test (x int, modtime timestamp default text 'now');
d993 1
a993 2
   The casting of the value to text prevents the default value from being
   computed at table creation time, and delays it until insertion time.
@


1.38
log
@Update stuff for 6.5.1 release.
@
text
@d4 1
a4 1
   Last updated: Sat Jul 10 00:37:57 EDT 1999
d52 1
a52 1
   dumped message3. Why?
d96 3
d200 3
a202 2
   There is another port using U/Win at
   http://surya.wipro.com/uwin/ported.html.
a219 1

a226 1

a235 1

a242 1

d259 1
a259 1
   The latest release of PostgreSQL is version 6.5.
d318 3
a320 3
          DBMS's, like transactions, subselects, and sophisticated
          locking. We have some features they don't have, like
          user-defined types, inheritance, rules, and multi-version
d328 1
a328 1
          crashes or looses power in the next few seconds, all your data
d335 3
a337 4
          from less performance overhead than full fsync mode, and will
          allow data integrity within 30 seconds of an OS crash. The mode
          is select-able by the database administrator.
          
d339 9
a347 3
          slower because we have transaction overhead. We are built for
          flexibility and features, not speed, though we continue to
          improve performance through profiling and source code analysis.
a551 1

d585 1
a585 1
   In Postgres 6.5, the default limit is 32 processes. You can increase
a621 1

a672 1

a875 1

d889 31
@


1.38.2.1
log
@Update for 6.5.2.
@
text
@d4 1
a4 1
   Last updated: Wed Sep 1 19:26:40 EDT 1999
d52 1
a52 1
   dumped message. Why?
a95 2
   4.21) My large-object operations get invalid large obj descriptor.
   Why?
d216 1
d224 1
d234 1
d242 1
d318 3
a320 3
          DBMS's, like transactions, subselects, triggers, views, and
          sophisticated locking. We have some features they don't have,
          like user-defined types, inheritance, rules, and multi-version
d328 1
a328 1
          crashes or loses power in the next few seconds, all your data
d335 4
a338 3
          less performance overhead than full fsync mode, and will allow
          data integrity within 30 seconds of an OS crash. The mode is
          select-able by the database administrator.
d340 3
a342 9
          slower on inserts/updates because we have transaction overhead.
          Of course, MySQL doesn't have any of the features mentioned in
          the Features section above. We are built for flexibility and
          features, though we continue to improve performance through
          profiling and source code analysis.
          We handle each user connection by creating a Unix process.
          Backend processes share data buffers and locking information.
          With multiple CPU's, multiple backends can easily run on
          different CPU's.
d547 1
d618 1
d670 1
d874 1
a887 19
   
    4.21) My large-object operations get invalid large obj descriptor. Why?
    
   You need to put BEGIN WORK and COMMIT around any use of a large object
   handle, that is, surrounding lo_open ... lo_close.
   
   The documentation has always stated that lo_open must be wrapped in a
   transaction, but PostgreSQL versions prior to 6.5 didn't enforce that
   rule. Instead, they'd just fail occasionally if you broke it.
   
   Current PostgreSQL enforces the rule by closing large object handles
   at transaction commit, which will be instantly upon completion of the
   lo_open command if you are not inside a transaction. So the first
   attempt to do anything with the handle will draw invalid large obj
   descriptor. So code that used to work (at least most of the time) will
   now generate that error message if you fail to use a transaction.
   
   If you are using a client interface like ODBC you may need to set
   auto-commit off.
@


1.38.2.2
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Tue Sep 28 01:06:15 EDT 1999
a97 1
   4.22) How do I create a column that will default to the current time?
d199 2
a200 3
   There is also a web page at
   http://members.tripod.com/~kevlo/postgres/portNT.html. There is
   another port using U/Win at http://surya.wipro.com/uwin/ported.html.
d257 1
a257 1
   The latest release of PostgreSQL is version 6.5.2.
d583 1
a583 1
   In Postgres 6.5.*, the default limit is 32 processes. You can increase
a905 12
   
    4.22) How do I create a column that will default to the current time?
    
   The tempation is to do:
        create table test (x int, modtime timestamp default 'now');

   but this makes the column default to the time of table creation, not
   the time of row insertion. Instead do:
        create table test (x int, modtime timestamp default text 'now');

   The casting of the value to text prevents the default value from being
   computed at table creation time, and delays it until insertion time.
@


1.38.2.3
log
@Update for 6.5.3, including new INSTALL file and updated HISTORY.
@
text
@a98 1
   4.23) Why are my subqueries using IN so slow?
d201 2
a202 2
   http://www.freebsd.org/~kevlo/postgres/portNT.html. There is another
   port using U/Win at http://surya.wipro.com/uwin/ported.html.
d916 1
a916 1
        CREATE TABLE test (x int, modtime timestamp default now() );
d918 2
a919 19
   The calling of the function now() prevents the default value from
   being computed at table creation time, and delays it until insertion
   time. We believe this will not be a problem in post-6.5.* releases.
   
    4.23) Why are my subqueries using IN so slow?
    
   Currently, we join subqueries to outer queries by sequential scanning
   the result of the subquery for each row of the outer query. A
   workaround is to replace IN with EXISTS. For example, change:
        SELECT *
        FROM tab
        WHERE col1 IN (SELECT col2 FROM TAB2)

   to:
        SELECT *
        FROM tab
        WHERE EXISTS (SELECT col2 FROM TAB2 WHERE col1 = col2)

   We hope to fix this limitation in a future release.
@


1.37
log
@New FAQ with commerical support mention.
@
text
@d4 1
a4 1
   Last updated: Sat Jun 5 14:22:43 EDT 1999
d9 1
a9 1
   postgreSQL Web site, http://postgreSQL.org.
d12 1
a12 1
   http://postgreSQL.org/docs/faq-linux.html.
d15 1
a15 1
   http://postgreSQL.org/docs/faq-irix.html.
d18 1
a18 1
   http://postgreSQL.org/docs/faq-hpux.shtml.
d21 1
a21 1
                             General questions
d24 6
a29 6
   1.2) What does PostgreSQL run on?
   1.3) Where can I get PostgreSQL?
   1.4) What's the copyright on PostgreSQL?
   1.5) Support for PostgreSQL
   1.6) Latest release of PostgreSQL
   1.7) Is there a commercial version of PostgreSQL?
d31 14
a44 9
   1.9) What version of SQL does PostgreSQL use?
   1.10) Does PostgreSQL work with databases from earlier versions of
   PostgreSQL?
   1.11) Are there ODBC drivers for PostgreSQL?
   1.12) What tools are available for hooking PostgreSQL to Web pages?
   1.13) Does PostgreSQL have a graphical user interface? A report
   generator? A embedded query language interface?
   1.14) How can I learn SQL?
   1.15) What languages are available to communicate with PostgreSQL?
d46 1
a46 1
                    Installation/Configuration questions
d48 2
a49 7
   2.1) initdb doesn't run
   2.2) when I start up the postmaster, I get "FindBackend: could not
   find a backend to execute..." "postmaster: could not find backend to
   execute..."
   2.3) The system seems to be confused about commas, decimal points, and
   date formats.
   2.4) How do I install PostgreSQL somewhere other than
d51 7
a57 6
   2.5) When I run postmaster, I get a Bad System Call core dumped
   message.
   2.6) When I try to start the postmaster, I get IpcMemoryCreate errors.
   2.7) I have changed a source file, but a recompile does not see the
   change?
   2.8) How do I prevent other hosts from accessing my PostgreSQL
d59 8
a66 8
   2.9) I can't access the database as the root user.
   2.10) All my servers crash under concurrent table access. Why?
   2.11) How do I tune the database engine for better performance?
   2.12) What debugging features are available in PostgreSQL?
   2.13) When I try to start the postmaster, I get IpcSemaphoreCreate
   errors. Why?
   2.14) I get 'Sorry, too many clients' when trying to connect. Why?
   2.15) What non-unix ports are available?
d68 1
a68 1
                           Operational questions
d70 3
a72 4
   3.1) Does PostgreSQL support nested subqueries?
   3.2) How can I write client applications for PostgreSQL?
   3.3) How do I set up a pg_group?
   3.4) What is the exact difference between binary cursors and normal
d74 7
a80 14
   3.5) What is an R-tree index and what is it used for?
   3.6) What is the maximum size for a row, table, database?
   3.7) My queries are slow or don't make use of the indexes. Why?
   3.8) How do I do regular expression searches? case-insensitive regexp
   searching?
   3.9) I experienced a server crash during a vacuum. How do I remove the
   lock file?
   3.10) What is the difference between the various character types?
   3.11) In a query, how do I detect if a field is NULL?
   3.12) How do I see how the query optimizer is evaluating my query?
   3.13) How do I create a serial/auto-incrementing field?
   3.14) What are the pg_psort.XXX files in my database directory?
   3.15) Why can't I connect to my database from another machine?
   3.16) How do I find out what indices or operations are defined in the
d82 12
a93 10
   3.17) What is an oid? What is a tid?
   3.18) What is the meaning of some of the terms used in PostgreSQL?
   3.19) What is Genetic Query Optimization?
   3.20) How do you remove a column from a table?
   3.21) How do I select only the first few rows of a query?
   3.22) How much database disk space is required to store data from a
   typical flat file?
   3.23) How do I get a list of tables, or other things I can see in
   psql?
   3.24) Why do I get the error "FATAL: palloc failure: memory
d95 1
a95 1
   3.25) How do I tell what PostgreSQL version I am running?
d97 1
a97 1
                    Questions about extending PostgreSQL
d99 10
a108 6
   4.1) I wrote a user-defined function and when I run it in psql, it
   dumps core.
   4.2) I get messages of the type NOTICE:PortalHeapMemoryFree:
   0x402251d0
   4.3) I've written some nifty new types and functions for PostgreSQL.
   4.4) How do I write a C function to return a tuple?
d110 1
a110 1
                                    Bugs
d112 2
a113 7
   5.1) How do I make a bug report?
     _________________________________________________________________
   
Section 1: General Questions

  1.1) What is PostgreSQL?
  
d138 2
a139 34
  1.2) What does PostgreSQL run on?
  
   The authors have compiled and tested PostgreSQL on the following
   platforms (some of these compiles require gcc):
     * aix - IBM on AIX 3.2.5 or 4.x
     * alpha - DEC Alpha AXP on Digital Unix 2.0, 3.2, 4.0
     * BSD44_derived - OSs derived from 4.4-lite BSD (NetBSD, FreeBSD)
     * bsdi - BSD/OS 2.x, 3.x, 4.x
     * dgux - DG/UX 5.4R4.11
     * hpux - HP PA-RISC on HP-UX 9.*, 10.*
     * i386_solaris - i386 Solaris
     * irix5 - SGI MIPS on IRIX 5.3
     * linux - Intel x86 on Linux 2.0 and Linux ELF SPARC on Linux ELF
       PPC on Linux Elf (For non-ELF Linux, see LINUX_ELF below).
     * sco - SCO 3.2v5
     * sparc_solaris - SUN SPARC on Solaris 2.4, 2.5, 2.5.1
     * sunos4 - SUN SPARC on SunOS 4.1.3
     * svr4 - Intel x86 on Intel SVR4 and MIPS
     * ultrix4 - DEC MIPS on Ultrix 4.4
       
  1.3) Where can I get PostgreSQL?
  
   The primary anonymous ftp site for PostgreSQL is:
     * ftp://ftp.postgreSQL.org/pub
       
   A mirror site exists at:
     * ftp://postgres95.vnet.net/pub/postgres95
     * ftp://ftp.luga.or.at/pub/postgres95
     * ftp://cal011111.student.utwente.nl/pub/postgres95
     * ftp://ftp.uni-trier.de/pub/database/rdbms/postgres/postgres95
     * ftp://rocker.sch.bme.hu
       
  1.4) What's the copyright on PostgreSQL?
  
d165 44
a208 2
  1.5) Support for PostgreSQL
  
d254 1
a254 1
   Commerical support for PostgreSQL is available at
d257 2
a258 2
  1.6) Latest release of PostgreSQL
  
d263 2
a264 9
  1.7) Is there a commercial version of PostgreSQL?
  
   Illustra Information Technology (a wholly owned subsidiary of Informix
   Software, Inc.) sells an object-relational DBMS called Illustra that
   was originally based on Postgres. For more information, contact
   sales@@illustra.com
   
  1.8) What documentation is available for PostgreSQL?
  
d271 15
a285 1
   The web page contains even more documentation.
d287 20
a306 15
  1.9) What version of SQL does PostgreSQL use?
  
   PostgreSQL supports an extended subset of SQL-92.
   
   It is Y2K compliant.
   
  1.10) Does PostgreSQL work with databases from earlier versions of
  PostgreSQL?
  
   Upgrading to 6.5 can not use the pg_upgrade utility. Those upgrading
   from earlier releases require a dump and restore.
   
   Those upgrading from versions earlier than 1.09 must upgrade to 1.09
   first without a dump/reload, then dump the data from 1.09, and then
   load it into 6.5.
d308 64
a371 2
  1.11) Are there ODBC drivers for PostgreSQL?
  
d386 2
a387 2
  1.12) What tools are available for hooking PostgreSQL to Web pages?
  
d391 4
a394 2
   For web integration, PHP is an excellent interface. The URL for that
   is http://www.php.net
d396 2
a397 2
   PHP is great for simple stuff, but for more complex stuff, some still
   use the perl interface and CGI.pm.
d399 1
a399 1
   An WWW gateway based on WDB using perl can be downloaded from
d402 3
a404 3
  1.13) Does PostgreSQL have a graphical user interface? A report generator? A
  embedded query language interface?
  
d407 1
a407 1
   generator.
d409 2
a410 11
   The web page is http://www.flex.ro/pgaccess We also include ecpg,
   which is an embedded SQL query language interface for C.
   
  1.14) How can I learn SQL?
  
   There is a nice tutorial at http://w3.one.net/~jhoffman/sqltut.htm and
   at
   http://ourworld.compuserve.com/homepages/Graeme_Birchall/DB2_COOK.HTM.
   
   Many of our users like The Practical SQL Handbook, Bowman et al,
   Addison Wesley.
d412 2
a413 2
  1.15) What languages are available to communicate with PostgreSQL?
  
d415 8
a422 8
     * C(interfaces/libpq)
     * C++(interfaces/libpq++)
     * Embedded C(interfaces/ecpg)
     * Java(interfaces/jdbc)
     * Perl(interfaces/perl5)
     * ODBC(interfaces/odbc)
     * Python(interfaces/python)
     * TCL(interfaces/libpgtcl)
d424 1
d427 4
a430 4
Section 2: Installation Questions

  2.1) initdb doesn't run
  
d437 2
a438 16
  2.2) when I start up the postmaster, I get "FindBackend: could not find a
  backend to execute..." "postmaster: could not find backend to execute..."
  
   You probably do not have the right path set up. The postgres
   executable needs to be in your path.
   
  2.3) The system seems to be confused about commas, decimal points, and date
  formats.
  
   Check your locale configuration. PostgreSQL uses the locale settings
   of the user that ran the postmaster process. There are postgres and
   psql SET commands to control the date format. Set those accordingly
   for your operating environment.
   
  2.4) How do I install PostgreSQL somewhere other than /usr/local/pgsql?
  
d444 3
a446 2
  2.5) When I run postmaster, I get a Bad System Call core dumped message.
  
d451 2
a452 2
  2.6) When I try to start the postmaster, I get IpcMemoryCreate errors.
  
d460 13
a472 4
  2.7) I have changed a source file, but a recompile does 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.
d474 2
a475 2
  2.8) How do I prevent other hosts from accessing my PostgreSQL database?
  
d480 1
d482 10
a491 2
  2.9) I can't access the database as the root user.
  
d497 2
a498 2
  2.10) All my servers crash under concurrent table access. Why?
  
d502 2
a503 2
  2.11) How do I tune the database engine for better performance?
  
d535 2
a536 2
  2.12) What debugging features are available in PostgreSQL?
  
d576 2
a577 16
  2.13) When I try to start the postmaster, I get IpcSemaphoreCreate errors.
  Why?
  
   If the error message is IpcSemaphoreCreate: semget failed (No space
   left on device) then your kernel is not configured with enough
   semaphores. Postgres needs one semaphore per potential backend
   process. A temporary solution is to start the postmaster with a
   smaller limit on the number of backend processes. Use -N with a
   parameter less than the default of 32. A more permanent solution is to
   increase your kernel's SEMMNS and SEMMNI parameters.
   
   If the error message is something else, you might not have semaphore
   support configured in your kernel at all.
   
  2.14) I get 'Sorry, too many clients' when trying to connect. Why?
  
d603 6
a608 6
  2.15) What non-unix ports are available?
  
   It is possible to compile the libpq C library, psql, and other
   interfaces and binaries to run on MS Windows platforms. In this case,
   the client is running on MS Windows, and communicates via TCP/IP to a
   server running on one of our supported Unix platforms.
d610 3
a612 11
   A file win32.mak is included in the distribution for making a Win32
   libpq library and psql.
   
   The database server is now working on Windows NT using the Cygnus
   Unix/NT porting library. The only feature missing is dynamic loading
   of user-defined functions/types. See
   http://www.askesis.nl/AskesisPostgresIndex.html for more information.
   
   There is another port using U/Win at
   http://surya.wipro.com/uwin/ported.html.
     _________________________________________________________________
d614 2
a615 14
Section 3: PostgreSQL Features

  3.1) Does PostgreSQL support nested subqueries?
  
   Yes, fully supported, but only in the where clause, not in the target
   list.
   
  3.2) How can I write client applications for PostgreSQL?
  
   PostgreSQL supports a C-callable library interface called libpq as
   well as many others. See the above list of supported languages.
   
  3.3) How do I set up a pg_group?
  
d633 1
a633 4
       
  3.4) What is the exact difference between binary cursors and normal cursors?
  
   See the declare manual page for a description.
d635 9
a643 8
  3.5) What is an R-tree index and what is it used for?
  
   An r-tree index is used for indexing spatial data. A hash index can't
   handle range searches. A B-tree index only handles range searches in a
   single dimension. R-tree's can handle multi-dimensional data. For
   example, if an R-tree index can be built on an attribute of type
   point, the system can more efficient answer queries like select all
   points within a bounding rectangle.
d645 4
a648 1
   The canonical paper that describes the original R-Tree design is:
d650 3
a652 3
   Guttman, A. "R-Trees: A Dynamic Index Structure for Spatial
   Searching." Proc of the 1984 ACM SIGMOD Int'l Conf on Mgmt of Data,
   45-57.
d654 4
a657 2
   You can also find this paper in Stonebraker's "Readings in Database
   Systems"
d659 7
a665 4
   Builtin R-Trees can handle polygons and boxes. In theory, R-trees can
   be extended to handle higher number of dimensions. In practice,
   extending R-trees require a bit of work and we don't currently have
   any documentation on how to do it.
d667 15
a681 6
  3.6) What is the maximum size for a row, table, database?
  
   Rows are limited to 8K bytes. Taking into account system attributes
   and other overhead, one should stay well shy of 8,000 bytes to be on
   the safe side. To use attributes larger than 8K, try using the large
   objects interface.
d687 1
a687 2
   are tens of gigabytes, and probably some that are hundreds of
   gigabytes.
d689 42
a730 2
  3.7) My queries are slow or don't make use of the indexes. Why?
  
d742 2
a743 2
   column statistics on its own, and vacuum analyze must be run to
   collect them periodically.
d747 1
a747 1
   When using wild-card operators like LIKE or ~, indices can only be
d752 40
a791 9
  3.8) How do I do regular expression searches? case-insensitive regexp
  searching?
  
   See psql's \do command.
   
  3.9) I experienced a server crash during a vacuum. How do I remove the lock
  file?
  
   See the vacuum manual page.
d793 6
a798 2
  3.10) What is the difference between the various character types?
  
d817 2
a818 10
  3.11) In a query, how do I detect if a field is NULL?
  
   You test the column with IS NULL and IS NOT NULL.
   
  3.12) How do I see how the query optimizer is evaluating my query?
  
   See the explain manual page.
   
  3.13) How do I create a serial/auto-incrementing field?
  
d823 1
a823 1
   you need to use pgdump's -o option or copy with oids option to
d826 2
a827 31
  3.14) What are the pg_tempNNN.NN files in my database directory?
  
   They are temporary files generated by the query executor. For example,
   if a sort needs to be done to satisfy an order by, and the sort
   requires more space than the backend's -S parameter allows, then temp
   files are created to hold the extra data.
   
   The temp files should go away automatically, but might not if a
   backend crashes during a sort. If you have no transactions running at
   the time, it is safe to delete the pg_tempNNN.NN files.
   
  3.15) Why can't I connect to my database from another machine?
  
   The default configuration allows only unix domain socket connections
   from the local machine. To enable TCP/IP connections, make sure the
   postmaster has been started with the -i option, and add an appropriate
   host entry to the file pgsql/data/pg_hba.conf. See the pg_hba.conf
   manual page.
   
  3.16) How do I find out what indices or operations are defined in the
  database?
  
   psql has a variety of backslash commands to show such information. Use
   \? to see them.
   
   Also try the file pgsql/src/tutorial/syscat.source. It illustrates
   many of the selects needed to get information out of the database
   system tables.
   
  3.17) What is an oid? What is a tid?
  
d855 2
a856 2
  3.18) What is the meaning of some of the terms used in PostgreSQL?
  
d869 2
a870 66
  3.19) What is Genetic Query Optimization?
  
   The GEQO module in PostgreSQL is intended to solve the query
   optimization problem of joining many tables by means of a Genetic
   Algorithm (GA). It allows the handling of large join queries through
   non-exhaustive search.
   
   For further information see README.GEQO <utesch@@aut.tu-freiberg.de>.
   
  3.20) How do you remove a column from a table?
  
   We do not support alter table drop column, but do this:

        SELECT ...  -- select all columns but the one you want to remove
        INTO TABLE new_table
        FROM old_table;
        DROP TABLE old_table;
        ALTER TABLE new_table RENAME TO old_table;

  3.21) How do I select only the first few rows of a query?
  
   See the fetch manual page.
   
   This only prevents all row results from being transferred to the
   client. The entire query must be evaluated, even if you only want just
   the first few rows. Consider a query that has an order by. There is no
   way to return any rows until the entire query is evaluated and sorted.
   
  3.22)How much database disk space is required to store data from a typical
  flat file?
  
   Consider a file with 300,000 lines with two integers on each line. The
   flat file is 2.4MB. The size of the PostgreSQL database file
   containing this data can be estimated:
40 bytes + each row header (approximate)
 8 bytes + two int fields @@ 4 bytes each
 4 bytes + pointer on page to tuple
-------- =
52 bytes per row

The data page size in PostgreSQL is 8192(8k) bytes, so:

8192 bytes per page
-------------------  =  157 rows per database page (rounded up)
 52 bytes per row

300000 data rows
-----------------  =   1911 database pages
157 rows per page

1911 database pages * 8192 bytes per page  =  15,654,912 or 15.5MB


Indexes do not contain as much overhead, but do contain the data that is
being indexed, so they can be large also.

  3.23) How do I get a list of tables, or other things I can see in psql?
  
   You can read the source code for psql, file pgsql/src/bin/psql/psql.c.
   It contains SQL commands that generate the output for psql's backslash
   commands. Beginning in Postgres 6.5, you can also start psql with the
   -E option so that it will print out the queries it uses to execute the
   commands you give.
   
  3.24) Why do I get the error "FATAL: palloc failure: memory exhausted?"
  
d885 2
a886 2
  3.25) How do I tell what PostgreSQL version I am running?
  
d890 5
a894 5
Section 4: Extending PostgreSQL

  4.1) I wrote a user-defined function and when I run it in psql, it dumps
  core.
  
d900 3
a902 3
  4.2) I get messages of the type NOTICE:PortalHeapMemoryFree: 0x402251d0 not
  in alloc set!
  
d906 16
a921 23
  4.3) I've written some nifty new types and functions for PostgreSQL.
  
   Please share them with other PostgreSQL users. Send your extensions to
   mailing list, and they will eventually end up in the contrib/
   subdirectory.
   
  4.4) How do I write a C function to return a tuple?
  
   This requires extreme wizardry so extreme that the authors have not
   ever tried it, though in principle it can be done.
     _________________________________________________________________
   
Section 5: Bugs

  5.1) How do I make a bug report?
  
   Check the current FAQ at http://postgreSQL.org
   
   Also check out our ftp site ftp://ftp.postgreSQL.org/pub to see if
   there is a more recent PostgreSQL version or patches.
   
   You can also fill out the "bug-template" file and send it to:
   bugs@@postgreSQL.org
@


1.36
log
@Update faq and hpux faq.
@
text
@d250 3
@


1.35
log
@Update FAQ's for release.
@
text
@d4 1
a4 1
   Last updated: Fri Jun 4 23:30:19 EDT 1999
d16 3
d147 1
a147 1
   platforms(some of these compiles require gcc 2.7.0):
d153 1
a153 1
     * hpux - HP PA-RISC on HP-UX 9.0, 10
d209 3
a211 3
   available for discussion of matters pertaining to PostgreSQL, For info
   on how to subscribe, send a mail with the lines in the body (not the
   subject line)
d227 2
a228 2
   The bugs mailing list available. To subscribe to this list, send email
   to bugs-request@@postgreSQL.org with a BODY of:
d230 4
d247 1
a247 1
   There also an IRC channel on EFNet, channel #PostgreSQL. I use the
d378 4
a381 2
   You need to edit Makefile.global and change POSTGRESDIR accordingly,
   or create a Makefile.custom and define POSTGRESDIR there.
d406 3
a408 3
   using unix domain sockets. You must add the -i flag to the postmaster,
   and enable host-based authentication by modifying the file
   $PGDATA/pg_hba accordingly.
d412 1
a412 1
   You should not create database users with user id 0(root). They will
d442 9
a450 6
   parameter too high, the backends will not start or crash unexpectedly.
   Each buffer is 8K and the default is 64 buffers.
   
   You can also use the postgres -S option to increase the maximum amount
   of memory used by each backend process for temporary sorts. Each
   buffer is 1K and the default is 512 buffers.
d460 1
a460 1
   First, by running configure with the -enable-cassert option, many
d476 1
a476 1
   generates large log files.
d488 2
a489 2
   The postgres program has a -s, -A, -t options that can be very useful
   for debugging and performance measurements.
d699 1
a699 1
  3.14) What are the pg_psort.XXX files in my database directory?
d701 8
a708 6
   They are temporary sort files generated by the query executor. For
   example, if a sort needs to be done to satisfy an order by, some temp
   files are generated as a result of the sort.
   
   If you have no transactions or sorts running at the time, it is safe
   to delete the pg_psort.XXX files.
d713 4
a716 3
   from the local machine. To enable TCP/IP connections, use the
   postmaster -i option You need to add a host entry to the file
   pgsql/data/pg_hba. See the pg_hba.conf manual page.
d794 1
a794 1
   This only prevents all row results from being transfered to the
d829 5
a833 2
   See the file pgsql/src/bin/psql/psql.c. It contains SQL commands that
   generate the output for psql's backslash commands.
d847 1
a847 1
   all subprocesses created after the command is run. If are having a
@


1.34
log
@Add link to HPUX platform FAQ.
@
text
@d4 1
a4 1
   Last updated: Sat Oct 24 00:12:23 EDT 1998
d12 1
a12 1
   http://postgreSQL.org/docs/faq-linux.shtml.
d15 1
a15 4
   http://postgreSQL.org/docs/faq-irix.shtml.
   
   HPUX-specific questions are answered in
   http://postgreSQL.org/docs/faq-hpux.shtml.
d59 4
a62 2
   2.13) How do I enable more than 64 concurrent backends?
   2.14) What non-unix ports are available?
d72 2
a73 3
   3.6) What is the maximum size for a tuple?
   3.7) I defined indices but my queries don't seem to make use of them.
   Why?
d241 1
a241 1
   unix command irc -c '#PostgreSQL' "$USER" irc.ais.net
d245 1
a245 1
   The latest release of PostgreSQL is version 6.4.
d275 2
a276 3
   Upgrading to 6.4 from release 6.3.* can be accomplished using the new
   pg_upgrade utility. Those upgrading from earlier releases require a
   dump and restore.
d278 1
a278 1
   Those ugrading from versions earlier than 1.09 must upgrade to 1.09
d280 1
a280 1
   load it into 6.4.
d309 1
a309 1
   An WWW gatway based on WDB using perl can be downloaded from
d316 1
a316 1
   shipped as part of the distribtion. Pgaccess also has a report
d365 3
a367 2
   of the user that ran the postmaster process. Set those accordingly for
   your operating environment.
d385 3
a387 2
   buffers you configure postmaster to run with. For most systems, with
   default buffer sizes, you need a minimum of ~760K.
d422 1
a422 1
   transaction block are considered to be their in their own transaction.
d438 1
a438 1
   buffer is 1K and the defualt is 512 buffers.
d476 1
a476 1
   The postgres program has a -s, -A, -t options that can be very usefull
d484 2
a485 1
  2.13) How do I enable more than 64 concurrent backends?
d487 37
a523 3
   Edit include/storage/sinvaladt.h, and change the value of
   MaxBackendId. In the future, we plan to make this a configurable
   prameter.
d525 1
a525 1
  2.14) What non-unix ports are available?
d532 1
a532 1
   A file win32.mak is included in the distributiion for making a Win32
d535 7
a541 3
   Someone is attempting to port our PostgreSQL database server to
   Windows NT using the Cygnus Unix/NT porting library. He has gotten it
   compiled, but initdb is currently failing.
d603 1
a603 1
  3.6) What is the maximum size for a tuple?
d605 1
a605 1
   Tuples are limited to 8K bytes. Taking into account system attributes
d610 1
a610 1
   Tuples do not cross 8k boundaries so a 5k tuple will require 8k of
d613 5
a617 1
  3.7) I defined indices but my queries don't seem to make use of them. Why?
d623 9
a631 3
   not use indices in cases when the table is small because a sequentail
   scan would be faster. For column-specific optimization statistics, use
   vacuum analyze.
d635 4
a638 4
   When using wildcard operators like LIKE or ~, indices can only be used
   if the beginning of the search is anchored to the start of the string.
   So, to use indices, LIKE searches can should not begin with %, and
   ~(regular expression searches) should start with ^.
d657 1
a657 1
TEXT            text            length limited only by maximum tuple length
d732 9
a740 6
        CREATE TABLE new_table (mycol int);
        INSERT INTO new_table SELECT oid, mycol FROM old_table;

   Tids are used to indentify specific physical rows with block and
   offset values. Tids change after rows are modified or reloaded. They
   are used by index entries to point to physical rows.
d851 2
a852 4
   You are pfree'ing something that was not palloc'ed. When writing
   user-defined functions, do not include the file "libpq-fe.h". Doing so
   will cause your palloc to be a malloc instead of a free. Then, when
   the backend pfrees the storage, you get the notice message.
@


1.33
log
@HISTORY file update.
@
text
@d16 3
@


1.33.2.1
log
@Prepare for 6.4.1.
@
text
@d4 1
a4 1
   Last updated: Sat Dec 12 22:56:56 EST 1998
d71 2
a72 1
   3.7) My queries are slow or don't make use of the indexes. Why?
d278 1
a278 1
   Those upgrading from versions earlier than 1.09 must upgrade to 1.09
d309 1
a309 1
   An WWW gateway based on WDB using perl can be downloaded from
d316 1
a316 1
   shipped as part of the distribution. Pgaccess also has a report
d436 1
a436 1
   buffer is 1K and the default is 512 buffers.
d474 1
a474 1
   The postgres program has a -s, -A, -t options that can be very useful
d486 1
a486 1
   parameter.
d495 1
a495 1
   A file win32.mak is included in the distribution for making a Win32
d498 3
a500 7
   The database server is now working on Windows NT using the Cygnus
   Unix/NT porting library. The only feature missing is dynamic loading
   of user-defined functions/types. See
   http://www.askesis.nl/AskesisPostgresIndex.html for more information.
   
   There is another port using U/Win at
   http://surya.wipro.com/uwin/ported.html.
d572 1
a572 1
  3.7) My queries are slow or don't make use of the indexes. Why?
d578 3
a580 9
   not use indices in cases when the table is small because a sequential
   scan would be faster.
   
   For column-specific optimization statistics, use vacuum analyze.
   Vacuum analyze is important for complex multi-join queries, so the
   optimizer can estimate the number of rows returned from each table,
   and choose the proper join order. The backend does not keep track of
   column statistics on its own, and vacuum analyze must be run to
   collect them periodically.
d584 4
a587 4
   When using wild-card operators like LIKE or ~, indices can only be
   used if the beginning of the search is anchored to the start of the
   string. So, to use indices, LIKE searches can should not begin with %,
   and ~(regular expression searches) should start with ^.
d684 3
a686 3
   Tids are used to identify specific physical rows with block and offset
   values. Tids change after rows are modified or reloaded. They are used
   by index entries to point to physical rows.
d797 4
a800 2
   You are pfree'ing something that was not palloc'ed. Beware of mixing
   malloc/free and palloc/pfree.
@


1.32
log
@Update FAQ.
@
text
@d4 1
a4 1
   Last updated: Sun Aug 30 00:01:22 EDT 1998
d18 2
a19 4
Questions answered:

  1) General questions
  
d38 2
a39 2
  2) Installation/Configuration questions
  
d55 1
a55 1
   2.9) I can't access the database as the 'root' user.
d59 2
a60 2
   2.13) How do I enable more than 64 concurrent backends? 2.14) What
   non-unix ports are available?
d62 2
a63 2
  3) Operational questions
  
d65 1
a65 1
   3.2) How can I write client applications to PostgreSQL?
d83 1
a83 1
   3.16) How do I find out what indexes or operations are defined in the
d89 1
a89 1
   3.21) How do SELECT only the first few rows of a query?
d98 2
a99 2
  4) Questions about extending PostgreSQL
  
d107 2
a108 2
  5) Bugs
  
d147 1
a147 1
     * bsdi - BSD/OS 2.0, 2.01, 2.1, 3.0
a159 3
   The following platforms have known problems/bugs:
     * nextstep - Motorola MC68K or Intel x86 on NeXTSTEP 3.2
       
d201 2
a202 3
   There is no official support for PostgreSQL from the original
   maintainers or from University of California, Berkeley. It is
   maintained through volunteer effort only.
d244 1
a244 1
   The latest release of PostgreSQL is version 6.4 beta.
d252 2
a253 4
   was originally based on postgres. Illustra has cosmetic similarities
   to PostgreSQL but has more features, is more robust, performs better,
   and offers real support. On the flip side, it costs money. For more
   information, contact sales@@illustra.com
d258 1
a258 3
   included in the distribution. See the /doc directory. The pgintro,
   sql, and pgbuiltin manual pages are particularly important. pgintro
   contains a list of all available manual pages.
d263 1
a263 2
   The www page contains pointers to an implementation guide and five
   papers written about Postgres design concepts and features.
d269 2
d274 3
a276 1
   Upgrading to 6.4 from earlier releases requires a dump and restore.
d309 3
a311 3
   An WWW gatway based on WDB using perl can be downloaded from:
     * http://www.eol.ists.ca/~dunlop/wdb -p95
       
d319 2
a320 2
   We also have ecpg, which is an embedded SQL query language interface
   for C. This is also included.
d350 2
a351 1
       in your path
d353 1
a353 4
     * check that the 'postgres' user owns all the right files
     * ensure that there are files in $PGDATA/files, and that they are
       non-empty. If they aren't, then "gmake install" failed for some
       reason
d358 1
a358 1
   You probably do not have the right path set up. The 'postgres'
d377 1
a377 1
   kernel support for shared memory.
d390 1
a390 1
   You have to do a 'make clean' and then another 'make'.
d395 3
a397 3
   using unix domain. You must add the -i flag to the postmaster, and
   enable host-based authentication by modifying the file $PGDATA/pg_hba
   accordingly.
d399 1
a399 1
  2.9) I can't access the database as the 'root' user.
d413 7
a419 3
   If you are doing a lot of INSERTs, consider doing them in a large
   batch using the COPY command. This is much faster than single
   individual INSERTs. Second, statements not in a BEGIN WORK/COMMIT
d423 1
a423 1
   recreating indexes when making large data changes.
d426 1
a426 1
   fsync() by starting the postmaster with a '-o -F' option. This will
d430 3
a432 3
   shared memory buffers shared among the backend processes. If you make
   this parameter too high, the process will not start or crash
   unexpectedly. Each buffer is 8K and the defualt is 64 buffers.
d438 1
a438 1
   You can also use the CLUSTER command to group data in base tables to
d458 1
a458 1
   This file can contain useful information about problems or errors
d461 1
a461 1
   1-3 that specifies the debug level. Be warned that a debug level of 3
d464 2
a465 2
   You can actuall run the postgres backend from the command line, and
   type your SQL statement directly. This is recommended ONLY for
a481 3
   The EXPLAIN command (see this FAQ) allows you to see how PostgreSQL is
   interpreting your query.
   
d498 3
a500 3
   People have attempted to port our PostgreSQL database server to
   Windows NT using the Cygnus Unix/NT porting library, but no one has
   succeeded yet.
d507 2
a508 1
   Yes.
d510 1
a510 1
  3.2) How can I write client applications to PostgreSQL?
d513 1
a513 4
   well as many others. See the /src/interfaces directory.
   
   Others have contributed a perl interface and a WWW gateway to
   PostgreSQL. See the PostgreSQL home pages for more details.
d545 1
a545 1
   'point', the system can more efficient answer queries like select all
d575 13
a587 17
   an explicit 'vacuum' call to update the statistics. After statistics
   are updated, the optimizer has a better shot at using indices. Note
   that the optimizer is limited and does not use indices in some
   circumstances (such as OR clauses). For column-specific optimization
   statistics, use 'vacuum analyze'.
   
   If the system still does not see the index, it is probably because you
   have created an index on a field with the improper *_ops type. For
   example, you have created a CHAR(4) field, but have specified a
   char_ops index type_class.
   
   See the create_index manual page for information on what type classes
   are available. It must match the field type.
   
   PostgreSQL does not warn the user when the improper index is created.
   
   Indexes not used for ORDER BY operations.
d612 1
a612 1
   bytes are the length, followed by the data). CHAR(#) allocates the
d614 1
a614 1
   field. TEXT, VARCHAR(#), and BYTEA all have variable length on the
d616 1
a616 1
   using them. Specifically, the penalty is for access to any columns
d629 6
a634 28
   PostgreSQL does not allow the user to specifiy a user column as type
   SERIAL. Instead, you can use each row's oid field as a unique value.
   However, if you need to dump and reload the database, you need to use
   pgdump's -o option or COPY's WITH OIDS option to preserver the oids.
   
   We also have a SEQUENCE function that is very similar to SERIAL. See
   the create_sequence manual page.
   
   Another valid way of doing this is to create a function:

        create table my_oids (f1 int4);
        insert into my_oids values (1);
        create function new_oid () returns int4 as
                'update my_oids set f1 = f1 + 1;  select f1 from my_oids; '
        language 'sql';

   then:

        create table my_stuff (my_key int4, value text);
        insert into my_stuff values (new_oid(), 'hello');

   However, keep in mind there is a race condition here where one server
   could do the update, then another one do an update, and they both
   could select the same new id. This statement should be performed
   within a transaction.
   
   Yet another way is to use general trigger function autoinc() from
   contrib/spi/autoinc.c.
d639 1
a639 1
   example, if a sort needs to be done to satisfy an ORDER BY, some temp
d652 1
a652 1
  3.16) How do I find out what indexes or operations are defined in the
d659 1
a659 1
   many of the 'select's needed to get information out of the database
d664 6
a669 7
   Oids are PostgreSQL's answer to unique row ids or serial columns.
   Every row that is created in PostgreSQL gets a unique oid. All oids
   generated by initdb are less than 16384 (from
   backend/access/transam.h). All post-initdb (user-created) oids are
   equal or greater that this. By default, all these oids are unique not
   only within a table, or database, but unique within the entire
   PostgreSQL installation.
d671 2
a672 2
   PostgreSQL uses oids in its internal system tables to link rows in
   separate tables. These oids can be used to identify specific user rows
d686 1
a686 2
   are used by index entries to point to physical rows. They can not be
   accessed through sql.
a701 2
   Please let me know if you think of any more.
   
d713 1
a713 1
   We do not support ALTER TABLE DROP COLUMN, but do this:
d721 1
a721 1
  3.21) How do SELECT only the first few rows of a query?
d727 2
a728 3
   the first few rows. Consider a query that has and an ORDER BY. There
   is no way to return any rows until the entire query is evaluated and
   sorted.
d774 4
a777 4
   query to complete. This command applies the current process, and all
   subprocesses created after the command is run. If are having a problem
   with the SQL client because the backend is returning too much data,
   try it before starting the client.
d810 2
a811 3
   This requires extreme wizardry, so extreme that the authors have not
   ever tried it, though in principle it can be done. The short answer is
   ... you can't. This capability is forthcoming in the future.
d821 1
a821 1
   there is a more recent PostgreSQL version.
d824 1
a824 3
     * bugs@@postgreSQL.org
       
   This is the address of the developers mailing list.
@


1.31
log
@Doc updates from Darren on char2-16 removal
@
text
@d4 1
a4 1
   Last updated: Wed Apr 15 12:47:01 EDT 1998
d56 1
d61 1
a61 1
   2.13) How do I enable more than 32 concurrent backends? 2.14) What
d67 3
a69 5
   3.2) I've having a lot of problems using rules.
   3.3) I can't seem to write into the middle of large objects reliably.
   3.4) How can I write client applications to PostgreSQL?
   3.5) How do I set up a pg_group?
   3.6) What is the exact difference between binary cursors and normal
d71 3
a73 3
   3.7) What is a R-tree index and what is it used for?
   3.8) What is the maximum size for a tuple?
   3.9) I defined indices but my queries don't seem to make use of them.
d75 1
a75 1
   3.10) How do I do regular expression searches? case-insensitive regexp
d77 9
a85 9
   3.11) I experienced a server crash during a vacuum. How do I remove
   the lock file?
   3.12) What is the difference between the various character types?
   3.13) In a query, how do I detect if a field is NULL?
   3.14) How do I see how the query optimizer is evaluating my query?
   3.15) How do I create a serial field?
   3.16) What are the pg_psort.XXX files in my database directory?
   3.17) Why can't I connect to my database from another machine?
   3.18) How do I find out what indexes or operations are defined in the
d87 6
a92 8
   3.19) What is the time-warp feature and how does it relate to vacuum?
   3.20) What is an oid? What is a tid?
   3.21) What is the meaning of some of the terms used in PostgreSQL?
   3.22) What is Genetic Query Optimization?
   3.23) How do you remove a column from a table?
   3.24) How do SELECT only the first few rows of a query?
   3.25) Why can't I create a column named "time"?
   3.26) How much database disk space is required to store data from a
d94 5
d210 4
a213 5
   The main mailing list is: questions@@postgreSQL.org. It is available
   for discussion o f matters pertaining to PostgreSQL, including but not
   limited to bug reports and fixes. For info on how to subscribe, send a
   mail with the lines in the body (not the subject line)

d218 1
a218 1
   to questions-request@@postgreSQL.org.
d221 1
a221 2
   email to: questions-digest-request@@postgreSQL.org with a BODY of:

d229 2
a230 2
   There is a bugs mailing list available. To subscribe to this list,
   send email to bugs-request@@postgreSQL.org with a BODY of:
d240 2
a241 2
   Additional information about PostgreSQL can be found via the
   PostgreSQL WWW home page at:
d245 3
d250 1
a250 1
   The latest release of PostgreSQL is version 6.3.2.
d252 1
a252 1
   We plan to have major releases every three months.
d260 2
a261 2
   and offers real documentation and support. On the flip side, it costs
   money. For more information, contact sales@@illustra.com
d265 4
a268 4
   A user manual, manual pages, and some small test examples are included
   in the distribution. The pgintro, sql, and pgbuiltin manual pages are
   particularly important. pgintro contains a list of all available
   manual pages.
d278 1
a278 1
   PostgreSQL supports a subset of SQL-92.
d283 1
a283 8
   PostgreSQL v1.09 is compatible with databases created with v1.01.
   
   Upgrading to 6.3 from earlier releases requires a dump and restore.
   
   Upgrading to 6.2.1 from pre-6.2 requires a dump and restore.
   
   Upgrading to 6.2.1 from 6.2 does not require a dump, but see the
   appropriate /migration file in the distribution.
d287 1
a287 1
   load it into 6.2.1 or 6.3.
d293 7
a299 14
   PostODBC is included in the distribution. For all people being
   interested in PostODBC, there are now two mailing lists devoted to the
   discussion of PostODBC. The mailing lists are:
     * postodbc-users@@listserv.direct. net
     * postodbc-developers@@listse rv.direct.net
       
   these lists are ordinary majordomo mailing lists. You can subscribe by
   sending a mail to:
     * majordomo@@listserv.direct.net
       
   OpenLink ODBC is very popular. You can get it from
   http://www.openlinksw.com. It works with our standard ODBC client
   software so you'll have PostgreSQL ODBC available on every client
   platform we support (Win, Mac, Unix, VMS).
d301 1
a301 1
   We will probably be selling this product to people who need
d331 4
a334 1
   There is a nice tutorial at http://w3.one.net/~jhoffman/sqltut.htm
d356 2
d401 1
a401 1
  2.8) How do I prevent other hosts from accessing my PostgreSQL backend?
d422 11
a432 3
   There are several things that can be done. You can disable fsync() by
   starting the postmaster with a '-o -F' option. This will prevent
   fsync()'s from flushing to disk after every transaction.
a458 1

d490 1
a490 1
  2.13) How do I enable more than 32 concurrent backends?
d496 1
a496 1
  2.13) What non-unix ports are available?
d503 3
d517 1
a517 12
  3.2) I've having a lot of problems using rules.
  
   Currently, the rule system in PostgreSQL has some limitations. It
   works enough to support the view mechanism, but does not handle
   Insert/Update/Delete well.
   
  3.3) I can't seem to write into the middle of large objects reliably.
  
   The Inversion large object system now works perfectly. You should no
   longer have problems with large objects.
   
  3.4) How can I write client applications to PostgreSQL?
d525 1
a525 1
  3.5) How do I set up a pg_group?
a529 1

d545 1
a545 1
  3.6) What is the exact difference between binary cursors and normal cursors?
d549 1
a549 1
  3.7) What is a R-tree index and what is it used for?
d554 1
a554 1
   example, if a R-tree index can be built on an attribute of type
d572 1
a572 1
  3.8) What is the maximum size for a tuple?
d582 1
a582 1
  3.9) I defined indices but my queries don't seem to make use of them. Why?
d603 1
a603 1
  3.10) How do I do regular expression searches? case-insensitive regexp
d608 1
a608 1
  3.11) I experienced a server crash during a vacuum. How do I remove the lock
d613 1
a613 1
  3.12) What is the difference between the various character types?
d633 1
a633 1
  3.13) In a query, how do I detect if a field is NULL?
d637 1
a637 1
  3.14) How do I see how the query optimizer is evaluating my query?
d641 1
a641 1
  3.15) How do I create a serial field?
d648 2
a649 2
   We also have a SEQUENCE function that is similar to SERIAL. See the
   create_sequence manual page.
d672 1
a672 1
  3.16) What are the pg_psort.XXX files in my database directory?
d681 1
a681 1
  3.17) Why can't I connect to my database from another machine?
d688 1
a688 1
  3.18) How do I find out what indexes or operations are defined in the
d698 1
a698 7
  3.19) What is the time-warp feature and how does it relate to vacuum?
  
   PostgreSQL no longer supports this feature. All support code has been
   removed. This was done to improve performance and reduce disk storage
   overhead.
   
  3.20) What is an oid? What is a tid?
d704 3
a706 3
   equal or greater that this. All these oids are unique not only within
   a table, or database, but unique within the entire PostgreSQL
   installation.
d714 7
d726 1
a726 1
  3.21) What is the meaning of some of the terms used in PostgreSQL?
d742 1
a742 1
  3.22) What is Genetic Query Optimization?
d751 1
a751 1
  3.23) How do you remove a column from a table?
d761 1
a761 1
  3.24) How do SELECT only the first few rows of a query?
d767 3
a769 2
   first few rows. Consider a query that has and ORDER BY. There is no
   way to return any rows until the entire query is evaluated and sorted.
d771 1
a771 8
  3.25) Why can't I create a column named "time"?
  
   6.2.1 has added some new restricted keywords as we make PostgreSQL
   more ANSI-92 compilant. The next release will have this restriction
   removed. There is a patch on ftp.postgresql.org that will allow this
   feature now.
   
  3.26)How much database disk space is required to store data from a typical
a776 1

d795 28
a822 2
Indexes do not contain as much overhead, but do contain the data that
is being indexed, so they can be large also.
@


1.30
log
@Update FAQ.
@
text
@d546 1
a546 1
     * groname: the group name. This a char16 and should be purely
d625 1
a625 5
CHAR            char            1 character   }
CHAR2           char2           2 characters  }
CHAR4           char4           4 characters  } optimized for a fixed length
CHAR8           char8           8 characters  }
CHAR16          char16          16 characters }
@


1.29
log
@Prepare for release.
@
text
@d4 1
a4 1
   Last updated: Sat Feb 28 10:04:28 EST 1998
d37 1
a37 1
   1.14) What is a good book to learn SQL?
d60 2
a61 1
   2.13) How do I enable more than 32 concurrent backends?
d247 1
a247 2
   The latest release of PostgreSQL is version 6.3, which was released on
   March 1st, 1998.
d263 6
a268 2
   in the distribution. The sql and built-in manual pages are
   particularly important.
d275 1
a275 7
   PostgreSQL supports a subset of SQL-92. It has most of the important
   constructs but lacks some of the functionality. The most visible
   differences are:
     * no HAVING clause under a GROUP BY
       
   On the other hand, you get to create user-defined types, functions,
   inheritance etc.
d291 1
a291 1
   load it into 6.2.1 or 6.3 beta.
d308 3
a310 3
   http://www.openlinksw.com/postgres.html. It works with our standard
   ODBC client software so you'll have PostgreSQL ODBC available on every
   client platform we support (Win, Mac, Unix, VMS).
d340 1
a340 1
  1.14) What is a good book to learn SQL?
d342 1
d428 1
a428 1
   There are two things that can be done. You can disable fsync() by
d441 3
d494 11
d614 1
a614 1
   See the pgbuiltin manual page. Search for regular expression.
d698 1
a698 1
   pgsql/data/pg_hba. See the hba_conf manual page.
@


1.28
log
@Update for 6.3 release.
@
text
@d32 1
a32 1
   postgres?
d34 1
a34 1
   1.12) What tools are available for hooking postgres to Web pages?
d38 1
d89 1
a89 1
   3.21) What is the meaning of some of the terms used in Postgres?
d267 1
a267 1
   papers written about postgres design concepts and features.
d279 2
a280 1
  1.10) Does PostgreSQL work with databases from earlier versions of postgres?
d311 1
a311 1
   ODBC client software so you'll have Postgres ODBC available on every
d318 1
a318 1
  1.12) What tools are available for hooking postgres to Web pages?
d346 13
d594 1
a594 1
   Postgres does not warn the user when the improper index is created.
d642 1
a642 1
   Postgres does not allow the user to specifiy a user column as type
d705 7
a711 6
   Oids are Postgres's answer to unique row ids or serial columns. Every
   row that is created in Postgres gets a unique oid. All oids generated
   by initdb are less than 16384 (from backend/access/transam.h). All
   post-initdb (user-created) oids are equal or greater that this. All
   these oids are unique not only within a table, or database, but unique
   within the entire postgres installation.
d713 1
a713 1
   Postgres uses oids in its internal system tables to link rows in
d724 1
a724 1
  3.21) What is the meaning of some of the terms used in Postgres?
@


1.27
log
@Prepare for final release.
@
text
@d1 211
a211 258
<HTML>
<HEAD>
<TITLE>PostgreSQL FAQ</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#A00000" ALINK="#0
000FF">
<H1>
Frequently Asked Questions (FAQ) for PostgreSQL
</H1>
<P>
Last updated:           Wed Feb 25 14:37:07 EST 1998
<P>
Current maintainer:     Bruce Momjian (<a
href="mailto:maillist@@candle.pha.pa.us">maillist@@candle.pha.pa.us</a>)<BR>
<P>
The most recent version of this document can be viewed at
the postgreSQL Web site, <a
href="http://postgreSQL.org">http://postgreSQL.org</a>.
<P>
Linux-specific questions are answered in
<a href="http://postgreSQL.org/docs/faq-linux.shtml">http://postgreSQL.org/docs
/faq-linux.shtml</a>.
<P>
Irix-specific questions are answered in
<a href="http://postgreSQL.org/docs/faq-irix.shtml">http://postgreSQL.org/docs/
faq-irix.shtml</a>.
<P>
<HR>
<P>
<H2>Questions answered:</H2>
<H3> 1) General questions</H3>
<a href="#1.1">1.1</a>) What is PostgreSQL?<BR>
<a href="#1.2">1.2</a>) What does PostgreSQL run on?<BR>
<a href="#1.3">1.3</a>) Where can I get PostgreSQL?<BR>
<a href="#1.4">1.4</a>) What's the copyright on PostgreSQL?<BR>
<a href="#1.5">1.5</a>) Support for PostgreSQL<BR>
<a href="#1.6">1.6</a>) Latest release of PostgreSQL<BR>
<a href="#1.7">1.7</a>) Is there a commercial version of PostgreSQL?<BR>
<a href="#1.8">1.8</a>) What documentation is available for PostgreSQL?<BR>
<a href="#1.9">1.9</a>) What version of SQL does PostgreSQL use?<BR>
<a href="#1.10">1.10</a>)       Does PostgreSQL work with databases from
earlier versions of postgres?<BR>
<a href="#1.11">1.11</a>)       Are there ODBC drivers for
PostgreSQL?<BR>
<a href="#1.12">1.12</a>)       What tools are available for hooking
postgres to Web pages?<BR>
<a href="#1.13">1.13</a>)       Does PostgreSQL have a graphical user interface
?
A report generator? A embedded query language interface?<BR>
<a href="#1.14">1.14</a>)       What is a good book to learn SQL?<BR>

<H3> 2) Installation/Configuration questions</H3>
<a href="#2.1">2.1</a>) initdb doesn't run<BR>
<a href="#2.2">2.2</a>) when I start up the postmaster, I get
                "FindBackend: could not find a backend to execute..."
                "postmaster: could not find backend to execute..."<BR>
<a href="#2.3">2.3</a>) The system seems to be confused about commas,
decimal points, and date formats.<BR>
<a href="#2.4">2.4</a>) How do I install PostgreSQL somewhere other than
/usr/local/pgsql?<BR>
<a href="#2.5">2.5</a>) When I run postmaster, I get a Bad System Call
core dumped message.<BR>
<a href="#2.6">2.6</a>) When I try to start the postmaster, I get
IpcMemoryCreate errors.<BR>
<a href="#2.7">2.7</a>) I have changed a source file, but a
recompile does not see the change?<BR>
<a href="#2.8">2.8</a>) How do I prevent other hosts from accessing my
PostgreSQL<BR>
<a href="#2.9">2.9</a>) I can't access the database as the
'root' user.<BR>
<a href="#2.10">2.10</a>)       All my servers crash under concurrent
table access.  Why?<BR>
<a href="#2.11">2.11</a>)       How do I tune the database engine for
better performance?<BR>
<a href="#2.12">2.12</a>)       What debugging features are available in
PostgreSQL?<BR>
<a href="#2.13">2.13</a>)       How do I enable more than 32 concurrent
backends?
<H3> 3) Operational questions</H3>
<a href="#3.1">3.1</a>) Does PostgreSQL support nested subqueries?<BR>
<a href="#3.2">3.2</a>) I've having a lot of problems using rules.<BR>
<a href="#3.3">3.3</a>) I can't seem to write into the middle of large
objects reliably.<BR>
<a href="#3.4">3.4</a>) How can I write client applications to
PostgreSQL?<BR>
<a href="#3.5">3.5</a>) How do I set up a pg_group?<BR>
<a href="#3.6">3.6</a>) What is the exact difference between
binary cursors and normal cursors?<BR>
<a href="#3.7">3.7</a>) What is a R-tree index and what is it
used for?<BR>
<a href="#3.8">3.8</a>) What is the maximum size for a
tuple?<BR>
<a href="#3.9">3.9</a>) I defined indices but my queries don't
seem to make use of them. Why?<BR>
<a href="#3.10">3.10</a>)       How do I do regular expression searches?
case-insensitive regexp searching?<BR>
<a href="#3.11">3.11</a>)       I experienced a server crash during a
vacuum.  How do I remove the lock file?<BR>
<a href="#3.12">3.12</a>)       What is the difference between the
various character types?<BR>
<a href="#3.13">3.13</a>)       In a query, how do I detect if a field
is NULL?<BR>
<a href="#3.14">3.14</a>)       How do I see how the query optimizer is
evaluating my query?<BR>
<a href="#3.15">3.15</a>)       How do I create a serial field?<BR>
<a href="#3.16">3.16</a>)       What are the pg_psort.XXX files in my
database directory?<BR>
<a href="#3.17">3.17</a>)       Why can't I connect to my database from
another machine?<BR>
<a href="#3.18">3.18</a>)       How do I find out what indexes or
operations are defined in the database?<BR>
<a href="#3.19">3.19</a>)       What is the time-warp feature and how
does it relate to vacuum?<BR>
<a href="#3.20">3.20</a>)       What is an oid?  What is a tid?<BR>
<a href="#3.21">3.21</a>)       What is the meaning of some of the terms
used in Postgres?<BR>
<a href="#3.22">3.22</a>)       What is Genetic Query Optimization?<BR>
<a href="#3.23">3.23</a>)       How do you remove a column from a table?<BR>
<a href="#3.24">3.24</a>)       How do SELECT only the first few rows of
a query?<BR>
<a href="#3.25">3.25</a>)       Why can't I create a column named "time"?<BR>
<a href="#3.26">3.26</a>)       How much database disk space is required
to store data from a typical flat file?<BR>
<H3> 4) Questions about extending PostgreSQL</H3>
<a href="#4.1">4.1</a>) I wrote a user-defined function and when I run
it in psql, it dumps core.<BR>
<a href="#4.2">4.2</a>) I get messages of the type
NOTICE:PortalHeapMemoryFree: 0x402251d0<BR>
<a href="#4.3">4.3</a>) I've written some nifty new types and functions
for PostgreSQL.<BR>
<a href="#4.4">4.4</a>) How do I write a C function to return a
tuple?<BR>
<H3> 5) Bugs</H3>
<a href="#5.1">5.1</a>) How do I make a bug report?
<P>

<HR>
<H2> Section 1: General Questions</H2> <H3><a
name="1.1">1.1</a>)     What is PostgreSQL?</H3>
<P>
PostgreSQL is an enhancement of the POSTGRES database management system,
a next-generation DBMS research prototype.  While PostgreSQL retains the
powerful data model and rich data types of POSTGRES, it replaces the
PostQuel query language with an extended subset of SQL.  PostgreSQL is
free and the complete source is available.
<P>
PostgreSQL development is being performed by a team of Internet
developers who all subscribe to the PostgreSQL development mailing list.
The current coordinator is Marc G. Fournier (<a
href="mailto:scrappy@@postgreSQL.org">scrappy@@postgreSQL.org</a>). (See
below on how to join). This team is now responsible for all current and
future development of PostgreSQL.
<P>
The authors of PostgreSQL 1.01 were Andrew Yu and Jolly Chen. Many
others have contributed to the porting, testing, debugging and
enhancement of the code.  The original Postgres code, from which
PostgreSQL is derived, was the effort of many graduate students,
undergraduate students, and staff programmers working under the
direction of Professor Michael Stonebraker at the University of
California, Berkeley.
<P>
The original name of the software at Berkeley was Postgres.  When SQL
functionality was added in 1995, its name was changed to Postgres95. The
name was changed at the end of 1996 to PostgreSQL.
<P>
<H3><a name="1.2">1.2</a>)      What does PostgreSQL run
on?</H3>
<P>
The authors have compiled and tested PostgreSQL on the following
platforms(some of these compiles require gcc 2.7.0):
<UL>
<LI>   aix -           IBM on AIX 3.2.5 or 4.x
<LI>   alpha -         DEC Alpha AXP on Digital Unix 2.0, 3.2, 4.0
<LI>   BSD44_derived - OSs derived from 4.4-lite BSD (NetBSD, FreeBSD)
<LI>   bsdi -          BSD/OS 2.0, 2.01, 2.1, 3.0
<LI>   dgux -          DG/UX 5.4R4.11
<LI>   hpux -          HP PA-RISC on HP-UX 9.0, 10
<LI>   i386_solaris -  i386 Solaris
<LI>   irix5 -         SGI MIPS on IRIX 5.3
<LI>   linux -         Intel x86 on Linux 2.0 and Linux ELF
                       SPARC on Linux ELF
                       PPC on Linux Elf
                       (For non-ELF Linux, see LINUX_ELF below).
<LI>   sco -           SCO 3.2v5
<LI>   sparc_solaris - SUN SPARC on Solaris 2.4, 2.5, 2.5.1
<LI>   sunos4 -        SUN SPARC on SunOS 4.1.3
<LI>   svr4 -          Intel x86 on Intel SVR4 and MIPS
<LI>   ultrix4 -       DEC MIPS on Ultrix 4.4
</UL>
The following platforms have known problems/bugs:
<UL>
<LI>   nextstep -      Motorola MC68K or Intel x86 on NeXTSTEP 3.2
</UL>
<P>
<H3><a name="1.3">1.3</a>)      Where can I get PostgreSQL?</H3>
<P> The primary anonymous ftp site for PostgreSQL is:
<UL>
<LI>            <a
href="ftp://ftp.postgreSQL.org/pub">ftp://ftp.postgreSQL.org/pub</a>
</UL>
<P> A mirror site exists at:
<UL>
<LI>            <a
href="ftp://postgres95.vnet.net/pub/postgres95">ftp://postgres95.vnet.net/pub/p
ostgres95</a>
<LI>            <a
href="ftp://ftp.luga.or.at/pub/postgres95">ftp://ftp.luga.or.at/pub/postgres95<
/a>
<LI>            <a
href="ftp://cal011111.student.utwente.nl/pub/postgres95">ftp://cal011111.studen
t.utwente.nl/pub/postgres95</a>
<LI>            <a
href="ftp://ftp.uni-trier.de/pub/database/rdbms/postgres/postgres95">ftp://ftp.
uni-trier.de/pub/database/rdbms/postgres/postgres95</a>
<LI>            <a
href="ftp://rocker.sch.bme.hu">ftp://rocker.sch.bme.hu</a>
</UL>
<H3><a name="1.4">1.4</a>)      What's the copyright on
PostgreSQL?</H3>
<P>
PostgreSQL is subject to the following COPYRIGHT.
<P>
PostgreSQL Data Base Management System
<P>
Copyright (c) 1994-6 Regents of the University of California
<P>
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written
agreement is hereby granted, provided that the above copyright notice
and this paragraph and the following two paragraphs appear in all
copies.
<P>
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
<P>
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER
IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO
OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.
<P>
<H3><a name="1.5">1.5</a>)      Support for PostgreSQL </H3>
<P>
There is no official support for PostgreSQL from the original
maintainers or from University of California, Berkeley.  It is
maintained through volunteer effort only.
<P>
The main mailing list is: <a
href="mailto:questions@@postgreSQL.org">questions@@postgreSQL.org</a>. It
is available for discussion o f matters pertaining to PostgreSQL,
including but not limited to bug reports and fixes. For info on how to
subscribe, send a mail with the lines in the body (not the subject line)
<PRE>
<CODE>
d214 7
a220 14
</CODE>
</PRE>
<P>
to <a
href="mailto:questions-request@@postgreSQL.org">questions-request@@postgreSQL.org
</a>.
<P>
There is also a digest list available.  To subscribe to this list, send
email to:
<a
href="mailto:questions-digest-request@@postgreSQL.org">
questions-digest-request@@postgreSQL.org</a> with a BODY of:
<PRE>
<KBD>
d223 12
a234 18
</KBD>
</PRE>
Digests are sent out to members of this list whenever the main list has
received around 30k of messages.
<P>
There is a bugs mailing list available.  To subscribe to this
list, send email to <a
href="mailto:bugs-request@@postgreSQL.org">bugs-request@@postgreSQL.org</a>
with a BODY of:
<P>
There is also a developers discussion mailing list available.  To subscribe to
this
list, send email to <a
href="mailto:hackers-request@@postgreSQL.org">hackers-request@@postgreSQL.org</a>
with a BODY of:
<P>
<PRE>
<KBD>
d237 204
a440 250
</KBD>
</PRE>
<P>
Additional information about PostgreSQL can be found via the PostgreSQL
WWW home page at:
<BLOCKQUOTE>
                <a
href="http://postgreSQL.org">http://postgreSQL.org</a>
</BLOCKQUOTE>
<P>
<H3><a name="1.6">1.6</a>)      Latest release of PostgreSQL</H3>
<P>
The latest release of PostgreSQL is version 6.2.1, which was released on
October 17th, 1997.  We are testing 6.3 beta.  For information about
what is new in 6.3, see our TODO list on our WWW page.
<P>
We plan to have major releases every three months.
<P>
<H3><a name="1.7">1.7</a>)      Is there a commercial version of PostgreSQL?</H
3>
<P>
Illustra Information Technology (a wholly owned subsidiary of Informix
Software, Inc.) sells an object-relational DBMS called Illustra that was
originally based on postgres. Illustra has cosmetic similarities to
PostgreSQL but has more features, is more robust, performs better, and
offers real documentation and support.  On the flip side, it costs
money. For more information, contact <a
href="mailto:sales@@illustra.com">sales@@illustra.com</a>
<P>
<H3><a name="1.8">1.8</a>)      What documentation is available for PostgreSQL?
</H3>
<P>
A user manual, manual pages, and some small test examples are included
in the distribution.  The sql and built-in manual pages are particularly
important.
<P>
The www page contains pointers to an implementation guide and five
papers written about postgres design concepts and features.
<P>
<H3><a name="1.9">1.9</a>)      What version of SQL does PostgreSQL use?</H3>
<P>
PostgreSQL supports a subset of SQL-92.  It has most of the important
constructs but lacks some of the functionality. The most visible
differences are:
<UL>
<LI> no HAVING clause under a GROUP BY
</UL>
<P>
On the other hand, you get to create user-defined types, functions,
inheritance etc.
<P>
<H3><a name="1.10">1.10</a>)    Does PostgreSQL work with databases from
earlier versions of postgres?</H3>
<P>
PostgreSQL v1.09 is compatible with databases created with v1.01.
<P>
Upgrading to 6.3 from earlier releases requires a dump and restore.
<P>
Upgrading to 6.2.1 from pre-6.2 requires a dump and restore.
<P>
Upgrading to 6.2.1 from 6.2 does not require a dump, but see the
appropriate /migration file in the distribution.
<P>
Those ugrading from versions earlier than 1.09 must upgrade to 1.09
first without a dump/reload, then dump the data from 1.09, and then load
it into 6.2.1 or 6.3 beta.
<P>
<H3><a name="1.11">1.11</a>)    Are there ODBC drivers for PostgreSQL?</H3>
<P>
There are two ODBC drivers available, PostODBC and OpenLink ODBC.
<P>
PostODBC is included in the distribution.
For all people being interested in PostODBC, there are now two mailing
lists devoted to the discussion of PostODBC. The mailing lists are:
<UL>
<LI> <a
href="mailto:postodbc-users@@listserv.direct.net">postodbc-users@@listserv.direct
.
net</a>
<LI> <a
href="mailto:postodbc-developers@@listserv.direct.net">postodbc-developers@@lists
e
rv.direct.net</a>
</UL>
<P>
these lists are ordinary majordomo mailing lists.  You can subscribe by
sending a mail to:
<UL>
<LI>            <a
href="mailto:majordomo@@listserv.direct.net">majordomo@@listserv.direct.net</a>
</UL>
<P>
OpenLink ODBC is very popular. You can get it from <a
href="http://www.openlinksw.com/">
http://www.openlinksw.com/postgres.html</a>. It works with our standard
ODBC client software so you'll have Postgres ODBC available on every
client platform we support (Win, Mac, Unix, VMS).
<P>
We will probably be selling this product to people who need
commercial-quality support, but a freeware version will always be
available. Questions to <a
href="mailto:postgres95@@openlink.co.uk">postgres95@@openlink.co.uk</a>.
<P>
<H3><a name="1.12">1.12</a>)    What tools are available for hooking
postgres to Web pages?</H3>
<P>
A nice introduction to Database-backed Web pages can be seen at:
<a href="http://www.webtools.com">http://www.webtools.com</a>
<P>
For web integration, PHP is an excellent interface. The URL for that
is <a href="http://www.php.net">http://www.php.net</a>
<P>
PHP is great for simple stuff, but for more complex stuff, some still
use the perl interface and CGI.pm.
<P>
An WWW gatway based on WDB using perl can be downloaded from:
<UL>
<LI>
                <a
href="http://www.eol.ists.ca/~dunlop/wdb-p95">http://www.eol.ists.ca/~dunlop/wd
b
-p95</a>
</UL>
<H3><a name="1.13">1.13</a>)    Does PostgreSQL have a graphical user interface
?
A report generator? A embedded query language interface?</H3>
<P>
We have a nice graphical user interface called pgaccess, which is
shipped as part of the distribtion.  Pgaccess also has a report
generator.
<P>
We also have ecpg, which is an embedded SQL query language interface for
C.  This is also included.
<P>
<H3><a name="1.14">1.14</a>)    What is a good book to learn SQL?</H3>
<P>
Many of our users like <I>The Practical SQL Handbook</I>,
Bowman et al, Addison Wesley.
<P>

<HR>
<H2> Section 2: Installation Questions
</H2>
<P>
<H3><a name="2.1">2.1</a>)      initdb doesn't run</H3>
<P>
<UL>
<LI> check to see that you have the proper paths set
<LI> check that the 'postgres' user owns all the right files
<LI> ensure that there are files in $PGDATA/files, and that they
are non-empty.  If they aren't, then "gmake install" failed for
some reason
</UL>
<P>
<H3><a name="2.2">2.2</a>)      when I start up the postmaster, I get
                "FindBackend: could not find a backend to execute..."
                "postmaster: could not find backend to execute..."</H3>
<P>
You probably do not have the right path set up. The 'postgres'
executable needs to be in your path.
<P>
<H3><a name="2.3">2.3</a>)      The system seems to be confused about commas,
decimal points, and date formats.</H3>
<P>
Check your locale configuration. PostgreSQL uses the locale settings of
the user that ran the postmaster process.  Set those accordingly for
your operating environment.
<P>
<H3><a name="2.4">2.4</a>)      How do I install PostgreSQL somewhere other tha
n
/usr/local/pgsql?</H3>
<P>
You need to edit Makefile.global and change POSTGRESDIR accordingly, or
create a Makefile.custom and define POSTGRESDIR there.
<P>
<H3><a name="2.5">2.5</a>)      When I run postmaster, I get a Bad System
Call core dumped message.</H3>
<P>
It could be a variety of problems, but first check to see that you have
system V extensions installed on your kernel. PostgreSQL requires kernel
support for shared memory.
<P>
<H3><a name="2.6">2.6</a>)      When I try to start the postmaster, I get
IpcMemoryCreate errors.</H3>
<P>
You either do not have shared memory configured properly in kernel or
you need to enlarge the shared memory available in the kernel.  The
exact amount you need depends on your architecture  and how many buffers
you configure postmaster to run with.   For most systems, with default
buffer sizes, you need a minimum of ~760K.
<P>
<H3><a name="2.7">2.7</a>)      I have changed a source file, but a
recompile does not see the change?</H3>
<P>
The Makefiles do not have the proper dependencies for include files. You
have to do a 'make clean' and then another 'make'.
<P>
<H3><a name="2.8">2.8</a>)      How do I prevent other hosts from accessing my
PostgreSQL backend?</H3>
<P>
By default, PostgreSQL only allows connections from the local machine
using unix domain.  You must add the -i flag to the postmaster, and
enable host-based authentication by modifying the file $PGDATA/pg_hba
accordingly.
<P>
<H3><a name="2.9">2.9</a>)      I can't access the database as the 'root'
user.</H3>
<P>
You should not create database users with user id 0(root). They will  be
unable to access the database.  This is a security precaution  because
of the ability of any user to dynamically link object modules  into the
database engine.
<P>
<H3><a name="2.10">2.10</a>)    All my servers crash under concurrent table
access.  Why?</H3>
<P>
This problem can be caused by a kernel that is not configured to support
semaphores.
<P>
<H3><a name="2.11">2.11</a>)    How do I tune the database engine for
better performance?</H3>
<P>
There are two things that can be done.  You can disable fsync() by
starting the postmaster with a  '-o -F' option.  This
will prevent fsync()'s from flushing to disk after every transaction.
<P>
You can also use the postmaster -B option to increase the number of
shared memory buffers shared among the backend processes.  If you make
this parameter too high, the process will not start or crash
unexpectedly.  Each buffer is 8K and the defualt is 64 buffers.
<P>
You can also use the postgres -S option to increase the maximum
amount of memory used by each backend process for temporary sorts.
Each buffer is 1K and the defualt is 512 buffers.
<P>
<H3><a name="2.12">2.12</a>)    What debugging features are available in
PostgreSQL?</H3>
<P>
PostgreSQL has several features that report status information that can
be valuable for debugging purposes.
<P>
First, by running configure with the -enable-cassert option,
many assert()'s monitor the progress of the backend and halt the
program when something unexpected occurs.
<P>
Both postmaster and postgres have several debug options available.
First, whenever you start the postmaster, make sure you send the
standard output and error to a log file, like:
<PRE>
<KBD>
d442 70
a511 76
        ./bin/postmaster &gt;server.log 2&gt;&1 &
</KBD>
</PRE>
<P>
This will put a server.log file in the top-level PostgreSQL directory.
This file can contain useful information about problems or errors
encountered by the server.  Postmaster has a -d option that allows even
more detailed information to be reported.  The -d option takes a number
1-3 that specifies the debug level.  Be warned that a debug level
of 3 generates large log files.
<P>
You can actuall run the postgres backend from the command line, and type
your SQL statement directly.  This is recommended ONLY for debugging
purposes.  Note that a newline terminates the query, not a semicolon.  If
you have compiled with debugging symbols, you can use a debugger
to see what is happening.  Because the backend was not started from the
postmaster, it is not running in an identical environment and
locking/backend interaction problems may not be duplicated.  Some
operating system can attach to a running backend directly to diagnose
problems.
<P>
The postgres program has a -s, -A, -t options that can be very usefull
for debugging and performance measurements.
<P>
You can also compile with profiling to see what functions are taking
execution time.  The backend profile files will be deposited in the
pgsql/data/base/dbname directory.  The client profile file will be put
in the current directory.
<P>
The EXPLAIN command (see this FAQ) allows you to see how PostgreSQL is
interpreting your query.
<P>
<H3><a name="2.13">2.13</a>)    How do I enable more than 32 concurrent
backends?</H3>
<P>
Edit include/storage/sinvaladt.h, and change the value of MaxBackendId.
In the future, we plan to make this a configurable prameter.
<P>

<HR>
<H2> Section 3: PostgreSQL Features
</H2>
<P>
<H3><a name="3.1">3.1</a>)      Does PostgreSQL support nested subqueries?</H3>
<P>
Yes.
<P>
<H3><a name="3.2">3.2</a>)      I've having a lot of problems using rules.</H3>
<P>
Currently, the rule system in PostgreSQL has some limitations. It works
enough to support the view mechanism, but does not handle
Insert/Update/Delete well.
<P>
<H3><a name="3.3">3.3</a>)      I can't seem to write into the middle of large
objects reliably.</H3>
<P>
The Inversion large object system now works perfectly.  You should no
longer have problems with large objects.
<P>
<H3><a name="3.4">3.4</a>)      How can I write client applications to PostgreS
QL?</H3>
<P>
PostgreSQL supports a C-callable library interface called libpq as well
as many others.  See the /src/interfaces directory.
<P>
Others have contributed a perl interface and a WWW gateway to
PostgreSQL.  See the PostgreSQL home pages for more details.
<P>
<H3><a name="3.5">3.5</a>)      How do I set up a pg_group?</H3>
<P>
Currently, there is no easy interface to set up user groups. You have to
explicitly insert/update the pg_group table. For example:
<PRE>
<CODE>
        jolly=&gt; insert into pg_group (groname, grosysid, grolist)
        jolly=&gt;     values ('posthackers', '1234', '{5443, 8261}');
d513 1
a513 1
        jolly=&gt; grant insert on foo to group posthackers;
d515 80
a594 88
        jolly=&gt;
</CODE>
</PRE>
<P>
        The fields in pg_group are:
<UL>
<LI> groname:  the group name.  This a char16 and should
                          be purely alphanumeric.  Do not include underscores
                          or other punctuation.
<LI>            grosysid: the group id.  This is an int4.
                          This should be unique for each group.
<LI>            grolist:   the list of pg_user id's that belong in the group.
                          This is an int4[].
</UL>
<P>
<H3><a name="3.6">3.6</a>)      What is the exact difference between binary
cursors and normal cursors?</H3>
<P>
See the <I>declare</I> manual page for a description.
<P>
<H3><a name="3.7">3.7</a>)      What is a R-tree index and what is it used for?
</H3>
<P>
An r-tree index is used for indexing spatial data. A hash index can't
handle range searches. A B-tree index only handles range searches in a
single dimension. R-tree's can handle multi-dimensional data.  For
example, if a R-tree index can be built on an attribute of type 'point',
the system can more efficient answer queries like select all points
within a bounding rectangle.
<P>
The canonical paper that describes the original R-Tree design is:
<P>
Guttman, A. "R-Trees: A Dynamic Index Structure for Spatial Searching."
Proc of the 1984 ACM SIGMOD Int'l Conf on Mgmt of Data, 45-57.
<P>
You can also find this paper in Stonebraker's "Readings in Database
Systems"
<P>
Builtin R-Trees can handle polygons and boxes.  In theory, R-trees can
be extended to handle higher number of dimensions.  In practice,
extending R-trees require a bit of work and we don't currently have any
documentation on how to do it.
<P>
<H3><a name="3.8">3.8</a>)      What is the maximum size for a tuple?</H3>
<P>
Tuples are limited to 8K bytes.  Taking into account system attributes
and other overhead, one should stay well shy of 8,000 bytes to be on the
safe side.   To use attributes larger than 8K, try using the large
objects interface.
<P>
Tuples do not cross 8k boundaries so a 5k tuple will require 8k of
storage.
<P>
<H3><a name="3.9">3.9</a>)      I defined indices but my queries don't seem
to make use of them. Why?</H3>
<P>
PostgreSQL does not automatically maintain statistics.  One has to make
an explicit 'vacuum' call to update the statistics.   After statistics
are updated, the optimizer has a better shot at using indices.  Note
that the optimizer is limited and does not use indices in some
circumstances (such as OR clauses). For column-specific optimization
statistics, use 'vacuum analyze'.
<P>
If the system still does not see the index, it is probably because you
have created an index on a field with the improper *_ops type.  For
example, you have created a CHAR(4) field, but have specified a char_ops
index type_class.
<P>
See the create_index manual page for information on what type classes
are available.  It must match the field type.
<P>
Postgres does not warn the user when the improper index is created.
<P>
Indexes not used for ORDER BY operations.
<P>
<H3><a name="3.10">3.10</a>)    How do I do regular expression searches?
case-insensitive regexp searching?</H3>
<P>
See the <I>pgbuiltin</I> manual page.  Search for <I>regular expression.</I>
<P>
<H3><a name="3.11">3.11</a>)    I experienced a server crash during a
vacuum.  How do I remove the lock file?</H3>
<P>
See the <I>vacuum</I> manual page.
<P>
<H3><a name="3.12">3.12</a>)    What is the difference between the various
character types?</H3>
<PRE>
d606 31
a636 35
</PRE>
<P>
You need to use the internal name when doing internal operations.
<P>
The last four types above are "varlena" types (i.e. the first four bytes
are the length, followed by the data). CHAR(#) allocates the maximum
number of bytes no matter how much data is stored in the field.
TEXT, VARCHAR(#), and BYTEA all have variable length on the disk, and
because of this, there is a small performance penalty for using them.
Specifically, the penalty is for access to any columns after the first
column of this type.
<P>
<H3><a name="3.13">3.13</a>)    In a query, how do I detect if a field is NULL?
</H3>
<P>
You test the column with IS NULL and IS NOT NULL.
<P>
<H3><a name="3.14">3.14</a>)    How do I see how the query optimizer is
evaluating my query?</H3>
<P>
See the <I>explain</I> manual page.
<P>
<H3><a name="3.15">3.15</a>)    How do I create a serial field?</H3>
<P>
Postgres does not allow the user to specifiy a user column as type
SERIAL.  Instead, you can use each row's oid field as a unique value.
However, if you need to dump and reload the database, you need to use
pgdump's -o option or COPY's WITH OIDS option to preserver the oids.
<P>
We also have a SEQUENCE function that is similar to SERIAL.  See the
create_sequence manual page.
<P>
Another valid way of doing this is to create a function:
<PRE>
<CODE>
d642 3
a644 6
</CODE>
</PRE>
<P>
then:
<PRE>
<CODE>
d647 90
a736 98
</CODE>
</PRE>
<P>
However, keep in mind there is a race condition here where one server
could do the update, then another one do an update, and they both could
select the same new id.  This statement should be performed within a
transaction.
<P>
Yet another way is to use general trigger function autoinc()
from contrib/spi/autoinc.c.
<P>
<H3><a name="3.16">3.16</a>)    What are the pg_psort.XXX files in my database
directory?</H3>
<P>
They are temporary sort files generated by the query executor.
For example, if a sort needs to be done to satisfy an ORDER BY,
some temp files are generated as a result of the sort.
<P>
If you have no transactions or sorts running at the time, it is safe to
delete the pg_psort.XXX files.
<P>
<H3><a name="3.17">3.17</a>)    Why can't I connect to my database from
another machine?</H3>
<P>
The default configuration allows only unix domain socket connections
from the local machine.  To enable TCP/IP connections, use the
postmaster -i option  You need to add a host entry to the file
pgsql/data/pg_hba.  See the <I>hba_conf</I> manual page.
<P>
<H3><a name="3.18">3.18</a>)    How do I find out what indexes or
operations are defined in the database?</H3>
<P>
psql has a variety of backslash commands to show such information.  Use
\? to see them.
<P>
Also try the file pgsql/src/tutorial/syscat.source.  It illustrates many of
the 'select's needed to get information out of the database system
tables.
<P>
<H3><a name="3.19">3.19</a>)    What is the time-warp feature and how does
it relate to vacuum?</H3>
<P>
PostgreSQL no longer supports this feature.  All support code has been
removed.  This was done to improve performance and reduce disk storage
overhead.
<P>
<H3><a name="3.20">3.20</a>)    What is an oid?  What is a tid?</H3>
<P>
Oids are Postgres's answer to unique row ids or serial columns.  Every
row that is created in Postgres gets a unique oid.  All oids generated
by initdb are less than 16384 (from backend/access/transam.h).  All
post-initdb (user-created) oids are equal or greater that this.  All
these oids are unique not only within a table, or database, but unique
within the entire postgres installation.
<P>
Postgres uses oids in its internal system tables to link rows in
separate tables.  These oids can be used to identify specific user rows
and used in joins.  It is recommended you use column type oid to store
oid values.  See the sql(l) manual page to see the other internal
columns.  You can create an index on the oid field for faster access.
<P>
Tids are used to indentify specific physical rows with block and offset
values.  Tids change after rows are modified or reloaded.  They are used
by index entries to point to physical rows.  They can not be accessed
through sql.
<P>
<H3><a name="3.21">3.21</a>)    What is the meaning of some of the terms
used in Postgres?</H3>
<P>
Some of the source code and older documentation use terms that have more
common usage.  Here are some:
<UL>
<LI> row, record, tuple
<LI> attribute, field, column
<LI> table, class
<LI> retrieve, select
<LI> replace, update
<LI> append, insert
<LI> oid, serial value
<LI> portal, cursor
<LI> range variable, table name, table alias
</UL>
<P>
Please let me know if you think of any more.
<P>
<H3><a name="3.22">3.22</a>)    What is Genetic Query Optimization?</H3>
<P>
The GEQO module in PostgreSQL is intended to solve the query
optimization problem of joining many tables by means of a Genetic
Algorithm (GA). It allows the handling of large join queries through
non-exhaustive search.
<P>
For further information see README.GEQO &lt;utesch@@aut.tu-freiberg.de&gt;.
<P>
<H3><a name="3.23">3.23</a>)    How do you remove a column from a table?</H3>
We do not support ALTER TABLE DROP COLUMN, but do this:
<PRE>
<CODE>
d742 24
a765 28
</CODE>
</PRE>
<P>
<H3><a name="3.24">3.24</a>)    How do SELECT only the first few rows of
a query?</H3>
<P>
See the <I>fetch</I> manual page.
<P>
This only prevents all row results from being transfered to the client.
The entire query must be evaluated, even if you only want just first few
rows.
Consider a query that has and ORDER BY.  There is no way to return any
rows until the entire query is evaluated and sorted.
<P>
<H3><a name="3.25">3.25</a>)    Why can't I create a column named
"time"?<BR></H3>
<P>
6.2.1 has added some new restricted keywords as we make PostgreSQL more
ANSI-92 compilant.  The next release will have this restriction removed.
There is a patch on ftp.postgresql.org that will allow this feature now.
<P>
<H3><a name="3.26">3.26</a>)How much database disk space is required
to store data from a typical flat file?<BR></H3>
<P>
Consider a file with 300,000 lines with two integers on each line.
The flat file is 2.4MB.  The size of the PostgreSQL database file
containing this data can be estimated:
<PRE>
d783 1
a783 1
<P>
d786 34
a819 60
</PRE>
<P>
<HR>
<H2> Section 4: Extending PostgreSQL
</H2>
<P>
<H3><a name="4.1">4.1</a>)      I wrote a user-defined function and when I run
it
in psql, it dumps core.</H3>
<P>
The problem could be a number of things.  Try testing your user-defined
function in a stand alone test program first. Also, make sure you are
not sending elog NOTICES when the front-end is expecting data, such as
during a type_in() or type_out() functions
<P>
<H3><a name="4.2">4.2</a>)      I get messages of the type
        NOTICE:PortalHeapMemoryFree: 0x402251d0 not in alloc set!</H3>
<P>
You are pfree'ing something that was not palloc'ed.  When writing
user-defined functions, do not include the file "libpq-fe.h".  Doing so
will cause your palloc to be a malloc instead of a free.  Then, when the
backend pfrees the storage, you get the notice message.
<P>
<H3><a name="4.3">4.3</a>)      I've written some nifty new types and functions
 for
PostgreSQL.</H3>
<P>
Please share them with other PostgreSQL users.  Send your extensions to
mailing list, and they will eventually end up in the contrib/
subdirectory.
<P>
<H3><a name="4.4">4.4</a>)      How do I write a C function to return a tuple?<
/H3>
<P>
This requires extreme wizardry, so extreme that the authors have not
ever tried it, though in principle it can be done. The short answer is
... you can't.   This capability is forthcoming in the future.
<P>

<HR>
<H2> Section 5: Bugs
</H2>
<P>
<H3><a name="5.1">5.1</a>)      How do I make a bug report?</H3>
<P>
Check the current FAQ at <a
href="http://postgreSQL.org">http://postgreSQL.org</a>
<P>
Also check out our ftp site <a
href="ftp://ftp.postgreSQL.org/pub">ftp://ftp.postgreSQL.org/pub</a> to
see if there is a more recent PostgreSQL version.
<P>
You can also fill out the "bug-template" file and send it to:
<UL>
<LI>            <a href="mailto:bugs@@postgreSQL.org">bugs@@postgreSQL.org</a>
</UL>
<P>
This is the address of the developers mailing list.
</BODY>
</HTML>
d821 11
@


1.26
log
@Update FAQ's for release.
@
text
@d1 7
d9 11
a19 8

Last updated: Sun Feb 1 16:13:28 EST 1998

Current maintainer: Bruce Momjian (maillist@@candle.pha.pa.us)

The most recent version of this document can be viewed at the postgreSQL Web
site, http://postgreSQL.org.

d21 3
a23 2
http://postgreSQL.org/docs/faq-linux.shtml.

d25 118
a142 95
http://postgreSQL.org/docs/faq-irix.shtml.

  ------------------------------------------------------------------------

Questions answered:

1) General questions

1.1) What is PostgreSQL?
1.2) What does PostgreSQL run on?
1.3) Where can I get PostgreSQL?
1.4) What's the copyright on PostgreSQL?
1.5) Support for PostgreSQL
1.6) Latest release of PostgreSQL
1.7) Is there a commercial version of PostgreSQL?
1.8) What documentation is available for PostgreSQL?
1.9) What version of SQL does PostgreSQL use?
1.10) Does PostgreSQL work with databases from earlier versions of postgres?
1.11) Are there ODBC drivers for PostgreSQL?
1.12) What tools are available for hooking postgres to Web pages?
1.13) Does PostgreSQL have a graphical user interface? A report generator? A
embedded query language interface?
1.14) What is a good book to learn SQL?

2) Installation/Configuration questions

2.1) initdb doesn't run
2.2) when I start up the postmaster, I get "FindBackend: could not find a
backend to execute..." "postmaster: could not find backend to execute..."
2.3) The system seems to be confused about commas, decimal points, and date
formats.
2.4) How do I install PostgreSQL somewhere other than /usr/local/pgsql?
2.5) When I run postmaster, I get a Bad System Call core dumped message.
2.6) When I try to start the postmaster, I get IpcMemoryCreate errors.
2.7) I have changed a source file, but a recompile does not see the change?
2.8) How do I prevent other hosts from accessing my PostgreSQL
2.9) I can't access the database as the 'root' user.
2.10) All my servers crash under concurrent table access. Why?
2.11) How do I tune the database engine for better performance?
2.12) What debugging features are available in PostgreSQL?
2.13) How do I enable more than 32 concurrent backends?

3) Operational questions

3.1) Does PostgreSQL support nested subqueries?
3.2) I've having a lot of problems using rules.
3.3) I can't seem to write into the middle of large objects reliably.
3.4) How can I write client applications to PostgreSQL?
3.5) How do I set up a pg_group?
3.6) What is the exact difference between binary cursors and normal cursors?
3.7) What is a R-tree index and what is it used for?
3.8) What is the maximum size for a tuple?
3.9) I defined indices but my queries don't seem to make use of them. Why?
3.10) How do I do regular expression searches? case-insensitive regexp
searching?
3.11) I experienced a server crash during a vacuum. How do I remove the lock
file?
3.12) What is the difference between the various character types?
3.13) In a query, how do I detect if a field is NULL?
3.14) How do I see how the query optimizer is evaluating my query?
3.15) How do I create a serial field?
3.16) What are the pg_psort.XXX files in my database directory?
3.17) Why can't I connect to my database from another machine?
3.18) How do I find out what indexes or operations are defined in the
database?
3.19) What is the time-warp feature and how does it relate to vacuum?
3.20) What is an oid? What is a tid?
3.21) What is the meaning of some of the terms used in Postgres?
3.22) What is Genetic Query Optimization?
3.23) How do you remove a column from a table?
3.24) How do SELECT only the first few rows of a query?
3.25) Why can't I create a column named "time"?
3.26) How much database disk space is required to store data from a typical
flat file?

4) Questions about extending PostgreSQL

4.1) I wrote a user-defined function and when I run it in psql, it dumps
core.
4.2) I get messages of the type NOTICE:PortalHeapMemoryFree: 0x402251d0
4.3) I've written some nifty new types and functions for PostgreSQL.
4.4) How do I write a C function to return a tuple?

5) Bugs

5.1) How do I make a bug report?

  ------------------------------------------------------------------------

Section 1: General Questions

1.1) What is PostgreSQL?

PostgreSQL is an enhancement of the POSTGRES database management system, a
next-generation DBMS research prototype. While PostgreSQL retains the
d144 19
a162 17
PostQuel query language with an extended subset of SQL. PostgreSQL is free
and the complete source is available.

PostgreSQL development is being performed by a team of Internet developers
who all subscribe to the PostgreSQL development mailing list. The current
coordinator is Marc G. Fournier (scrappy@@postgreSQL.org). (See below on how
to join). This team is now responsible for all current and future
development of PostgreSQL.

The authors of PostgreSQL 1.01 were Andrew Yu and Jolly Chen. Many others
have contributed to the porting, testing, debugging and enhancement of the
code. The original Postgres code, from which PostgreSQL is derived, was the
effort of many graduate students, undergraduate students, and staff
programmers working under the direction of Professor Michael Stonebraker at
the University of California, Berkeley.

The original name of the software at Berkeley was Postgres. When SQL
d165 4
a168 3

1.2) What does PostgreSQL run on?

d171 19
a189 17

   * aix - IBM on AIX 3.2.5 or 4.x
   * alpha - DEC Alpha AXP on Digital Unix 2.0, 3.2, 4.0
   * BSD44_derived - OSs derived from 4.4-lite BSD (NetBSD, FreeBSD)
   * bsdi - BSD/OS 2.0, 2.01, 2.1, 3.0
   * dgux - DG/UX 5.4R4.11
   * hpux - HP PA-RISC on HP-UX 9.0, 10
   * i386_solaris - i386 Solaris
   * irix5 - SGI MIPS on IRIX 5.3
   * linux - Intel x86 on Linux 2.0 and Linux ELF SPARC on Linux ELF PPC on
     Linux Elf (For non-ELF Linux, see LINUX_ELF below).
   * sco - SCO 3.2v5
   * sparc_solaris - SUN SPARC on Solaris 2.4, 2.5, 2.5.1
   * sunos4 - SUN SPARC on SunOS 4.1.3
   * svr4 - Intel x86 on Intel SVR4 and MIPS
   * ultrix4 - DEC MIPS on Ultrix 4.4

d191 30
a220 19

   * nextstep - Motorola MC68K or Intel x86 on NeXTSTEP 3.2

1.3) Where can I get PostgreSQL?

The primary anonymous ftp site for PostgreSQL is:

   * ftp://ftp.postgreSQL.org/pub

A mirror site exists at:

   * ftp://postgres95.vnet.net/pub/postgres95
   * ftp://ftp.luga.or.at/pub/postgres95
   * ftp://cal011111.student.utwente.nl/pub/postgres95
   * ftp://ftp.uni-trier.de/pub/database/rdbms/postgres/postgres95
   * ftp://rocker.sch.bme.hu

1.4) What's the copyright on PostgreSQL?

d222 1
a222 1

d224 1
a224 1

d226 1
a226 1

d228 11
a238 10
documentation for any purpose, without fee, and without a written agreement
is hereby granted, provided that the above copyright notice and this
paragraph and the following two paragraphs appear in all copies.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

d240 19
a258 16
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
"AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

1.5) Support for PostgreSQL

There is no official support for PostgreSQL from the original maintainers or
from University of California, Berkeley. It is maintained through volunteer
effort only.

The main mailing list is: questions@@postgreSQL.org. It is available for
discussion o f matters pertaining to PostgreSQL, including but not limited
to bug reports and fixes. For info on how to subscribe, send a mail with the
lines in the body (not the subject line)

d261 14
a274 6

to questions-request@@postgreSQL.org.

There is also a digest list available. To subscribe to this list, send email
to: questions-digest-request@@postgreSQL.org with a BODY of:

d277 2
a278 1

d281 14
a294 7

There is a bugs mailing list available. To subscribe to this list, send
email to bugs-request@@postgreSQL.org with a BODY of:

There is also a developers discussion mailing list available. To subscribe
to this list, send email to hackers-request@@postgreSQL.org with a BODY of:

d297 12
a308 8

Additional information about PostgreSQL can be found via the PostgreSQL WWW
home page at:

     http://postgreSQL.org

1.6) Latest release of PostgreSQL

d310 3
a312 3
October 17th, 1997. We are testing 6.3 beta. For information about what is
new in 6.3, see our TODO list on our WWW page.

d314 4
a317 3

1.7) Is there a commercial version of PostgreSQL?

d322 9
a330 7
offers real documentation and support. On the flip side, it costs money. For
more information, contact sales@@illustra.com

1.8) What documentation is available for PostgreSQL?

A user manual, manual pages, and some small test examples are included in
the distribution. The sql and built-in manual pages are particularly
d332 13
a344 13

The www page contains pointers to an implementation guide and five papers
written about postgres design concepts and features.

1.9) What version of SQL does PostgreSQL use?

PostgreSQL supports a subset of SQL-92. It has most of the important
constructs but lacks some of the functionality. The most visible differences
are:

   * no support for nested subqueries
   * no HAVING clause under a GROUP BY

d346 5
a350 5
inheritance etc. If you're willing to help with PostgreSQL coding,
eventually we can also add the missing features listed above.

1.10) Does PostgreSQL work with databases from earlier versions of postgres?

d352 1
a352 1

d354 1
a354 1

d356 10
a365 10

Upgrading to 6.2.1 from 6.2 does not require a dump, but see the appropriate
/migration file in the distribution.

Those ugrading from versions earlier than 1.09 must upgrade to 1.09 first
without a dump/reload, then dump the data from 1.09, and then load it into
6.2.1 or 6.3 beta.

1.11) Are there ODBC drivers for PostgreSQL?

d367 16
a382 8

For all people being interested in PostODBC, there are now two mailing lists
devoted to the discussion of PostODBC. The mailing lists are:

   * postodbc-users@@listserv.direct. net
   * postodbc-developers@@listse rv.direct.net

these lists are ordinary majordomo mailing lists. You can subscribe by
d384 11
a394 8

   * majordomo@@listserv.direct.net

OpenLink ODBC is very popular. You can get it from
http://www.openlinksw.com/postgres.html. It works with our standard ODBC
client software so you'll have Postgres ODBC available on every client
platform we support (Win, Mac, Unix, VMS).

d396 7
a402 5
commercial-quality support, but a freeware version will always be available.
Questions to postgres95@@openlink.co.uk.

1.12) What tools are available for hooking postgres to Web pages?

d404 8
a411 8
http://www.webtools.com

For web integration, PHP is an excellent interface. The URL for that is
http://php.iquest.net

PHP is great for simple stuff, but for more complex stuff, some still use
the perl interface and CGI.pm.

d413 56
a468 42

   * http://www.eol.ists.ca/~dunlop/wdb -p95

1.13) Does PostgreSQL have a graphical user interface? A report generator? A
embedded query language interface?

No. No. No. Not in the official distribution at least. Some users have
reported some success at using 'pgbrowse' and 'onyx' as frontends to
PostgreSQL. Several contributions are working on tk based frontend tools.
Ask on the mailing list.

1.14) What is a good book to learn SQL?

Many of our users like The Practical SQL Handbook, Bowman et al, Addison
Wesley.

  ------------------------------------------------------------------------

Section 2: Installation Questions

2.1) initdb doesn't run

   * check to see that you have the proper paths set
   * check that the 'postgres' user owns all the right files
   * ensure that there are files in $PGDATA/files, and that they are
     non-empty. If they aren't, then "gmake install" failed for some reason

2.2) when I start up the postmaster, I get "FindBackend: could not find a
backend to execute..." "postmaster: could not find backend to execute..."

You probably do not have the right path set up. The 'postgres' executable
needs to be in your path.

2.3) The system seems to be confused about commas, decimal points, and date
formats.

Check your locale configuration. PostgreSQL uses the locale settings of the
user that ran the postmaster process. Set those accordingly for your
operating environment.

2.4) How do I install PostgreSQL somewhere other than /usr/local/pgsql?

d471 4
a474 3

2.5) When I run postmaster, I get a Bad System Call core dumped message.

d478 13
a490 11

2.6) When I try to start the postmaster, I get IpcMemoryCreate errors.

You either do not have shared memory configured properly in kernel or you
need to enlarge the shared memory available in the kernel. The exact amount
you need depends on your architecture and how many buffers you configure
postmaster to run with. For most systems, with default buffer sizes, you
need a minimum of ~760K.

2.7) I have changed a source file, but a recompile does not see the change?

d493 7
a499 4

2.8) How do I prevent other hosts from accessing my PostgreSQL backend?

Use host-based authentication by modifying the file $PGDATA/pg_hba
d501 12
a512 10

2.9) I can't access the database as the 'root' user.

You should not create database users with user id 0(root). They will be
unable to access the database. This is a security precaution because of the
ability of any user to dynamically link object modules into the database
engine.

2.10) All my servers crash under concurrent table access. Why?

d515 32
a546 29

2.11) How do I tune the database engine for better performance?

There are two things that can be done. You can use Openlink's option to
disable fsync() by starting the postmaster with a '-o -F' option. This will
prevent fsync()'s from flushing to disk after every transaction.

You can also use the postmaster -B option to increase the number of shared
memory buffers shared among the backend processes. If you make this
parameter too high, the process will not start or crash unexpectedly. Each
buffer is 8K and the defualt is 64 buffers.

You can also use the postgres -S option to increase the maximum amount of
memory used by each backend process for temporary sorts. Each buffer is 1K
and the defualt is 512 buffers.

2.12) What debugging features are available in PostgreSQL?

PostgreSQL has several features that report status information that can be
valuable for debugging purposes.

First, by running configure with the -enable-cassert option, many assert()'s
monitor the progress of the backend and halt the program when something
unexpected occurs.

Both postmaster and postgres have several debug options available. First,
whenever you start the postmaster, make sure you send the standard output
and error to a log file, like:

d548 11
a558 9
        ./bin/postmaster >server.log 2>&1 &

This will put a server.log file in the top-level PostgreSQL directory. This
file can contain useful information about problems or errors encountered by
the server. Postmaster has a -d option that allows even more detailed
information to be reported. The -d option takes a number 1-3 that specifies
the debug level. Be warned that a debug level of 3 generates large log
files.

d560 12
a571 11
your SQL statement directly. This is recommended ONLY for debugging
purposes. Note that a newline terminates the query, not a semicolon. If you
have compiled with debugging symbols, you can use a debugger to see what is
happening. Because the backend was not started from the postmaster, it is
not running in an identical environment and locking/backend interaction
problems may not be duplicated. Some operating system can attach to a
running backend directly to diagnose problems.

The postgres program has a -s, -A, -t options that can be very usefull for
debugging and performance measurements.

d573 4
a576 4
execution time. The backend profile files will be deposited in the
pgsql/data/base/dbname directory. The client profile file will be put in the
current directory.

d579 39
a617 38

2.13) How do I enable more than 32 concurrent backends?

Edit include/storage/sinvaladt.h, and change the value of MaxBackendId. In
the future, we plan to make this a configurable prameter.

  ------------------------------------------------------------------------

Section 3: PostgreSQL Features

3.1) Does PostgreSQL support nested subqueries?

Subqueries are not implemented, but they can be simulated using sql
functions.

3.2) I've having a lot of problems using rules.

Currently, the rule system in PostgreSQL is mostly broken. It works enough
to support the view mechanism, but that's about it. Use PostgreSQL rules at
your own peril.

3.3) I can't seem to write into the middle of large objects reliably.

The Inversion large object system in PostgreSQL is also mostly broken. It
works well enough for storing large wads of data and reading them back out,
but the implementation has some underlying problems. Use PostgreSQL large
objects at your own peril.

3.4) How can I write client applications to PostgreSQL?

PostgreSQL supports a C-callable library interface called libpq as well as
many others. See the /src/interfaces directory.

Others have contributed a perl interface and a WWW gateway to PostgreSQL.
See the PostgreSQL home pages for more details.

3.5) How do I set up a pg_group?

d620 4
a623 3

        jolly=> insert into pg_group (groname, grosysid, grolist)
        jolly=>     values ('posthackers', '1234', '{5443, 8261}');
d625 1
a625 1
        jolly=> grant insert on foo to group posthackers;
d627 30
a656 24
        jolly=>

The fields in pg_group are:

   * groname: the group name. This a char16 and should be purely
     alphanumeric. Do not include underscores or other punctuation.
   * grosysid: the group id. This is an int4. This should be unique for each
     group.
   * grolist: the list of pg_user id's that belong in the group. This is an
     int4[].

3.6) What is the exact difference between binary cursors and normal cursors?

See the declare manual page for a description.

3.7) What is a R-tree index and what is it used for?

An r-tree index is used for indexing spatial data. A hash index can't handle
range searches. A B-tree index only handles range searches in a single
dimension. R-tree's can handle multi-dimensional data. For example, if a
R-tree index can be built on an attribute of type 'point', the system can
more efficient answer queries like select all points within a bounding
rectangle.

d658 40
a697 37

Guttman, A. "R-Trees: A Dynamic Index Structure for Spatial Searching." Proc
of the 1984 ACM SIGMOD Int'l Conf on Mgmt of Data, 45-57.

You can also find this paper in Stonebraker's "Readings in Database Systems"

Builtin R-Trees can handle polygons and boxes. In theory, R-trees can be
extended to handle higher number of dimensions. In practice, extending
R-trees require a bit of work and we don't currently have any documentation
on how to do it.

3.8) What is the maximum size for a tuple?

Tuples are limited to 8K bytes. Taking into account system attributes and
other overhead, one should stay well shy of 8,000 bytes to be on the safe
side. To use attributes larger than 8K, try using the large objects
interface.

Tuples do not cross 8k boundaries so a 5k tuple will require 8k of storage.

3.9) I defined indices but my queries don't seem to make use of them. Why?

PostgreSQL does not automatically maintain statistics. One has to make an
explicit 'vacuum' call to update the statistics. After statistics are
updated, the optimizer has a better shot at using indices. Note that the
optimizer is limited and does not use indices in some circumstances (such as
OR clauses). For column-specific optimization statistics, use 'vacuum
analyze'.

If the system still does not see the index, it is probably because you have
created an index on a field with the improper *_ops type. For example, you
have created a CHAR(4) field, but have specified a char_ops index
type_class.

See the create_index manual page for information on what type classes are
available. It must match the field type.

d699 1
a699 1

d701 14
a714 13

3.10) How do I do regular expression searches? case-insensitive regexp
searching?

See the pgbuiltin manual page. Search for regular expression.

3.11) I experienced a server crash during a vacuum. How do I remove the lock
file?

See the vacuum manual page.

3.12) What is the difference between the various character types?

d726 2
a727 1

d729 12
a740 10

The last four types above are "varlena" types (i.e. the first four bytes are
the length, followed by the data). CHAR(#) allocates the maximum number of
bytes no matter how much data is stored in the field. TEXT, VARCHAR(#), and
BYTEA all have variable length on the disk, and because of this, there is a
small performance penalty for using them. Specifically, the penalty is for
access to any columns after the first column of this type.

3.13) In a query, how do I detect if a field is NULL?

d742 14
a755 13

3.14) How do I see how the query optimizer is evaluating my query?

See the explain manual page.

3.15) How do I create a serial field?

Postgres does not allow the user to specifiy a user column as type SERIAL.
Instead, you can use each row's oid field as a unique value. However, if you
need to dump and reload the database, you need to use pgdump's -o option or
COPY's WITH OIDS option to preserver the oids.

We also have a SEQUENCE function that is similar to SERIAL. See the
d757 1
a757 1

d759 2
a760 1

d766 3
a768 1

d770 2
a771 1

d774 18
a791 14

However, keep in mind there is a race condition here where one server could
do the update, then another one do an update, and they both could select the
same new id. This statement should be performed within a transaction.

Yet another way is to use general trigger function autoinc() from
contrib/spi/autoinc.c.

3.16) What are the pg_psort.XXX files in my database directory?

They are temporary sort files generated by the query executor. For example,
if a sort needs to be done to satisfy an ORDER BY, some temp files are
generated as a result of the sort.

d794 41
a834 56

3.17) Why can't I connect to my database from another machine?

The default configuration allows only connections from tcp/ip host
localhost. You need to add a host entry to the file pgsql/data/pg_hba. See
the hba_conf manual page.

3.18) How do I find out what indexes or operations are defined in the
database?

Run the file pgsql/src/tutorial/syscat.source. It illustrates many of the
'select's needed to get information out of the database system tables.

3.19) What is the time-warp feature and how does it relate to vacuum?

PostgreSQL handles data changes differently than most database systems. When
a row is changed in a table, the original row is marked with the time it was
changed, and a new row is created with the current data. By default, only
current rows are used in a table. If you specify a date/time after the table
name in a FROM clause, you can access the data that was current at that
time, i.e.

        SELECT *
        FROM employees ['July 24, 1996 09:00:00']

displays employee rows in the table at the specified time. You can specify
intervals like [date,date], [date,], [,date], or [,]. This last option
accesses all rows that ever existed.

INSERTed rows get a timestamp too, so rows that were not in the table at the
desired time will not appear.

Vacuum removes rows that are no longer current. This time-warp feature is
used by the engine for rollback and crash recovery. Expiration times can be
set with purge.

In 6.0, once a table is vacuumed, the creation time of a row may be
incorrect, causing time-traval to fail.

The time-travel feature will be removed in 6.3.

3.20) What is an oid? What is a tid?

Oids are Postgres's answer to unique row ids or serial columns. Every row
that is created in Postgres gets a unique oid. All oids generated by initdb
are less than 16384 (from backend/access/transam.h). All post-initdb
(user-created) oids are equal or greater that this. All these oids are
unique not only within a table, or database, but unique within the entire
postgres installation.

Postgres uses oids in its internal system tables to link rows in separate
tables. These oids can be used to identify specific user rows and used in
joins. It is recommended you use column type oid to store oid values. See
the sql(l) manual page to see the other internal columns. You can create an
index on the oid field for faster access.

d836 7
a842 6
values. Tids change after rows are modified or reloaded. They are used by
index entries to point to physical rows. They can not be accessed through
sql.

3.21) What is the meaning of some of the terms used in Postgres?

d844 13
a856 12
common usage. Here are some:

   * row, record, tuple
   * attribute, field, column
   * table, class
   * retrieve, select
   * replace, update
   * append, insert
   * oid, serial value
   * portal, cursor
   * range variable, table name, table alias

d858 11
a868 11

3.22) What is Genetic Query Optimization?

The GEQO module in PostgreSQL is intended to solve the query optimization
problem of joining many tables by means of a Genetic Algorithm (GA). It
allows the handling of large join queries through non-exhaustive search.

For further information see README.GEQO <utesch@@aut.tu-freiberg.de>.

3.23) How do you remove a column from a table?

d870 2
a871 1

d877 17
a893 12

3.24) How do SELECT only the first few rows of a query?

See the fetch manual page.

This only prevents all row results from being transfered to the client. The
entire query must be evaluated, even if you only want just first few rows.
Consider a query that has and ORDER BY. There is no way to return any rows
until the entire query is evaluated and sorted.

3.25) Why can't I create a column named "time"?

d895 1
a895 1
ANSI-92 compilant. The next release will have this restriction removed.
d897 8
a904 8

3.26)How much database disk space is required to store data from a typical
flat file?

Consider a file with 300,000 lines with two integers on each line. The flat
file is 2.4MB. The size of the PostgreSQL database file containing this data
can be estimated:

d922 1
a922 1

d925 52
a976 43

  ------------------------------------------------------------------------

Section 4: Extending PostgreSQL

4.1) I wrote a user-defined function and when I run it in psql, it dumps
core.

The problem could be a number of things. Try testing your user-defined
function in a stand alone test program first. Also, make sure you are not
sending elog NOTICES when the front-end is expecting data, such as during a
type_in() or type_out() functions

4.2) I get messages of the type NOTICE:PortalHeapMemoryFree: 0x402251d0 not
in alloc set!

You are pfree'ing something that was not palloc'ed. When writing
user-defined functions, do not include the file "libpq-fe.h". Doing so will
cause your palloc to be a malloc instead of a free. Then, when the backend
pfrees the storage, you get the notice message.

4.3) I've written some nifty new types and functions for PostgreSQL.

Please share them with other PostgreSQL users. Send your extensions to
mailing list, and they will eventually end up in the contrib/ subdirectory.

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

This requires extreme wizardry, so extreme that the authors have not ever
tried it, though in principle it can be done. The short answer is ... you
can't. This capability is forthcoming in the future.

  ------------------------------------------------------------------------

Section 5: Bugs

5.1) How do I make a bug report?

Check the current FAQ at http://postgreSQL.org

Also check out our ftp site ftp://ftp.postgreSQL.org/pub to see if there is
a more recent PostgreSQL version.

d978 7
a985 3
   * bugs@@postgreSQL.org

This is the address of the developers mailing list.
@


1.25
log
@Upgrade doc stuff to 6.3.
@
text
@d1 16
a17 16
                Frequently Asked Questions (FAQ) for PostgreSQL
                                       
   Last updated: Sun Feb 1 16:13:28 EST 1998
   
   Current maintainer: Bruce Momjian (maillist@@candle.pha.pa.us)
   
   The most recent version of this document can be viewed at the
   postgreSQL Web site, http://postgreSQL.org.
   
   Linux-specific questions are answered in
   http://postgreSQL.org/docs/FAQ-linux.shtml.
   
   Irix-specific questions are answered in
   http://postgreSQL.org/docs/FAQ-irix.shtml.
     _________________________________________________________________
   
d20 83
a102 90
  1) General questions
  
   1.1) What is PostgreSQL?
   1.2) What does PostgreSQL run on?
   1.3) Where can I get PostgreSQL?
   1.4) What's the copyright on PostgreSQL?
   1.5) Support for PostgreSQL
   1.6) Latest release of PostgreSQL
   1.7) Is there a commercial version of PostgreSQL?
   1.8) What documentation is available for PostgreSQL?
   1.9) What version of SQL does PostgreSQL use?
   1.10) Does PostgreSQL work with databases from earlier versions of
   postgres?
   1.11) Are there ODBC drivers for PostgreSQL?
   1.12) What tools are available for hooking postgres to Web pages?
   1.13) Does PostgreSQL have a graphical user interface? A report
   generator? A embedded query language interface?
   1.14) What is a good book to learn SQL?
   
  2) Installation/Configuration questions
  
   2.1) initdb doesn't run
   2.2) when I start up the postmaster, I get "FindBackend: could not
   find a backend to execute..." "postmaster: could not find backend to
   execute..."
   2.3) The system seems to be confused about commas, decimal points, and
   date formats.
   2.4) How do I install PostgreSQL somewhere other than
   /usr/local/pgsql?
   2.5) When I run postmaster, I get a Bad System Call core dumped
   message.
   2.6) When I try to start the postmaster, I get IpcMemoryCreate errors.
   2.7) I have changed a source file, but a recompile does not see the
   change?
   2.8) How do I prevent other hosts from accessing my PostgreSQL
   2.9) I can't access the database as the 'root' user.
   2.10) All my servers crash under concurrent table access. Why?
   2.11) How do I tune the database engine for better performance?
   2.12) What debugging features are available in PostgreSQL?
   2.13) How do I enable more than 32 concurrent backends?
   
  3) Operational questions
  
   3.1) Does PostgreSQL support nested subqueries?
   3.2) I've having a lot of problems using rules.
   3.3) I can't seem to write into the middle of large objects reliably.
   3.4) How can I write client applications to PostgreSQL?
   3.5) How do I set up a pg_group?
   3.6) What is the exact difference between binary cursors and normal
   cursors?
   3.7) What is a R-tree index and what is it used for?
   3.8) What is the maximum size for a tuple?
   3.9) I defined indices but my queries don't seem to make use of them.
   Why?
   3.10) How do I do regular expression searches? case-insensitive regexp
   searching?
   3.11) I experienced a server crash during a vacuum. How do I remove
   the lock file?
   3.12) What is the difference between the various character types?
   3.13) In a query, how do I detect if a field is NULL?
   3.14) How do I see how the query optimizer is evaluating my query?
   3.15) How do I create a serial field?
   3.16) What are the pg_psort.XXX files in my database directory?
   3.17) Why can't I connect to my database from another machine?
   3.18) How do I find out what indexes or operations are defined in the
   database?
   3.19) What is the time-warp feature and how does it relate to vacuum?
   3.20) What is an oid? What is a tid?
   3.21) What is the meaning of some of the terms used in Postgres?
   3.22) What is Genetic Query Optimization?
   3.23) How do you remove a column from a table?
   3.24) How do SELECT only the first few rows of a query?
   3.25) Why can't I create a column named "time"?
   3.26) How much database disk space is required to store data from a
   typical flat file?
   
  4) Questions about extending PostgreSQL
  
   4.1) I wrote a user-defined function and when I run it in psql, it
   dumps core.
   4.2) I get messages of the type NOTICE:PortalHeapMemoryFree:
   0x402251d0
   4.3) I've written some nifty new types and functions for PostgreSQL.
   4.4) How do I write a C function to return a tuple?
   
  5) Bugs
  
   5.1) How do I make a bug report?
     _________________________________________________________________
   
d105 1
a105 98
  1.1) What is PostgreSQL?
  
   PostgreSQL is an enhancement of the POSTGRES database management
   system, a next-generation DBMS research prototype. While PostgreSQL
   retains the powerful data model and rich data types of POSTGRES, it
   replaces the PostQuel query language with an extended subset of SQL.
   PostgreSQL is free and the complete source is available.
   
   PostgreSQL development is being performed by a team of Internet
   developers who all subscribe to the PostgreSQL development mailing
   list. The current coordinator is Marc G. Fournier
   (scrappy@@postgreSQL.org). (See below on how to join). This team is now
   responsible for all current and future development of PostgreSQL.
   
   The authors of PostgreSQL 1.01 were Andrew Yu and Jolly Chen. Many
   others have contributed to the porting, testing, debugging and
   enhancement of the code. The original Postgres code, from which
   PostgreSQL is derived, was the effort of many graduate students,
   undergraduate students, and staff programmers working under the
   direction of Professor Michael Stonebraker at the University of
   California, Berkeley.
   
   The original name of the software at Berkeley was Postgres. When SQL
   functionality was added in 1995, its name was changed to Postgres95.
   The name was changed at the end of 1996 to PostgreSQL.
   
  1.2) What does PostgreSQL run on?
  
   The authors have compiled and tested PostgreSQL on the following
   platforms(some of these compiles require gcc 2.7.0):
     * aix - IBM on AIX 3.2.5 or 4.x
     * alpha - DEC Alpha AXP on Digital Unix 2.0, 3.2, 4.0
     * BSD44_derived - OSs derived from 4.4-lite BSD (NetBSD, FreeBSD)
     * bsdi - BSD/OS 2.0, 2.01, 2.1, 3.0
     * dgux - DG/UX 5.4R4.11
     * hpux - HP PA-RISC on HP-UX 9.0, 10
     * i386_solaris - i386 Solaris
     * irix5 - SGI MIPS on IRIX 5.3
     * linux - Intel x86 on Linux 2.0 and Linux ELF SPARC on Linux ELF
       PPC on Linux Elf (For non-ELF Linux, see LINUX_ELF below).
     * sco - SCO 3.2v5
     * sparc_solaris - SUN SPARC on Solaris 2.4, 2.5, 2.5.1
     * sunos4 - SUN SPARC on SunOS 4.1.3
     * svr4 - Intel x86 on Intel SVR4 and MIPS
     * ultrix4 - DEC MIPS on Ultrix 4.4
       
   The following platforms have known problems/bugs:
     * nextstep - Motorola MC68K or Intel x86 on NeXTSTEP 3.2
       
  1.3) Where can I get PostgreSQL?
  
   The primary anonymous ftp site for PostgreSQL is:
     * ftp://ftp.postgreSQL.org/pub
       
   A mirror site exists at:
     * ftp://postgres95.vnet.net/pub/postgres95
     * ftp://ftp.luga.or.at/pub/postgres95
     * ftp://cal011111.student.utwente.nl/pub/postgres95
     * ftp://ftp.uni-trier.de/pub/database/rdbms/postgres/postgres95
     * ftp://rocker.sch.bme.hu
       
  1.4) What's the copyright on PostgreSQL?
  
   PostgreSQL is subject to the following COPYRIGHT.
   
   PostgreSQL Data Base Management System
   
   Copyright (c) 1994-6 Regents of the University of California
   
   Permission to use, copy, modify, and distribute this software and its
   documentation for any purpose, without fee, and without a written
   agreement is hereby granted, provided that the above copyright notice
   and this paragraph and the following two paragraphs appear in all
   copies.
   
   IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
   FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
   INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND
   ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN
   ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   
   THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
   PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
   CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
   UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
   
  1.5) Support for PostgreSQL
  
   There is no official support for PostgreSQL from the original
   maintainers or from University of California, Berkeley. It is
   maintained through volunteer effort only.
   
   The main mailing list is: questions@@postgreSQL.org. It is available
   for discussion o f matters pertaining to PostgreSQL, including but not
   limited to bug reports and fixes. For info on how to subscribe, send a
   mail with the lines in the body (not the subject line)
d107 97
d208 1
a208 4
   to questions-request@@postgreSQL.org.
   
   There is also a digest list available. To subscribe to this list, send
   email to: questions-digest-request@@postgreSQL.org with a BODY of:
d210 2
d216 8
a223 10
   Digests are sent out to members of this list whenever the main list
   has received around 30k of messages.
   
   There is a bugs mailing list available. To subscribe to this list,
   send email to bugs-request@@postgreSQL.org with a BODY of:
   
   There is also a developers discussion mailing list available. To
   subscribe to this list, send email to hackers-request@@postgreSQL.org
   with a BODY of:
   
d228 3
a230 3
   Additional information about PostgreSQL can be found via the
   PostgreSQL WWW home page at:
   
d232 109
a340 104
     
  1.6) Latest release of PostgreSQL
  
   The latest release of PostgreSQL is version 6.2.1, which was released
   on October 17th, 1997. We are testing 6.3 beta. For information about
   what is new in 6.3, see our TODO list on our WWW page.
   
   We plan to have major releases every three months.
   
  1.7) Is there a commercial version of PostgreSQL?
  
   Illustra Information Technology (a wholly owned subsidiary of Informix
   Software, Inc.) sells an object-relational DBMS called Illustra that
   was originally based on postgres. Illustra has cosmetic similarities
   to PostgreSQL but has more features, is more robust, performs better,
   and offers real documentation and support. On the flip side, it costs
   money. For more information, contact sales@@illustra.com
   
  1.8) What documentation is available for PostgreSQL?
  
   A user manual, manual pages, and some small test examples are included
   in the distribution. The sql and built-in manual pages are
   particularly important.
   
   The www page contains pointers to an implementation guide and five
   papers written about postgres design concepts and features.
   
  1.9) What version of SQL does PostgreSQL use?
  
   PostgreSQL supports a subset of SQL-92. It has most of the important
   constructs but lacks some of the functionality. The most visible
   differences are:
     * no support for nested subqueries
     * no HAVING clause under a GROUP BY
       
   On the other hand, you get to create user-defined types, functions,
   inheritance etc. If you're willing to help with PostgreSQL coding,
   eventually we can also add the missing features listed above.
   
  1.10) Does PostgreSQL work with databases from earlier versions of postgres?
  
   PostgreSQL v1.09 is compatible with databases created with v1.01.
   
   Upgrading to 6.3 from earlier releases requires a dump and restore.
   
   Upgrading to 6.2.1 from pre-6.2 requires a dump and restore.
   
   Upgrading to 6.2.1 from 6.2 does not require a dump, but see the
   appropriate /migration file in the distribution.
   
   Those ugrading from versions earlier than 1.09 must upgrade to 1.09
   first without a dump/reload, then dump the data from 1.09, and then
   load it into 6.2.1 or 6.3 beta.
   
  1.11) Are there ODBC drivers for PostgreSQL?
  
   There are two ODBC drivers available, PostODBC and OpenLink ODBC.
   
   For all people being interested in PostODBC, there are now two mailing
   lists devoted to the discussion of PostODBC. The mailing lists are:
     * postodbc-users@@listserv.direct. net
     * postodbc-developers@@listse rv.direct.net
       
   these lists are ordinary majordomo mailing lists. You can subscribe by
   sending a mail to:
     * majordomo@@listserv.direct.net
       
   OpenLink ODBC is very popular. You can get it from
   http://www.openlinksw.com/postgres.html. It works with our standard
   ODBC client software so you'll have Postgres ODBC available on every
   client platform we support (Win, Mac, Unix, VMS).
   
   We will probably be selling this product to people who need
   commercial-quality support, but a freeware version will always be
   available. Questions to postgres95@@openlink.co.uk.
   
  1.12) What tools are available for hooking postgres to Web pages?
  
   A nice introduction to Database-backed Web pages can be seen at:
   http://www.webtools.com
   
   For web integration, PHP is an excellent interface. The URL for that
   is http://php.iquest.net
   
   PHP is great for simple stuff, but for more complex stuff, some still
   use the perl interface and CGI.pm.
   
   An WWW gatway based on WDB using perl can be downloaded from:
     * http://www.eol.ists.ca/~dunlop/wdb -p95
       
  1.13) Does PostgreSQL have a graphical user interface? A report generator? A
  embedded query language interface?
  
   No. No. No. Not in the official distribution at least. Some users have
   reported some success at using 'pgbrowse' and 'onyx' as frontends to
   PostgreSQL. Several contributions are working on tk based frontend
   tools. Ask on the mailing list.
   
  1.14) What is a good book to learn SQL?
  
   Many of our users like The Practical SQL Handbook, Bowman et al,
   Addison Wesley.
     _________________________________________________________________
   
d343 43
a385 90
  2.1) initdb doesn't run
  
     * check to see that you have the proper paths set
     * check that the 'postgres' user owns all the right files
     * ensure that there are files in $PGDATA/files, and that they are
       non-empty. If they aren't, then "gmake install" failed for some
       reason
       
  2.2) when I start up the postmaster, I get "FindBackend: could not find a
  backend to execute..." "postmaster: could not find backend to execute..."
  
   You probably do not have the right path set up. The 'postgres'
   executable needs to be in your path.
   
  2.3) The system seems to be confused about commas, decimal points, and date
  formats.
  
   Check your locale configuration. PostgreSQL uses the locale settings
   of the user that ran the postmaster process. Set those accordingly for
   your operating environment.
   
  2.4) How do I install PostgreSQL somewhere other than /usr/local/pgsql?
  
   You need to edit Makefile.global and change POSTGRESDIR accordingly,
   or create a Makefile.custom and define POSTGRESDIR there.
   
  2.5) When I run postmaster, I get a Bad System Call core dumped message.
  
   It could be a variety of problems, but first check to see that you
   have system V extensions installed on your kernel. PostgreSQL requires
   kernel support for shared memory.
   
  2.6) When I try to start the postmaster, I get IpcMemoryCreate errors.
  
   You either do not have shared memory configured properly in kernel or
   you need to enlarge the shared memory available in the kernel. The
   exact amount you need depends on your architecture and how many
   buffers you configure postmaster to run with. For most systems, with
   default buffer sizes, you need a minimum of ~760K.
   
  2.7) I have changed a source file, but a recompile does 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'.
   
  2.8) How do I prevent other hosts from accessing my PostgreSQL backend?
  
   Use host-based authentication by modifying the file $PGDATA/pg_hba
   accordingly.
   
  2.9) I can't access the database as the 'root' user.
  
   You should not create database users with user id 0(root). They will
   be unable to access the database. This is a security precaution
   because of the ability of any user to dynamically link object modules
   into the database engine.
   
  2.10) All my servers crash under concurrent table access. Why?
  
   This problem can be caused by a kernel that is not configured to
   support semaphores.
   
  2.11) How do I tune the database engine for better performance?
  
   There are two things that can be done. You can use Openlink's option
   to disable fsync() by starting the postmaster with a '-o -F' option.
   This will prevent fsync()'s from flushing to disk after every
   transaction.
   
   You can also use the postmaster -B option to increase the number of
   shared memory buffers shared among the backend processes. If you make
   this parameter too high, the process will not start or crash
   unexpectedly. Each buffer is 8K and the defualt is 64 buffers.
   
   You can also use the postgres -S option to increase the maximum amount
   of memory used by each backend process for temporary sorts. Each
   buffer is 1K and the defualt is 512 buffers.
   
  2.12) What debugging features are available in PostgreSQL?
  
   PostgreSQL has several features that report status information that
   can be valuable for debugging purposes.
   
   First, by running configure with the -enable-cassert option, many
   assert()'s monitor the progress of the backend and halt the program
   when something unexpected occurs.
   
   Both postmaster and postgres have several debug options available.
   First, whenever you start the postmaster, make sure you send the
   standard output and error to a log file, like:
d387 44
d435 34
a468 35
   This will put a server.log file in the top-level PostgreSQL directory.
   This file can contain useful information about problems or errors
   encountered by the server. Postmaster has a -d option that allows even
   more detailed information to be reported. The -d option takes a number
   1-3 that specifies the debug level. Be warned that a debug level of 3
   generates large log files.
   
   You can actuall run the postgres backend from the command line, and
   type your SQL statement directly. This is recommended ONLY for
   debugging purposes. Note that a newline terminates the query, not a
   semicolon. If you have compiled with debugging symbols, you can use a
   debugger to see what is happening. Because the backend was not started
   from the postmaster, it is not running in an identical environment and
   locking/backend interaction problems may not be duplicated. Some
   operating system can attach to a running backend directly to diagnose
   problems.
   
   The postgres program has a -s, -A, -t options that can be very usefull
   for debugging and performance measurements.
   
   You can also compile with profiling to see what functions are taking
   execution time. The backend profile files will be deposited in the
   pgsql/data/base/dbname directory. The client profile file will be put
   in the current directory.
   
   The EXPLAIN command (see this FAQ) allows you to see how PostgreSQL is
   interpreting your query.
   
  2.13) How do I enable more than 32 concurrent backends?
  
   Edit include/storage/sinvaladt.h, and change the value of
   MaxBackendId. In the future, we plan to make this a configurable
   prameter.
     _________________________________________________________________
   
d471 12
a482 30
  3.1) Does PostgreSQL support nested subqueries?
  
   Subqueries are not implemented, but they can be simulated using sql
   functions.
   
  3.2) I've having a lot of problems using rules.
  
   Currently, the rule system in PostgreSQL is mostly broken. It works
   enough to support the view mechanism, but that's about it. Use
   PostgreSQL rules at your own peril.
   
  3.3) I can't seem to write into the middle of large objects reliably.
  
   The Inversion large object system in PostgreSQL is also mostly broken.
   It works well enough for storing large wads of data and reading them
   back out, but the implementation has some underlying problems. Use
   PostgreSQL large objects at your own peril.
   
  3.4) How can I write client applications to PostgreSQL?
  
   PostgreSQL supports a C-callable library interface called libpq as
   well as many others. See the /src/interfaces directory.
   
   Others have contributed a perl interface and a WWW gateway to
   PostgreSQL. See the PostgreSQL home pages for more details.
   
  3.5) How do I set up a pg_group?
  
   Currently, there is no easy interface to set up user groups. You have
   to explicitly insert/update the pg_group table. For example:
d484 17
d509 76
a584 78
   The fields in pg_group are:
     * groname: the group name. This a char16 and should be purely
       alphanumeric. Do not include underscores or other punctuation.
     * grosysid: the group id. This is an int4. This should be unique for
       each group.
     * grolist: the list of pg_user id's that belong in the group. This
       is an int4[].
       
  3.6) What is the exact difference between binary cursors and normal cursors?
  
   See the declare manual page for a description.
   
  3.7) What is a R-tree index and what is it used for?
  
   An r-tree index is used for indexing spatial data. A hash index can't
   handle range searches. A B-tree index only handles range searches in a
   single dimension. R-tree's can handle multi-dimensional data. For
   example, if a R-tree index can be built on an attribute of type
   'point', the system can more efficient answer queries like select all
   points within a bounding rectangle.
   
   The canonical paper that describes the original R-Tree design is:
   
   Guttman, A. "R-Trees: A Dynamic Index Structure for Spatial
   Searching." Proc of the 1984 ACM SIGMOD Int'l Conf on Mgmt of Data,
   45-57.
   
   You can also find this paper in Stonebraker's "Readings in Database
   Systems"
   
   Builtin R-Trees can handle polygons and boxes. In theory, R-trees can
   be extended to handle higher number of dimensions. In practice,
   extending R-trees require a bit of work and we don't currently have
   any documentation on how to do it.
   
  3.8) What is the maximum size for a tuple?
  
   Tuples are limited to 8K bytes. Taking into account system attributes
   and other overhead, one should stay well shy of 8,000 bytes to be on
   the safe side. To use attributes larger than 8K, try using the large
   objects interface.
   
   Tuples do not cross 8k boundaries so a 5k tuple will require 8k of
   storage.
   
  3.9) I defined indices but my queries don't seem to make use of them. Why?
  
   PostgreSQL does not automatically maintain statistics. One has to make
   an explicit 'vacuum' call to update the statistics. After statistics
   are updated, the optimizer has a better shot at using indices. Note
   that the optimizer is limited and does not use indices in some
   circumstances (such as OR clauses). For column-specific optimization
   statistics, use 'vacuum analyze'.
   
   If the system still does not see the index, it is probably because you
   have created an index on a field with the improper *_ops type. For
   example, you have created a CHAR(4) field, but have specified a
   char_ops index type_class.
   
   See the create_index manual page for information on what type classes
   are available. It must match the field type.
   
   Postgres does not warn the user when the improper index is created.
   
   Indexes not used for ORDER BY operations.
   
  3.10) How do I do regular expression searches? case-insensitive regexp
  searching?
  
   See the pgbuiltin manual page. Search for regular expression.
   
  3.11) I experienced a server crash during a vacuum. How do I remove the lock
  file?
  
   See the vacuum manual page.
   
  3.12) What is the difference between the various character types?
  
d597 28
a624 28
   Remember, you need to use the internal name when creating indexes on
   these fields or when doing other internal operations.
   
   The last four types above are "varlena" types (i.e. the first four
   bytes are the length, followed by the data). CHAR(#) allocates the
   maximum number of bytes no matter how much data is stored in the
   field. TEXT, VARCHAR(#), and BYTEA all have variable length on the
   disk.
   
  3.13) In a query, how do I detect if a field is NULL?
  
   You test the column with IS NULL and IS NOT NULL.
   
  3.14) How do I see how the query optimizer is evaluating my query?
  
   See the explain manual page.
   
  3.15) How do I create a serial field?
  
   Postgres does not allow the user to specifiy a user column as type
   SERIAL. Instead, you can use each row's oid field as a unique value.
   However, if you need to dump and reload the database, you need to use
   pgdump's -o option or COPY's WITH OIDS option to preserver the oids.
   
   We also have a SEQUENCE function that is similar to SERIAL. See the
   create_sequence manual page.
   
   Another valid way of doing this is to create a function:
d632 1
a632 1
   then:
d637 17
a653 38
   However, keep in mind there is a race condition here where one server
   could do the update, then another one do an update, and they both
   could select the same new id. This statement should be performed
   within a transaction.
   
   Yet another way is to use general trigger function autoinc() from
   contrib/spi/autoinc.c.
   
  3.16) What are the pg_psort.XXX files in my database directory?
  
   They are temporary sort files generated by the query executor. For
   example, if a sort needs to be done to satisfy an ORDER BY, some temp
   files are generated as a result of the sort.
   
   If you have no transactions or sorts running at the time, it is safe
   to delete the pg_psort.XXX files.
   
  3.17) Why can't I connect to my database from another machine?
  
   The default configuration allows only connections from tcp/ip host
   localhost. You need to add a host entry to the file pgsql/data/pg_hba.
   See the hba_conf manual page.
   
  3.18) How do I find out what indexes or operations are defined in the
  database?
  
   Run the file pgsql/src/tutorial/syscat.source. It illustrates many of
   the 'select's needed to get information out of the database system
   tables.
   
  3.19) What is the time-warp feature and how does it relate to vacuum?
  
   PostgreSQL handles data changes differently than most database
   systems. When a row is changed in a table, the original row is marked
   with the time it was changed, and a new row is created with the
   current data. By default, only current rows are used in a table. If
   you specify a date/time after the table name in a FROM clause, you can
   access the data that was current at that time, i.e.
d655 18
d677 64
a740 64
   displays employee rows in the table at the specified time. You can
   specify intervals like [date,date], [date,], [,date], or [,]. This
   last option accesses all rows that ever existed.
   
   INSERTed rows get a timestamp too, so rows that were not in the table
   at the desired time will not appear.
   
   Vacuum removes rows that are no longer current. This time-warp feature
   is used by the engine for rollback and crash recovery. Expiration
   times can be set with purge.
   
   In 6.0, once a table is vacuumed, the creation time of a row may be
   incorrect, causing time-traval to fail.
   
   The time-travel feature will be removed in 6.3.
   
  3.20) What is an oid? What is a tid?
  
   Oids are Postgres's answer to unique row ids or serial columns. Every
   row that is created in Postgres gets a unique oid. All oids generated
   by initdb are less than 16384 (from backend/access/transam.h). All
   post-initdb (user-created) oids are equal or greater that this. All
   these oids are unique not only within a table, or database, but unique
   within the entire postgres installation.
   
   Postgres uses oids in its internal system tables to link rows in
   separate tables. These oids can be used to identify specific user rows
   and used in joins. It is recommended you use column type oid to store
   oid values. See the sql(l) manual page to see the other internal
   columns. You can create an index on the oid field for faster access.
   
   Tids are used to indentify specific physical rows with block and
   offset values. Tids change after rows are modified or reloaded. They
   are used by index entries to point to physical rows. They can not be
   accessed through sql.
   
  3.21) What is the meaning of some of the terms used in Postgres?
  
   Some of the source code and older documentation use terms that have
   more common usage. Here are some:
     * row, record, tuple
     * attribute, field, column
     * table, class
     * retrieve, select
     * replace, update
     * append, insert
     * oid, serial value
     * portal, cursor
     * range variable, table name, table alias
       
   Please let me know if you think of any more.
   
  3.22) What is Genetic Query Optimization?
  
   The GEQO module in PostgreSQL is intended to solve the query
   optimization problem of joining many tables by means of a Genetic
   Algorithm (GA). It allows the handling of large join queries through
   non-exhaustive search.
   
   For further information see README.GEQO <utesch@@aut.tu-freiberg.de>.
   
  3.23) How do you remove a column from a table?
  
   We do not support ALTER TABLE DROP COLUMN, but do this:
d748 21
a768 22
  3.24) How do SELECT only the first few rows of a query?
  
   See the fetch manual page.
   
   This only prevents all row results from being transfered to the
   client. The entire query must be evaluated, even if you only want just
   first few rows. Consider a query that has and ORDER BY. There is no
   way to return any rows until the entire query is evaluated and sorted.
   
  3.25) Why can't I create a column named "time"?
  
   6.2.1 has added some new restricted keywords as we make PostgreSQL
   more ANSI-92 compilant. The next release will have this restriction
   removed. There is a patch on ftp.postgresql.org that will allow this
   feature now.
   
  3.26)How much database disk space is required to store data from a typical
  flat file?
  
   Consider a file with 300,000 lines with two integers on each line. The
   flat file is 2.4MB. The size of the PostgreSQL database file
   containing this data can be estimated:
d790 3
a792 2
     _________________________________________________________________
   
d795 29
a823 29
  4.1) I wrote a user-defined function and when I run it in psql, it dumps
  core.
  
   The problem could be a number of things. Try testing your user-defined
   function in a stand alone test program first. Also, make sure you are
   not sending elog NOTICES when the front-end is expecting data, such as
   during a type_in() or type_out() functions
   
  4.2) I get messages of the type NOTICE:PortalHeapMemoryFree: 0x402251d0 not
  in alloc set!
  
   You are pfree'ing something that was not palloc'ed. When writing
   user-defined functions, do not include the file "libpq-fe.h". Doing so
   will cause your palloc to be a malloc instead of a free. Then, when
   the backend pfrees the storage, you get the notice message.
   
  4.3) I've written some nifty new types and functions for PostgreSQL.
  
   Please share them with other PostgreSQL users. Send your extensions to
   mailing list, and they will eventually end up in the contrib/
   subdirectory.
   
  4.4) How do I write a C function to return a tuple?
  
   This requires extreme wizardry, so extreme that the authors have not
   ever tried it, though in principle it can be done. The short answer is
   ... you can't. This capability is forthcoming in the future.
     _________________________________________________________________
   
d826 12
a837 11
  5.1) How do I make a bug report?
  
   Check the current FAQ at http://postgreSQL.org
   
   Also check out our ftp site ftp://ftp.postgreSQL.org/pub to see if
   there is a more recent PostgreSQL version.
   
   You can also fill out the "bug-template" file and send it to:
     * bugs@@postgreSQL.org
       
   This is the address of the developers mailing list.
@


1.24
log
@Cleanups for 6.2.1.
@
text
@d4 1
a4 2
   Last updated: Wed Oct 15 23:16:48 EDT 1997
   Version: 6.2.1
a15 2
   
   Changes in this version (* = modified, + = new):
d29 2
a30 2
   1.8) What version of SQL does PostgreSQL use?
   1.9) What documentation is available for PostgreSQL?
d37 1
d92 3
d246 4
a249 2
   on October 17th, 1997. For information about what is new in 6.2.1, see
   our TODO list on our WWW page.
d285 2
d294 1
a294 1
   load it into 6.2.1.
d320 5
a324 2
   For web integration, PHP/FI is an excellent interface. The URL for
   that is http://www.vex.net/php/
a328 3
   An example of using WWW with C to talk to Postgres is can be tried at:
     * http://postgreSQL.org/~mlc
       
d339 5
d422 3
a424 3
   You can also use the postmaster -S option to increase the maximum
   amount of memory used by each backend process for temporary sorts.
   Each buffer is 1K and the defualt is 512 buffers.
d613 4
a616 4
   bytes is the length, followed by the data). CHAR(#) and VARCHAR(#)
   allocate the maximum number of bytes no matter how much data is stored
   in the field. TEXT and BYTEA are the only character types that have
   variable length on the disk.
d721 1
a721 1
   columns.
d763 1
a763 1
  3.23) How do SELECT only the first few rows of a query?
d771 35
d851 1
a851 1
   This is the address of the developers mailing list. 
@


1.23
log
@Updates for release
@
text
@d4 2
a5 2
   Last updated: Thu Oct  2 14:08:20 EDT 1997
   Version: 6.2
d244 3
a246 3
   The latest release of PostgreSQL is version 6.2, which was released
   on October 2, 1997. For information about what is new in 6.2, see our
   TODO list on our WWW page.
d282 1
a282 1
   Upgrading to 6.1 requires a dump and restore from previous releases.
d284 2
a285 6
   Upgrading from 6.1 to 6.1.1 requires running configure, compile of the
   new release, recompile of all your custom applications to use the new
   libpq, and then an install while the postmaster is temporarily
   stopped.
   
   Upgrading to 6.2 requires a dump and restore from previous releases.
d289 1
a289 1
   load it into 6.2.
d644 2
a645 2
   Yet another way is to use general trigger function autoinc()
   from contrib/spi/autoinc.c
@


1.22
log
@Update for 6.2 release.
@
text
@d4 1
a4 1
   Last updated: Mon Sep 29 22:45:58 EDT 1997
d244 2
a245 2
   The latest release of PostgreSQL is version 6.1.1, which was released
   on July 22, 1997. For information about what is new in 6.1.1, see our
a247 2
   We expect a 6.2 release at the end of September.
   
d289 2
d293 1
a293 1
   load it into 6.1.1.
d648 3
d700 1
a700 1
   The time-travel feature will be removed in 7.0.
@


1.21
log
@Update README, HISTORY, etc for beta release.
@
text
@d4 2
a5 2
   Last updated: Sat Sep 13 22:00:02 EDT 1997
   Version: 6.2beta
d416 4
d441 2
a442 3
   1-3 that specifies the debug level. The query plans in a verbose debug
   file can be formatted using the 'indent' program. Be warned that a
   debug level of three generates large log files.
d447 6
a452 6
   semicolon. If you have compiled with debugging symbols, you can
   perhaps use a debugger to see what is happening. Because the backend
   was not started from the postmaster, it is not running in an identical
   environment and locking/backend interaction problems may not be
   duplicated. Some operating system can attach to a running backend
   directly to diagnose problems.
d457 5
d463 1
a463 4
   iterpreting your query.
   
   You can also compile with profiling to see what functions are taking
   execution time.
@


1.20
log
@UPdate FAQ.
@
text
@d4 2
a5 2
   Last updated: Thu Sep 4 01:32:22 EDT 1997
   Version: 6.1.1
d93 1
d518 1
a518 18
   Normal cursors return data back in ASCII format. Since data is stored
   natively in binary format, the system must do a conversion to produce
   the ASCII format. In addition, ASCII formats are often large in size
   than binary format. Once the attributes come back in ASCII, often the
   client application then has to convert it to a binary format to
   manipulate it anyway.
   
   Binary cursors give you back the data in the native binary
   representation. Thus, binary cursors will tend to be a little faster
   since there's less overhead of conversion.
   
   However, ASCII is architectural neutral whereas binary representation
   can differ between different machine architecture. Thus, if your
   client machine uses a different representation than you server
   machine, getting back attributes in binary format is probably not what
   you want. Also, if your main purpose is displaying the data in ASCII,
   then getting it back in ASCII will save you some effort on the client
   side.
d577 1
a577 4
   PostgreSQL supports the SQL LIKE syntax as well as more general
   regular expression searching with the ~ operator. The !~ is the
   negated regexp operator. ~* and !~* are the case-insensitive regular
   expression operators.
d582 1
a582 10
   If the server crashes during a vacuum command, chances are it will
   leave a lock file hanging around. Attempts to re-run the vacuum
   command result in


        WARN:can't create lock file -- another vacuum cleaner running?

   If you are sure that no vacuum is actually running, you can remove the
   file called "pg_vlock" in your database directory (which is
   $PGDATA/base/<dbName>)
d613 2
a614 4
   Place the word 'EXPLAIN' at the beginning of the query, for example:

        EXPLAIN SELECT * FROM table1 WHERE age = 23;

d656 1
d743 1
a743 1
        SELECT ...  # select all columns but the one you want to remove
d748 9
d802 1
a802 1
   This is the address of the developers mailing list.
@


1.19
log
@Add PPC Linux to port list.
@
text
@d4 1
a4 1
   Last updated: Tue Jul 29 10:09:15 EDT 1997
a18 3
     * 3.42) What is Genetic Query Optimization?
     * 3.43) I am running Solaris and my dates display wrong. Why?
       
d20 1
a20 1
                                      
d32 2
a33 1
   1.9) What version of SQL does PostgreSQL use?
d36 4
a39 1
   1.11) How many people use PostgreSQL?
d41 1
a41 1
  2) Installation questions
d56 6
d65 6
a70 11
   3.1) How do I specify a KEY or other constraints on a column?
   3.2) Does PostgreSQL support nested subqueries?
   3.3) How do I define a unique indices?
   3.4) I've having a lot of problems using rules.
   3.5) I can't seem to write into the middle of large objects reliably.
   3.6) Does PostgreSQL have a graphical user interface? A report
   generator? A embedded query language interface?
   3.7) How can I write client applications to PostgreSQL?
   3.8) How do I prevent other hosts from accessing my PostgreSQL
   3.9) How do I set up a pg_group?
   3.10) What is the exact difference between binary cursors and normal
d72 3
a74 4
   3.11) Why doesn't the != operator work?
   3.12) What is a R-tree index and what is it used for?
   3.13) What is the maximum size for a tuple?
   3.14) I defined indices but my queries don't seem to make use of them.
d76 1
a76 4
   3.15) Are there ODBC drivers for PostgreSQL?
   3.16) How do I use postgres for multi-dimensional indexing (> 2
   dimensions)?
   3.17) How do I do regular expression searches? case-insensitive regexp
d78 1
a78 2
   3.18) I can't access the database as the 'root' user.
   3.19) I experienced a server crash during a vacuum. How do I remove
d80 7
a86 12
   3.20) What is the difference between the various character types?
   3.21) In a query, how do I detect if a field is NULL?
   3.22) How do I see how the query optimizer is evaluating my query?
   3.23) How do I create a serial field?
   3.24) How do I create a multi-column index?
   3.25) What are the temp_XXX files in my database directory?
   3.26) Why are my table files not getting any smaller after a delete?
   3.27) Why can't I connect to my database from another machine?
   3.28) I get the error 'default index class unsupported' when creating
   an index. How do I do it?
   3.29) Why does creating an index crash the backend server?
   3.30) How do I find out what indexes or operations are defined in the
d88 5
a92 13
   3.31) Why do statements require an extra character at the end? Why
   does 'createuser' return 'unexpected last match in input()'? Why does
   pg_dump fail?
   3.32) All my servers crash under concurrent table access. Why?
   3.33) What tools are available for hooking postgres to Web pages?
   3.34) What is the time-warp feature and how does it relate to vacuum?
   3.35) How do I tune the database engine for better performance?
   3.36) What debugging features are available in PostgreSQL?
   3.37) What is an oid? What is a tid?
   3.38) What is the meaning of some of the terms used in Postgres?
   3.39) What is Genetic Query Optimization?
   3.40) I am running Solaris and my dates display wrong. Why? 3.41) How
   do I enable more than 32 concurrent backends?
d107 1
a107 1
                                      
d247 1
a247 4
   We expect a 7.0 release in several months that will remove time-travel
   and reduce by 50% the size of on-disk system columns maintained for
   each row in a table. This release will also require a dump and
   restore.
a281 4
   Those upgrading from 1.0 should read the directions in the
   MIGRATION_1.0_TO_1.02 directory.
   
   Upgrading to 6.0 requires a dump and restore from previous releases.
d294 23
a316 1
  1.11) How many people use PostgreSQL?
d318 2
a319 4
   Since we don't have any licensing or registration scheme, it's
   impossible to tell. We do know hundreds copies of PostgreSQL v1.* have
   been downloaded, and that there many hundreds of subscribers to the
   mailing lists.
d321 16
d338 1
a338 1
                                      
d386 78
d465 1
a465 1
                                      
d468 1
a468 9
  3.1) How do I specify a KEY or other constraints on a column?
  
   Column constraints are not supported in PostgreSQL. As a consequence,
   the system does not check for duplicates.
   
   Under 6.0, create a unique index on the column. Attempts to create
   duplicate of that column will report an error.
   
  3.2) Does PostgreSQL support nested subqueries?
d473 1
a473 5
  3.3) How do I define a unique indices?
  
   PostgreSQL 6.0 supports unique indices.
   
  3.4) I've having a lot of problems using rules.
d479 1
a479 1
  3.5) I can't seem to write into the middle of large objects reliably.
d486 1
a486 9
  3.6) Does PostgreSQL have a graphical user interface? A report generator? A
  embedded query language interface?
  
   No. No. No. Not in the official distribution at least. Some users have
   reported some success at using 'pgbrowse' and 'onyx' as frontends to
   PostgreSQL. Several contributions are working on tk based frontend
   tools. Ask on the mailing list.
   
  3.7) How can I write client applications to PostgreSQL?
d489 1
a489 1
   well as a Tcl-based library interface called libtcl.
d494 1
a494 6
  3.8) How do I prevent other hosts from accessing my PostgreSQL backend?
  
   Use host-based authentication by modifying the file $PGDATA/pg_hba
   accordingly.
   
  3.9) How do I set up a pg_group?
d515 1
a515 1
  3.10) What is the exact difference between binary cursors and normal cursors?
d536 1
a536 8
  3.11) Why doesn't the != operator work?
  
   SQL specifies <> as the inequality operator, and that is what we have
   defined for the built-in types.
   
   In 6.0, != is equivalent to <>.
   
  3.12) What is a R-tree index and what is it used for?
d554 6
a559 1
  3.13) What is the maximum size for a tuple?
d569 1
a569 1
  3.14) I defined indices but my queries don't seem to make use of them. Why?
d575 2
a576 1
   circumstances (such as OR clauses).
d590 1
a590 30
  3.15) Are there ODBC drivers for PostgreSQL?
  
   There are two ODBC drivers available, PostODBC and OpenLink ODBC.
   
   For all people being interested in PostODBC, there are now two mailing
   lists devoted to the discussion of PostODBC. The mailing lists are:
     * postodbc-users@@listserv.direct. net
     * postodbc-developers@@listse rv.direct.net
       
   these lists are ordinary majordomo mailing lists. You can subscribe by
   sending a mail to:
     * majordomo@@listserv.direct.net
       
   OpenLink ODBC is currently in beta under Linux. You can get it from
   http://www.openlinksw.com/postgres.html. It works with our standard
   ODBC client software so you'll have Postgres ODBC available on every
   client platform we support (Win, Mac, Unix, VMS).
   
   We will probably be selling this product to people who need
   commercial-quality support, but a freeware version will always be
   available. Questions to postgres95@@openlink.co.uk.
   
  3.16) How do I use postgres for multi-dimensional indexing (> 2 dimensions)?
  
   Builtin R-Trees can handle polygons and boxes. In theory, R-trees can
   be extended to handle higher number of dimensions. In practice,
   extending R-trees require a bit of work and we don't currently have
   any documentation on how to do it.
   
  3.17) How do I do regular expression searches? case-insensitive regexp
d598 1
a598 8
  3.18) I can't access the database as the 'root' user.
  
   You should not create database users with user id 0(root). They will
   be unable to access the database. This is a security precaution
   because of the ability of any user to dynamically link object modules
   into the database engine.
   
  3.19) I experienced a server crash during a vacuum. How do I remove the lock
d612 1
a612 1
  3.20) What is the difference between the various character types?
d635 1
a635 1
  3.21) In a query, how do I detect if a field is NULL?
d637 1
a637 3
   PostgreSQL has two builtin keywords, "isnull" and "notnull" (note no
   spaces). Version 1.05 and later and 6.* understand IS NULL and IS NOT
   NULL.
d639 1
a639 1
  3.22) How do I see how the query optimizer is evaluating my query?
d645 1
a645 1
  3.23) How do I create a serial field?
d649 5
a653 3
   However, if you need to dump and reload the database, you need to be
   using postgres version 1.07 or later or 6.* with pgdump's -o option or
   COPY's WITH OIDS option to preserver the oids.
d673 1
a673 3
   Sequences were implemented in 6.1
   
  3.24) How do I create a multi-column index?
d675 3
a677 11
   In 6.0, you can not directly create a multi-column index using create
   index. You need to define a function which acts on the multiple
   columns, then use create index with that function.
   
   This feature is available in 6.1 and later releases.
   
  3.25) What are the temp_XXX files in my database directory?
  
   They are temp_ files generated by the query executor. For example, if
   a sort needs to be done to satisfy an ORDER BY, some temp files are
   generated as a result of the sort.
d680 1
a680 8
   to delete the temp_ files.
   
  3.26) Why are my table files not getting any smaller after a delete?
  
   If you run vacuum in pre-6.0, unused rows will be marked for reuse,
   but the file blocks are not released.
   
   In 6.0, vacuum properly shrinks tables.
d682 1
a682 1
  3.27) Why can't I connect to my database from another machine?
d687 1
a687 20
  3.28) I get the error 'default index class unsupported' when creating an
  index. How do I do it?
  
   You probably used:

        create index idx1 on person using btree (name);

   PostgreSQL indexes are extensible, and therefore in pre-6.0, you must
   specify a class_type when creating an index. Read the manual page for
   create index (called create_index).
   
   Version 6.0, if you do not specify a class_type, it defaults to the
   proper type for the column.
   
  3.29) Why does creating an index crash the backend server?
  
   You have probably defined an incorrect *_ops type class for the field
   you are indexing.
   
  3.30) How do I find out what indexes or operations are defined in the
d694 1
a694 29
  3.31) Why do statements require an extra character at the end? Why does
  'createuser' return 'unexpected last match in input()'? Why does pg_dump
  fail?
  
   You have compile postgres with flex version 2.5.3. There is bug in
   this version of flex. Use flex version 2.5.2 or flex 2.5.4 instead.
   There is a doc/README.flex file which will properly patch the flex
   2.5.3 source code.
   
  3.32) All my servers crash under concurrent table access. Why?
  
   This problem can be caused by a kernel that is not configured to
   support semaphores.
   
  3.33) What tools are available for hooking postgres to Web pages?
  
   For web integration, PHP/FI is an excellent interface. The URL for
   that is http://www.vex.net/php/
   
   PHP is great for simple stuff, but for more complex stuff, some still
   use the perl interface and CGI.pm.
   
   An example of using WWW with C to talk to Postgres is can be tried at:
     * http://postgreSQL.org/~mlc
       
   An WWW gatway based on WDB using perl can be downloaded from:
     * http://www.eol.ists.ca/~dunlop/wdb -p95
       
  3.34) What is the time-warp feature and how does it relate to vacuum?
d723 1
a723 55
  3.35) How do I tune the database engine for better performance?
  
   There are two things that can be done. You can use Openlink's option
   to disable fsync() by starting the postmaster with a '-o -F' option.
   This will prevent fsync()'s from flushing to disk after every
   transaction.
   
   You can also use the postmaster -B option to increase the number of
   shared memory buffers shared among the backend processes. If you make
   this parameter too high, the process will not start or crash
   unexpectedly. Each buffer is 8K and the defualt is 64 buffers.
   
  3.36) What debugging features are available in PostgreSQL?
  
   PostgreSQL has several features that report status information that
   can be valuable for debugging purposes.
   
   First, by compiling with DEBUG defined, many assert()'s monitor the
   progress of the backend and halt the program when something unexpected
   occurs.
   
   Both postmaster and postgres have several debug options available.
   First, whenever you start the postmaster, make sure you send the
   standard output and error to a log file, like:


        cd /usr/local/pgsql
        ./bin/postmaster >server.log 2>&1 &

   This will put a server.log file in the top-level PostgreSQL directory.
   This file can contain useful information about problems or errors
   encountered by the server. Postmaster has a -d option that allows even
   more detailed information to be reported. The -d option takes a number
   1-3 that specifies the debug level. The query plans in a verbose debug
   file can be formatted using the 'indent' program. (You may need to
   remove the '====' lines in 1.* releases.) Be warned that a debug level
   greater than one generates large log files in 1.* releases.
   
   You can actuall run the postgres backend from the command line, and
   type your SQL statement directly. This is recommended ONLY for
   debugging purposes. Note that a newline terminates the query, not a
   semicolon. If you have compiled with debugging symbols, you can
   perhaps use a debugger to see what is happening. Because the backend
   was not started from the postmaster, it is not running in an identical
   environment and locking/backend interaction problems may not be
   duplicated. Some operating system can attach to a running backend
   directly to diagnose problems.
   
   The postgres program has a -s, -A, -t options that can be very usefull
   for debugging and performance measurements.
   
   The EXPLAIN command (see this FAQ) allows you to see how PostgreSQL is
   iterpreting your query.
   
  3.37) What is an oid? What is a tid?
d743 1
a743 1
  3.38) What is the meaning of some of the terms used in Postgres?
d759 1
a759 1
  3.39) What is Genetic Query Optimization?
d768 1
a768 1
  3.40) I am running Solaris and my dates display wrong. Why?
d770 8
a777 2
   There was a bug in 6.0 that caused this problem under Solaris with -O2
   optimization. Upgrade to 6.1.1.
a778 8
  3.41) How do I enable more than 32 concurrent backends?
  
   Edit include/storage/sinvaladt.h, and change the value of
   MaxBackendId. In the future, we plan to make this a configurable
   prameter.
   
     _________________________________________________________________
                                      
d808 1
a809 2
     _________________________________________________________________
                                      
@


1.18
log
@Add hpux 10 support to list.
@
text
@d4 1
a4 1
   Last updated: Sun Jul 27 21:19:00 EDT 1997
d164 2
a165 2
     * linux - Intel x86 on Linux 1.2 and Linux ELF (For non-ELF Linux,
       see LINUX_ELF below).
@


1.17
log
@sco added to ports list
@
text
@d161 1
a161 1
     * hpux - HP PA-RISC on HP-UX 9.0
@


1.16
log
@Update files and dates for 6.1.1 release.
@
text
@d4 1
a4 1
   Last updated: Mon Jul 21 18:04:00 EDT 1997
d166 1
@


1.15
log
@Solaris version update.
@
text
@d4 1
a4 1
   Last updated: Mon Jul 14 12:27:39 EDT 1997
d258 3
a260 3
   The latest release of PostgreSQL is version 6.1.1, which will be
   released in July, 1997. For information about what is new in 6.1.1,
   see our TODO list on our WWW page.
d307 4
a310 3
   Upgrading from 6.1 to 6.1.1 requires a compile of the new release,
   recompile of all your custom applications to use the new libpq, and
   then an install while the postmaster is temporarily stopped.
d651 1
a651 1
   In 6.1, this feature is available.
@


1.14
log
@Update supported ports.
@
text
@d166 1
a166 1
     * sparc_solaris - SUN SPARC on Solaris 2.4
@


1.13
log
@Update for DGUX.
@
text
@d157 1
a157 1
     * alpha - DEC Alpha AXP on Digital Unix 2.0 and 3.2
@


1.12
log
@Add sysv4 support to configure and docs.
@
text
@d160 1
a160 1
     * dgux - DG/UX 5.4R3.10
@


1.11
log
@Update supported ports for 6.1.1 release.
@
text
@d168 1
a168 1
     * svr4 - Intel x86 on Intel SVR4
@


1.10
log
@Updates for 6.1.1.
@
text
@d4 1
a4 1
   Last updated: Sun Jul 13 15:26:53 EDT 1997
d13 1
a13 1
   http://postgreSQL.org/docs/FAQ-Linux.phtml.
d16 1
a16 1
   http://postgreSQL.org/docs/FAQ-Irix.phtml.
d157 1
a157 1
     * alpha - DEC Alpha AXP on OSF/1 2.0
@


1.9
log
@Update docs for release.
@
text
@d1 582
a582 667
<HTML>
<HEAD>
<TITLE>PostgreSQL FAQ</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#A00000" ALINK="#0000FF">
<H1>
Frequently Asked Questions (FAQ) for PostgreSQL
</H1>
<P>
Last updated:		Wed Jun 11 10:44:40 EDT 1997
<BR>
Version:		6.1
<P>
Current maintainer:	Bruce Momjian (<a
href="mailto:maillist@@candle.pha.pa.us">maillist@@candle.pha.pa.us</a>)<BR>
<P>
The most recent version of this document can be viewed at
the postgreSQL Web site, <a
href="http://postgreSQL.org">http://postgreSQL.org</a>.
<P>
Linux-specific questions are answered in
<a href="http://postgreSQL.org/docs/FAQ-Linux.phtml">http://postgreSQL.org/docs/FAQ-Linux.phtml</a>.
<P>
Irix-specific questions are answered in
<a href="http://postgreSQL.org/docs/FAQ-Irix.phtml">http://postgreSQL.org/docs/FAQ-Irix.phtml</a>.
<P>
Changes in this version (* = modified, + = new):
<UL>
<LI>3.42)	What is Genetic Query Optimization?<BR>
<LI>3.43)	I am running Solaris and my dates display wrong.  Why?<BR>
</UL>
<HR>
<P>
<H2>Questions answered:</H2>
<H3> 1)	General questions</H3>
<a href="#1.1">1.1</a>)	What is PostgreSQL?<BR>
<a href="#1.2">1.2</a>)	What does PostgreSQL run on?<BR>
<a href="#1.3">1.3</a>)	Where can I get PostgreSQL?<BR>
<a href="#1.4">1.4</a>)	What's the copyright on PostgreSQL?<BR>
<a href="#1.5">1.5</a>)	Support for PostgreSQL<BR>
<a href="#1.6">1.6</a>)	Latest release of PostgreSQL<BR>
<a href="#1.7">1.7</a>)	Is there a commercial version of PostgreSQL?<BR>
<a href="#1.9">1.9</a>)	What version of SQL does PostgreSQL use?<BR>
<a href="#1.10">1.10</a>)	Does PostgreSQL work with databases from
earlier versions of postgres?<BR>
<a href="#1.11">1.11</a>)	How many people use PostgreSQL?<BR>
<H3> 2)	Installation questions</H3>
<a href="#2.1">2.1</a>)	initdb doesn't run<BR>
<a href="#2.2">2.2</a>)	when I start up the postmaster, I get
		"FindBackend: could not find a backend to execute..."
		"postmaster: could not find backend to execute..."<BR>
<a href="#2.3">2.3</a>)	The system seems to be confused about commas,
decimal points, and date formats.<BR>
<a href="#2.4">2.4</a>)	How do I install PostgreSQL somewhere other than
/usr/local/pgsql?<BR>
<a href="#2.5">2.5</a>)	When I run postmaster, I get a Bad System Call
core dumped message.<BR>
<a href="#2.6">2.6</a>)	When I try to start the postmaster, I get
IpcMemoryCreate errors.<BR>
<a href="#2.7">2.7</a>)	I have changed a source file, but a
recompile does not see the change?<BR>
<H3> 3)	Operational questions</H3>
<a href="#3.1">3.1</a>)	How do I specify a KEY or other constraints on a
column?<BR>
<a href="#3.2">3.2</a>)	Does PostgreSQL support nested subqueries?<BR>
<a href="#3.3">3.3</a>)	How do I define a unique indices?<BR>
<a href="#3.4">3.4</a>)	I've having a lot of problems using rules.<BR>
<a href="#3.5">3.5</a>)	I can't seem to write into the middle of large
objects reliably.<BR>
<a href="#3.6">3.6</a>)	Does PostgreSQL have a graphical user interface?
A report generator? A embedded query language interface?<BR>
<a href="#3.7">3.7</a>)	How can I write client applications to
PostgreSQL?<BR>
<a href="#3.8">3.8</a>)	How do I prevent other hosts from accessing my
PostgreSQL<BR>
<a href="#3.9">3.9</a>)	How do I set up a pg_group?<BR>
<a href="#3.10">3.10</a>)	What is the exact difference between
binary cursors and normal cursors?<BR>
<a href="#3.11">3.11</a>)	Why doesn't the != operator work?<BR>
<a href="#3.12">3.12</a>)	What is a R-tree index and what is it
used for?<BR>
<a href="#3.13">3.13</a>)	What is the maximum size for a
tuple?<BR>
<a href="#3.14">3.14</a>)	I defined indices but my queries don't
seem to make use of them. Why?<BR>
<a href="#3.15">3.15</a>)	Are there ODBC drivers for
PostgreSQL?<BR>
<a href="#3.16">3.16</a>)	How do I use postgres for
multi-dimensional indexing (&gt; 2 dimensions)?<BR>
<a href="#3.17">3.17</a>)	How do I do regular expression searches?
case-insensitive regexp searching?<BR>
<a href="#3.18">3.18</a>)	I can't access the database as the
'root' user.<BR>
<a href="#3.19">3.19</a>)	I experienced a server crash during a
vacuum.  How do I remove the lock file?<BR>
<a href="#3.20">3.20</a>)	What is the difference between the
various character types?<BR>
<a href="#3.21">3.21</a>)	In a query, how do I detect if a field
is NULL?<BR>
<a href="#3.22">3.22</a>)	How do I see how the query optimizer is
evaluating my query?<BR>
<a href="#3.23">3.23</a>)	How do I create a serial field?<BR>
<a href="#3.24">3.24</a>)	How do I create a multi-column
index?<BR>
<a href="#3.25">3.25</a>)	What are the temp_XXX files in my
database directory?<BR>
<a href="#3.26">3.26</a>)	Why are my table files not getting any
smaller after a delete?<BR>
<a href="#3.27">3.27</a>)	Why can't I connect to my database from
another machine?<BR>
<a href="#3.28">3.28</a>)	I get the error 'default index class
unsupported' when creating an index.  How do I do it?<BR>
<a href="#3.29">3.29</a>)	Why does creating an index crash the
backend server?<BR>
<a href="#3.30">3.30</a>)	How do I find out what indexes or
operations are defined in the database?<BR>
<a href="#3.31">3.31</a>) 	Why do statements require an extra character at
the end?  Why does 'createuser' return 'unexpected last match in
input()'?  Why does pg_dump fail?<BR>
<a href="#3.32">3.32</a>)	All my servers crash under concurrent
table access.  Why?<BR>
<a href="#3.33">3.33</a>)	What tools are available for hooking
postgres to Web pages?<BR>
<a href="#3.34">3.34</a>)	What is the time-warp feature and how
does it relate to vacuum?<BR>
<a href="#3.35">3.35</a>)	How do I tune the database engine for
better performance?<BR>
<a href="#3.36">3.36</a>)	What debugging features are available in
PostgreSQL?<BR>
<a href="#3.37">3.37</a>)	What is an oid?  What is a tid?<BR>
<a href="#3.38">3.38</a>)	What is the meaning of some of the terms
used in Postgres?<BR>
<a href="#3.39">3.39</a>)	What is Genetic Query Optimization?<BR>
<a href="#3.40">3.40</a>)	I am running Solaris and my dates
display wrong.  Why?
<a href="#3.41">3.41</a>)	How do I enable more than 32 concurrent
backends?
<H3> 4)	Questions about extending PostgreSQL</H3>
<a href="#4.1">4.1</a>)	I wrote a user-defined function and when I run
it in psql, it dumps core.<BR>
<a href="#4.2">4.2</a>)	I get messages of the type
NOTICE:PortalHeapMemoryFree: 0x402251d0<BR>
<a href="#4.3">4.3</a>)	I've written some nifty new types and functions
for PostgreSQL.<BR>
<a href="#4.4">4.4</a>)	How do I write a C function to return a
tuple?<BR>
<H3> 5)	Bugs</H3>
<a href="#5.1">5.1</a>)	How do I make a bug report?

<HR> <H2> Section 1:	General Questions</H2> <H3><a
name="1.1">1.1</a>)	What is PostgreSQL?</H3>

<P>
PostgreSQL is an enhancement of the POSTGRES database management system,
a next-generation DBMS research prototype.  While PostgreSQL retains the
powerful data model and rich data types of POSTGRES, it replaces the
PostQuel query language with an extended subset of SQL.  PostgreSQL is
free and the complete source is available.
<P>
PostgreSQL development is being performed by a team of Internet
developers who all subscribe to the PostgreSQL development mailing list.
The current coordinator is Marc G. Fournier (<a
href="mailto:scrappy@@postgreSQL.org">scrappy@@postgreSQL.org</a>). (See
below on how to join). This team is now responsible for all current and
future development of PostgreSQL.
<P>
The authors of PostgreSQL 1.01 were Andrew Yu and Jolly Chen. Many
others have contributed to the porting, testing, debugging and
enhancement of the code.  The original Postgres code, from which
PostgreSQL is derived, was the effort of many graduate students,
undergraduate students, and staff programmers working under the
direction of Professor Michael Stonebraker at the University of
California, Berkeley.
<P>
The original name of the software at Berkeley was Postgres.  When SQL
functionality was added in 1995, its name was changed to Postgres95. The
name was changed at the end of 1996 to PostgreSQL.
<P>
<H3><a name="1.2">1.2</a>)	What does PostgreSQL run
on?</H3>
<P>
The authors have compiled and tested PostgreSQL on the following
platforms(some of these compiles require gcc 2.7.0):
<UL>
<LI>   aix -            IBM on AIX 3.2.5
<LI>   alpha -          DEC Alpha AXP on OSF/1 2.0
<LI>   BSD44_derived - OSs derived from 4.4-lite BSD (NetBSD, FreeBSD)
<LI>   bsdi -          BSD/OS 2.0, 2.01, 2.1, 3.0
<LI>   dgux -          DG/UX 5.4R3.10
<LI>   hpux -          HP PA-RISC on HP-UX 9.0
<LI>   i386_solaris -   i386 Solaris
<LI>   irix5 -         SGI MIPS on IRIX 5.3
<LI>   linux -         Intel x86 on Linux 1.2 and Linux ELF
                      (For non-ELF Linux, see LINUX_ELF below).
<LI>   sparc_solaris - SUN SPARC on Solaris 2.4
<LI>   sunos4 -         SUN SPARC on SunOS 4.1.3
<LI>   svr4 -          Intel x86 on Intel SVR4
<LI>   ultrix4 -       DEC MIPS on Ultrix 4.4
</UL>
The following platforms have known problems/bugs:
<UL>
<LI>   nextstep -      Motorola MC68K or Intel x86 on NeXTSTEP 3.2
</UL>
<P>
<H3><a name="1.3">1.3</a>)	Where can I get PostgreSQL?</H3>
<P> The primary anonymous ftp site for PostgreSQL is:
<UL>
<LI>		<a
href="ftp://ftp.postgreSQL.org/pub">ftp://ftp.postgreSQL.org/pub</a>
</UL>
<P> A mirror site exists at:
<UL>
<LI>		<a
href="ftp://postgres95.vnet.net/pub/postgres95">ftp://postgres95.vnet.net/pub/postgres95</a>
<LI>		<a
href="ftp://ftp.luga.or.at/pub/postgres95">ftp://ftp.luga.or.at/pub/postgres95</a>
<LI>		<a
href="ftp://cal011111.student.utwente.nl/pub/postgres95">ftp://cal011111.student.utwente.nl/pub/postgres95</a>
<LI>		<a
href="ftp://ftp.uni-trier.de/pub/database/rdbms/postgres/postgres95">ftp://ftp.uni-trier.de/pub/database/rdbms/postgres/postgres95</a>
<LI>		<a
href="ftp://rocker.sch.bme.hu">ftp://rocker.sch.bme.hu</a>
</UL>
<H3><a name="1.4">1.4</a>)	What's the copyright on
PostgreSQL?</H3>
<P>
PostgreSQL is subject to the following COPYRIGHT.
<P>
PostgreSQL Data Base Management System
<P>
Copyright (c) 1994-6 Regents of the University of California
<P>
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written
agreement is hereby granted, provided that the above copyright notice
and this paragraph and the following two paragraphs appear in all
copies.
<P>
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
<P>
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER
IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO
OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.
<P>
<H3><a name="1.5">1.5</a>)	Support for PostgreSQL </H3>
<P>
There is no official support for PostgreSQL from the original
maintainers or from University of California, Berkeley.  It is
maintained through volunteer effort only.
<P>
The main mailing list is: <a
href="mailto:questions@@postgreSQL.org">questions@@postgreSQL.org</a>. It
is available for discussion o f matters pertaining to PostgreSQL,
including but not limited to bug reports and fixes. For info on how to
subscribe, send a mail with the lines in the body (not the subject line)
<PRE>
<CODE>
	subscribe
	end
</CODE>
</PRE>
<P>
to <a
href="mailto:questions-request@@postgreSQL.org">questions-request@@postgreSQL.org</a>.
<P>
There is also a digest list available.  To subscribe to this list, send
email to:
<a
href="mailto:questions-digest-request@@postgreSQL.org">
questions-digest-request@@postgreSQL.org</a> with a BODY of:
<PRE>
<KBD>
	subscribe
	end
</KBD>
</PRE>
Digests are sent out to members of this list whenever the main list has
received around 30k of messages.
<P>
There is a bugs mailing list available.  To subscribe to this
list, send email to <a
href="mailto:bugs-request@@postgreSQL.org">bugs-request@@postgreSQL.org</a>
with a BODY of:
<P>
There is also a developers discussion mailing list available.  To subscribe to this
list, send email to <a
href="mailto:hackers-request@@postgreSQL.org">hackers-request@@postgreSQL.org</a>
with a BODY of:
<P>
<PRE>
<KBD>
	subscribe
	end
</KBD>
</PRE>
<P>
Additional information about PostgreSQL can be found via the PostgreSQL
WWW home page at:
<BLOCKQUOTE>
		<a
href="http://postgreSQL.org">http://postgreSQL.org</a>
</BLOCKQUOTE>
<P>
<H3><a name="1.6">1.6</a>)	Latest release of PostgreSQL</H3>
<P>
The latest release of PostgreSQL is version 6.0, which was released on
January 31, 1997.  6.1 is scheduled for release soon.  For information
about what is new in 6.1, see our TODO list on our WWW page.
<P>
We expect a 7.0 release in several months that will remove time-travel
and reduce by 50% the size of on-disk system columns maintained for each
row in a table.  This release will also require a dump and restore.
<P>
<H3><a name="1.7">1.7</a>)	Is there a commercial version of PostgreSQL?</H3>
<P>
Illustra Information Technology (a wholly owned subsidiary of Informix
Software, Inc.) sells an object-relational DBMS called Illustra that was
originally based on postgres. Illustra has cosmetic similarities to
PostgreSQL but has more features, is more robust, performs better, and
offers real documentation and support.  On the flip side, it costs
money. For more information, contact <a
href="mailto:sales@@illustra.com">sales@@illustra.com</a>
<P>
<H3><a name="1.8">1.8</a>)	What documentation is available for PostgreSQL?</H3>
<P>
A user manual, manual pages, and some small test examples are included
in the distribution.  The sql and built-in manual pages are particularly
important.
<P>
The www page contains pointers to an implementation guide and five
papers written about postgres design concepts and features.
<P>
<H3><a name="1.9">1.9</a>)	What version of SQL does PostgreSQL use?</H3>
<P>
PostgreSQL supports a subset of SQL-92.  It has most of the important
constructs but lacks some of the functionality. The most visible
differences are:
<UL>
<LI> no support for nested subqueries
<LI> no HAVING clause under a GROUP BY
</UL>
<P>
On the other hand, you get to create user-defined types, functions,
inheritance etc.  If you're willing to help with PostgreSQL coding,
eventually we can also add the missing features listed above.
<P>
<H3><a name="1.10">1.10</a>)	Does PostgreSQL work with databases from
earlier versions of postgres?</H3>
<P>
PostgreSQL v1.09 is compatible with databases created with v1.01. Those
upgrading from 1.0 should read the directions in the
MIGRATION_1.0_TO_1.02 directory.
<P>
Upgrading to 6.0 requires a dump and restore from previous releases.
<P>
Upgrading to 6.1 requires a dump and restore from previous releases.
<P>
Those ugrading from versions earlier than 1.09 must upgrade to 1.09
first without a dump/reload, then dump the data from 1.09, and then load
it into 6.0 or 6.1.
<P>
<H3><a name="1.11">1.11</a>)	How many people use PostgreSQL?</H3>
<P>
Since we don't have any licensing or registration scheme, it's
impossible to tell.  We do know hundreds copies of PostgreSQL  v1.* have
been downloaded, and that there many hundreds of  subscribers to the
mailing lists.
<P>
<HR>
<H2> Section 2:	Installation Questions
</H2>
<P>
<H3><a name="2.1">2.1</a>)	initdb doesn't run</H3>
<P>
<UL>
<LI> check to see that you have the proper paths set
<LI> check that the 'postgres' user owns all the right files
<LI> ensure that there are files in $PGDATA/files, and that they
are non-empty.  If they aren't, then "gmake install" failed for
some reason
</UL>
<P>
<H3><a name="2.2">2.2</a>)	when I start up the postmaster, I get
		"FindBackend: could not find a backend to execute..."
		"postmaster: could not find backend to execute..."</H3>
<P>
You probably do not have the right path set up. The 'postgres'
executable needs to be in your path.
<P>
<H3><a name="2.3">2.3</a>)	The system seems to be confused about commas,
decimal points, and date formats.</H3>
<P>
Check your locale configuration. PostgreSQL uses the locale settings of
the user that ran the postmaster process.  Set those accordingly for
your operating environment.
<P>
<H3><a name="2.4">2.4</a>)	How do I install PostgreSQL somewhere other than
/usr/local/pgsql?</H3>
<P>
You need to edit Makefile.global and change POSTGRESDIR accordingly, or
create a Makefile.custom and define POSTGRESDIR there.
<P>
<H3><a name="2.5">2.5</a>)	When I run postmaster, I get a Bad System
Call core dumped message.</H3>
<P>
It could be a variety of problems, but first check to see that you have
system V extensions installed on your kernel. PostgreSQL requires kernel
support for shared memory.
<P>
<H3><a name="2.6">2.6</a>)	When I try to start the postmaster, I get
IpcMemoryCreate errors.</H3>
<P>
You either do not have shared memory configured properly in kernel or
you need to enlarge the shared memory available in the kernel.  The
exact amount you need depends on your architecture  and how many buffers
you configure postmaster to run with.   For most systems, with default
buffer sizes, you need a minimum of ~760K.
<P>
<H3><a name="2.7">2.7</a>)	I have changed a source file, but a
recompile does not see the change?</H3>
<P>
The Makefiles do not have the proper dependencies for include files. You
have to do a 'make clean' and then another 'make'.
<P>
<HR>
<H2> Section 3:	PostgreSQL Features
</H2>

<P>
<H3><a name="3.1">3.1</a>)	How do I specify a KEY or other constraints on a
column?</H3>
<P>
Column constraints are not supported in PostgreSQL. As a consequence,
the system does not check for duplicates.
<P>
Under 6.0, create a unique index on the column.  Attempts to create
duplicate of that column will report an error.
<P>
<H3><a name="3.2">3.2</a>)	Does PostgreSQL support nested subqueries?</H3>
<P>
Subqueries are not implemented, but they can be simulated using sql
functions.
<P>
<H3><a name="3.3">3.3</a>)	How do I define a unique indices?</H3>
<P>
PostgreSQL 6.0 supports unique indices.
<P>
<H3><a name="3.4">3.4</a>)	I've having a lot of problems using rules.</H3>
<P>
Currently, the rule system in PostgreSQL is mostly broken. It works
enough to support the view mechanism, but that's about it.  Use
PostgreSQL rules at your own peril.
<P>
<H3><a name="3.5">3.5</a>)	I can't seem to write into the middle of large
objects reliably.</H3>
<P>
The Inversion large object system in PostgreSQL is also mostly broken.
It works well enough for storing large wads of data and reading them
back out, but the implementation has some underlying problems.  Use
PostgreSQL large objects at your own peril.
<P>
<H3><a name="3.6">3.6</a>)	Does PostgreSQL have a graphical user interface?
A report generator? A embedded query language interface?</H3>
<P>
No. No. No.  Not in the official distribution at least. Some users have
reported some success at using 'pgbrowse' and 'onyx' as frontends to
PostgreSQL.  Several contributions are working on tk based frontend
tools.  Ask on the mailing list.
<P>
<H3><a name="3.7">3.7</a>)	How can I write client applications to PostgreSQL?</H3>
<P>
PostgreSQL supports a C-callable library interface called libpq as well
as a Tcl-based library interface called libtcl.
<P>
Others have contributed a perl interface and a WWW gateway to
PostgreSQL.  See the PostgreSQL home pages for more details.
<P>
<H3><a name="3.8">3.8</a>)	How do I prevent other hosts from accessing my
PostgreSQL backend?</H3>
<P>
Use host-based authentication by modifying the file $PGDATA/pg_hba
accordingly.
<P>
<H3><a name="3.9">3.9</a>)	How do I set up a pg_group?</H3>
<P>
Currently, there is no easy interface to set up user groups. You have to
explicitly insert/update the pg_group table. For example:
<PRE>
<CODE>
	jolly=&gt; insert into pg_group (groname, grosysid, grolist)
	jolly=&gt;     values ('posthackers', '1234', '{5443, 8261}');
	INSERT 548224
	jolly=&gt; grant insert on foo to group posthackers;
	CHANGE
	jolly=&gt;
</CODE>
</PRE>
<P>
	The fields in pg_group are:
<UL>
<LI> groname:  the group name.  This a char16 and should
			  be purely alphanumeric.  Do not include underscores
			  or other punctuation.
<LI>		grosysid: the group id.  This is an int4.
			  This should be unique for each group.
<LI>		grolist:   the list of pg_user id's that belong in the group.
			  This is an int4[].
</UL>
<P>
<H3><a name="3.10">3.10</a>)	What is the exact difference between binary
cursors and normal cursors?</H3>
<P>
Normal cursors return data back in ASCII format.  Since data is stored
natively in binary format, the system must do a conversion to produce
the ASCII format.  In addition, ASCII formats are often large in size
than binary format.  Once the attributes come back in ASCII, often the
client application then has to convert it to a binary format to
manipulate it anyway.
<P>
Binary cursors give you back the data in the native binary
representation.  Thus, binary cursors will tend to be a little faster
since there's less overhead of conversion.
<P>
However, ASCII is architectural neutral whereas binary representation
can differ between different machine architecture.  Thus, if your client
machine uses a different representation than you server machine, getting
back attributes in binary format is probably not what you want. Also, if
your main purpose is displaying the data in ASCII, then getting it back
in ASCII will save you some effort on the client side.
<P>
<H3><a name="3.11">3.11</a>)	Why doesn't the != operator work?</H3>
<P>
SQL specifies &lt;&gt; as the inequality operator, and that is what we
have defined for the built-in types.
<P>
In 6.0, != is equivalent to &lt;&gt;.
<P>
<H3><a name="3.12">3.12</a>)	What is a R-tree index and what is it used for?</H3>
<P>
An r-tree index is used for indexing spatial data. A hash index can't
handle range searches. A B-tree index only handles range searches in a
single dimension. R-tree's can handle multi-dimensional data.  For
example, if a R-tree index can be built on an attribute of type 'point',
the system can more efficient answer queries like select all points
within a bounding rectangle.
<P>
The canonical paper that describes the original R-Tree design is:
<P>
Guttman, A. "R-Trees: A Dynamic Index Structure for Spatial Searching."
Proc of the 1984 ACM SIGMOD Int'l Conf on Mgmt of Data, 45-57.
<P>
You can also find this paper in Stonebraker's "Readings in Database
Systems"
<P>
<H3><a name="3.13">3.13</a>)	What is the maximum size for a tuple?</H3>
<P>
Tuples are limited to 8K bytes.  Taking into account system attributes
and other overhead, one should stay well shy of 8,000 bytes to be on the
safe side.   To use attributes larger than 8K, try using the large
objects interface.
<P>
Tuples do not cross 8k boundaries so a 5k tuple will require 8k of
storage.
<P>
<H3><a name="3.14">3.14</a>)	I defined indices but my queries don't seem
to make use of them. Why?</H3>
<P>
PostgreSQL does not automatically maintain statistics.  One has to make
an explicit 'vacuum' call to update the statistics.   After statistics
are updated, the optimizer has a better shot at using indices.  Note
that the optimizer is limited and does not use indices in some
circumstances (such as OR clauses).
<P>
If the system still does not see the index, it is probably because you
have created an index on a field with the improper *_ops type.  For
example, you have created a CHAR(4) field, but have specified a char_ops
index type_class.
<P>
See the create_index manual page for information on what type classes
are available.  It must match the field type.
<P>
Postgres does not warn the user when the improper index is created.
<P>
Indexes not used for ORDER BY operations.
<P>
<H3><a name="3.15">3.15</a>)	Are there ODBC drivers for PostgreSQL?</H3>
<P>
There are two ODBC drivers available, PostODBC and OpenLink ODBC.
<P>
For all people being interested in PostODBC, there are now two mailing
lists devoted to the discussion of PostODBC. The mailing lists are:
<UL>
<LI> <a
href="mailto:postodbc-users@@listserv.direct.net">postodbc-users@@listserv.direct.
net</a>
<LI> <a
href="mailto:postodbc-developers@@listserv.direct.net">postodbc-developers@@listse
rv.direct.net</a>
</UL>
<P>
these lists are ordinary majordomo mailing lists.  You can subscribe by
sending a mail to:
<UL>
<LI>	        <a
href="mailto:majordomo@@listserv.direct.net">majordomo@@listserv.direct.net</a>
</UL>
<P>
OpenLink ODBC is currently in beta under Linux. You can get it from <a
href="http://www.openlinksw.com/postgres.html">
http://www.openlinksw.com/postgres.html</a>. It works with our standard
ODBC client software so you'll have Postgres ODBC available on every
client platform we support (Win, Mac, Unix, VMS).
<P>
We will probably be selling this product to people who need
commercial-quality support, but a freeware version will always be
available. Questions to <a
href="mailto:postgres95@@openlink.co.uk">postgres95@@openlink.co.uk</a>.
<P>
<H3><a name="3.16">3.16</a>)	How do I use postgres for multi-dimensional
indexing (&gt; 2 dimensions)?</H3>
<P>
Builtin R-Trees can handle polygons and boxes.  In theory, R-trees can
be extended to handle higher number of dimensions.  In practice,
extending R-trees require a bit of work and we don't currently have any
documentation on how to do it.
<P>
<H3><a name="3.17">3.17</a>)	How do I do regular expression searches?
case-insensitive regexp searching?</H3>
<P>
PostgreSQL supports the SQL LIKE syntax as well as more general regular
expression searching with the ~ operator. The !~ is the negated regexp
operator.  ~* and !~* are the case-insensitive regular expression
operators.
<P>
<H3><a name="3.18">3.18</a>)	I can't access the database as the 'root' user.</H3>
<P>
You should not create database users with user id 0(root). They will  be
unable to access the database.  This is a security precaution  because
of the ability of any user to dynamically link object modules  into the
database engine.
<P>
<H3><a name="3.19">3.19</a>)	I experienced a server crash during a
vacuum.  How do I remove the lock file?</H3>
<P>
If the server crashes during a vacuum command, chances are it will leave
a lock file hanging around.  Attempts to re-run the vacuum command
result in
<PRE>
<SAMP>
	WARN:can't create lock file -- another vacuum cleaner running?
</SAMP>
</PRE>
<P>
If you are sure that no vacuum is actually running, you can remove the
file called "pg_vlock" in your database directory (which is
$PGDATA/base/&lt;dbName&gt;)
<P>
<H3><a name="3.20">3.20</a>)	What is the difference between the various
character types?</H3>
<PRE>
d594 319
a912 365
</PRE>
<P>
Remember, you need to use the internal name when creating indexes on
these fields or when doing other internal operations.
<P>
The last four types above are "varlena" types (i.e. the first four bytes
is the length, followed by the data). CHAR(#) and VARCHAR(#) allocate
the maximum number of bytes no matter how much data is stored in the
field.  TEXT and BYTEA are the only character types that have variable
length on the disk.
<P>
<H3><a name="3.21">3.21</a>)	In a query, how do I detect if a field is NULL?</H3>
<P>
PostgreSQL has two builtin keywords, "isnull" and "notnull" (note no
spaces).  Version 1.05 and later and 6.* understand IS NULL and IS NOT
NULL.
<P>
<H3><a name="3.22">3.22</a>)	How do I see how the query optimizer is
evaluating my query?</H3>
<P>
Place the word 'EXPLAIN' at the beginning of the query, for example:
<PRE>
<CODE>
	EXPLAIN SELECT * FROM table1 WHERE age = 23;
</CODE>
</PRE>
<P>
<H3><a name="3.23">3.23</a>)	How do I create a serial field?</H3>
<P>
Postgres does not allow the user to specifiy a user column as type
SERIAL.  Instead, you can use each row's oid field as a unique value. 
However, if you need to dump and reload the database, you need to be
using postgres version 1.07 or later or 6.* with pgdump's -o option or
COPY's WITH OIDS option to preserver the oids.
<P>
Another valid way of doing this is to create a function:
<PRE>
<CODE>
	create table my_oids (f1 int4);
	insert into my_oids values (1);
	create function new_oid () returns int4 as
		'update my_oids set f1 = f1 + 1;  select f1 from my_oids; '
	language 'sql';
</CODE>
</PRE>
<P>
then:
<PRE>
<CODE>
       	create table my_stuff (my_key int4, value text);
	insert into my_stuff values (new_oid(), 'hello');
</CODE>
</PRE>
<P>
However, keep in mind there is a race condition here where one server
could do the update, then another one do an update, and they both could
select the same new id.  This statement should be performed within a
transaction.
<P>
Sequences are implemented in 6.1
<P>
<H3><a name="3.24">3.24</a>)	How do I create a multi-column index?</H3>
<P>

In 6.0, you can not directly create a multi-column index using create
index.  You need to define a function which acts on the multiple columns,
then use create index with that function.
<P>
In 6.1, this feature is available.
<P>
<H3><a name="3.25">3.25</a>)	What are the temp_XXX files in my database
directory?</H3>
<P>
They are temp_ files generated by the query executor.  For example, if a
sort needs to be done to satisfy an ORDER BY, some temp files are
generated as a result of the sort.
<P>
If you have no transactions or sorts running at the time, it is safe to
delete the temp_ files.
<P>
<H3><a name="3.26">3.26</a>)	Why are my table files not getting any
smaller after a delete?</H3>
<P>
If you run vacuum in pre-6.0, unused rows will be marked for reuse, but
the file blocks are not released.
<P>
In 6.0, vacuum properly shrinks tables.
<P>
<H3><a name="3.27">3.27</a>)	Why can't I connect to my database from
another machine?</H3>
<P>
The default configuration allows only connections from tcp/ip host
localhost.  You need to add a host entry to the file pgsql/data/pg_hba.
<P>
<H3><a name="3.28">3.28</a>)	I get the error 'default index class
unsupported' when creating an index.  How do I do it?</H3>
<P>
You probably used:
<PRE>
<CODE>
	create index idx1 on person using btree (name);
</CODE>
</PRE>
<P>
PostgreSQL indexes are extensible, and therefore in pre-6.0, you must
specify a class_type when creating an index.  Read the manual page for
create index (called create_index).
<P>
Version 6.0, if you do not specify a class_type, it defaults to the
proper type for the column.
<P>
<H3><a name="3.29">3.29</a>)	Why does creating an index crash the
backend server?</H3>
<P>
You have probably defined an incorrect *_ops type class for the field
you are indexing.
<P>
<H3><a name="3.30">3.30</a>)	How do I find out what indexes or
operations are defined in the database?</H3>
<P>
Run the file pgsql/src/tutorial/syscat.source.  It illustrates many of
the 'select's needed to get information out of the database system
tables.
<P>
<H3><a name="3.31">3.31</a>) 	Why do statements require an extra character at
the end?  Why does 'createuser' return 'unexpected last match in input()'?
Why does pg_dump fail?</H3>
<P>
You have compile postgres with flex version 2.5.3.  There is bug in this
version of flex.  Use flex version 2.5.2 or flex 2.5.4 instead.  There
is a doc/README.flex file which will properly patch the flex 2.5.3
source code.
<P>
<H3><a name="3.32">3.32</a>)	All my servers crash under concurrent table
access.  Why?</H3>
<P>
This problem can be caused by a kernel that is not configured to support
semaphores.
<P>
<H3><a name="3.33">3.33</a>)	What tools are available for hooking
postgres to Web pages?</H3>
<P>
For web integration, PHP/FI is an excellent interface. The URL for that
is <a href="http://www.vex.net/php/">http://www.vex.net/php/</a>
<P>
PHP is great for simple stuff, but for more complex stuff, some still
use the perl interface and CGI.pm.
<P>
An example of using WWW with C to talk to Postgres is can be tried at:
<UL>
<LI>
		<a href="http://postgreSQL.org/%7Emlc">http://postgreSQL.org/~mlc</a>
</UL>
<P>
An WWW gatway based on WDB using perl can be downloaded from:
<UL>
<LI>
		<a
href="http://www.eol.ists.ca/~dunlop/wdb-p95">http://www.eol.ists.ca/~dunlop/wdb
-p95</a>
</UL>
<H3><a name="3.34">3.34</a>)	What is the time-warp feature and how does
it relate to vacuum?</H3>
<P>
PostgreSQL handles data changes differently than most database systems.
When a row is changed in a table, the original row is marked with the
time it was changed, and a new row is created with the current data.  By
default, only current rows are used in a table.  If you specify a
date/time after the table name in a FROM clause, you can access the data
that was current at that time, i.e.
<PRE>
<CODE>
	SELECT *
	FROM employees ['July 24, 1996 09:00:00']
</CODE>
</PRE>
<P>
displays employee rows in the table at the specified time. You can
specify intervals like [date,date], [date,], [,date], or [,].  This last
option accesses all rows that ever existed.
<P>
INSERTed rows get a timestamp too, so rows that were not in the table at
the desired time will not appear.
<P>
Vacuum removes rows that are no longer current.  This time-warp feature
is used by the engine for rollback and crash recovery.  Expiration times
can be set with purge.
<P>
In 6.0, once a table is vacuumed, the creation time of a row may be
incorrect, causing time-traval to fail.
<P>
The time-travel feature will be removed in 7.0.
<P>
<H3><a name="3.35">3.35</a>)	How do I tune the database engine for
better performance?</H3>
<P>
There are two things that can be done.  You can use Openlink's option to
disable fsync() by starting the postmaster with a  '-o -F' option.  This
will prevent fsync()'s from flushing to disk after every transaction.
<P>
You can also use the postmaster -B option to increase the number of
shared memory buffers shared among the backend processes.  If you make
this parameter too high, the process will not start or crash
unexpectedly.  Each buffer is 8K and the defualt is 64 buffers.
<P>
<H3><a name="3.36">3.36</a>)	What debugging features are available in
PostgreSQL?</H3>
<P>
PostgreSQL has several features that report status information that can
be valuable for debugging purposes.
<P>
First, by compiling with DEBUG defined, many assert()'s monitor the
progress of the backend and halt the program when something unexpected
occurs.
<P>
Both postmaster and postgres have several debug options available.
First, whenever you start the postmaster, make sure you send the
standard output and error to a log file, like:
<PRE>
<KBD>
	cd /usr/local/pgsql
	./bin/postmaster &gt;server.log 2&gt;&1 &
</KBD>
</PRE>
<P>
This will put a server.log file in the top-level PostgreSQL directory.
This file can contain useful information about problems or errors
encountered by the server.  Postmaster has a -d option that allows even
more detailed information to be reported.  The -d option takes a number
1-3 that specifies the debug level.  The query plans in a verbose debug
file can be formatted using the 'indent' program. (You may need to
remove the '====' lines in 1.* releases.) Be warned that a debug level
greater than one generates large  log files in 1.* releases.
<P>
You can actuall run the postgres backend from the command line, and type
your SQL statement directly.  This is recommended ONLY for debugging
purposes. Note that a newline terminates the query, not a semicolon.  If
you have compiled with debugging symbols, you can perhaps use a debugger
to see what is happening.  Because the backend was not started from the
postmaster, it is not running in an identical environment and
locking/backend interaction problems may not be duplicated.  Some
operating system can attach to a running backend directly to diagnose
problems.
<P>
The postgres program has a -s, -A, -t options that can be very usefull
for debugging and performance measurements.
<P>
The EXPLAIN command (see this FAQ) allows you to see how PostgreSQL is
iterpreting your query.
<P>
<H3><a name="3.37">3.37</a>)	What is an oid?  What is a tid?</H3>
<P>
Oids are Postgres's answer to unique row ids or serial columns.  Every
row that is created in Postgres gets a unique oid.  All oids generated
by initdb are less than 16384 (from backend/access/transam.h).  All
post-initdb (user-created) oids are equal or greater that this.  All
these oids are unique not only within a table, or database, but unique
within the entire postgres installation.
<P>
Postgres uses oids in its internal system tables to link rows in
separate tables.  These oids can be used to identify specific user rows
and used in joins.  It is recommended you use column type oid to store
oid values.  See the sql(l) manual page to see the other internal
columns.
<P>
Tids are used to indentify specific physical rows with block and offset
values.  Tids change after rows are modified or reloaded.  They are used
by index entries to point to physical rows.  They can not be accessed
through sql.
<P>
<H3><a name="3.38">3.38</a>)	What is the meaning of some of the terms
used in Postgres?</H3>
<P>
Some of the source code and older documentation use terms that have more
common usage.  Here are some:
<UL>
<LI> row, record, tuple
<LI> attribute, field, column
<LI> table, class
<LI> retrieve, select
<LI> replace, update
<LI> append, insert
<LI> oid, serial value
<LI> portal, cursor
<LI> range variable, table name, table alias
</UL>
<P>
Please let me know if you think of any more.
<P>
<H3><a name="3.39">3.39</a>)	What is Genetic Query Optimization?</H3>
<P>
The GEQO module in PostgreSQL is intended to solve the query
optimization problem of joining many tables by means of a Genetic
Algorithm (GA). It allows the handling of large join queries through
non-exhaustive search.
<P>
For further information see README.GEQO &lt;utesch@@aut.tu-freiberg.de&gt;.
<P>
<H3><a name="3.40">3.40</a>)	I am running Solaris and my dates
display wrong.  Why?</H3>
<P>
There was a bug in 6.0 that caused this problem under Solaris with -O2
optimization.
Upgrade to 6.1.
<P>
<H3><a name="3.41">3.41</a>)	How do I enable more than 32 concurrent
backends?</H3>
<P>
Edit include/storage/sinvaladt.h, and change the value of MaxBackendId.
In the future, we plan to make this a configurable prameter.
<P>
<HR>
<H2> Section 4:	Extending PostgreSQL
</H2>
<P>
<H3><a name="4.1">4.1</a>)	I wrote a user-defined function and when I run it
in psql, it dumps core.</H3>
<P>
The problem could be a number of things.  Try testing your user-defined
function in a stand alone test program first. Also, make sure you are
not sending elog NOTICES when the front-end is expecting data, such as
during a type_in() or type_out() functions
<P>
<H3><a name="4.2">4.2</a>)	I get messages of the type
	NOTICE:PortalHeapMemoryFree: 0x402251d0 not in alloc set!</H3>
<P>
You are pfree'ing something that was not palloc'ed.  When writing
user-defined functions, do not include the file "libpq-fe.h".  Doing so
will cause your palloc to be a malloc instead of a free.  Then, when the
backend pfrees the storage, you get the notice message.
<P>
<H3><a name="4.3">4.3</a>)	I've written some nifty new types and functions for
PostgreSQL.</H3>
<P>
Please share them with other PostgreSQL users.  Send your extensions to
mailing list, and they will eventually end up in the contrib/
subdirectory.
<P>
<H3><a name="4.4">4.4</a>)	How do I write a C function to return a tuple?</H3>
<P>
This requires extreme wizardry, so extreme that the authors have not
ever tried it, though in principle it can be done. The short answer is
... you can't.   This capability is forthcoming in the future.
<P>
<HR>
<H2> Section 5:	Bugs
</H2>
<P>
<H3><a name="5.1">5.1</a>)	How do I make a bug report?</H3>
<P>
Check the current FAQ at <a
href="http://postgreSQL.org">http://postgreSQL.org</a>
<P>
Also check out our ftp site <a
href="ftp://ftp.postgreSQL.org/pub">ftp://ftp.postgreSQL.org/pub</a> to
see if there is a more recent PostgreSQL version.
<P>
You can also fill out the "bug-template" file and send it to:
<UL>
<LI>		<a href="mailto:bugs@@postgreSQL.org">bugs@@postgreSQL.org</a>
</UL>
<P>
This is the address of the developers mailing list.
</BODY>
</HTML>
@


1.8
log
@Update FAQ and TODO
@
text
@d1 667
a667 583

                Frequently Asked Questions (FAQ) for PostgreSQL
                                       
   Last updated: Tue May 13 23:15:59 EDT 1997
   Version: 6.1
   
   Current maintainer: Bruce Momjian (maillist@@candle.pha.pa.us)
   
   The most recent version of this document can be viewed at the
   postgreSQL Web site, http://postgreSQL.org.
   
   Linux-specific questions are answered in
   http://postgreSQL.org/docs/FAQ-Linux.phtml.
   
   Irix-specific questions are answered in
   http://postgreSQL.org/docs/FAQ-Irix.phtml.
   
   Changes in this version (* = modified, + = new):
     * 3.42) What is Genetic Query Optimization?
     * 3.43) I am running Solaris and my dates display wrong. Why?
       
     _________________________________________________________________
                                      
Questions answered:

  1) General questions
  
   1.1) What is PostgreSQL?
   1.2) What does PostgreSQL run on?
   1.3) Where can I get PostgreSQL?
   1.4) What's the copyright on PostgreSQL?
   1.5) Support for PostgreSQL
   1.6) Latest release of PostgreSQL
   1.7) Is there a commercial version of PostgreSQL?
   1.9) What version of SQL does PostgreSQL use?
   1.10) Does PostgreSQL work with databases from earlier versions of
   postgres?
   1.11) How many people use PostgreSQL?
   
  2) Installation questions
  
   2.1) initdb doesn't run
   2.2) when I start up the postmaster, I get "FindBackend: could not
   find a backend to execute..." "postmaster: could not find backend to
   execute..."
   2.3) The system seems to be confused about commas, decimal points, and
   date formats.
   2.4) How do I install PostgreSQL somewhere other than
   /usr/local/pgsql?
   2.5) When I run postmaster, I get a Bad System Call core dumped
   message.
   2.6) I get the error message "obj/fmgr.h: No such file or directory"
   2.7) When I try to start the postmaster, I get IpcMemoryCreate errors.
   2.8) I have changed a source file, but a recompile does not see the
   change?
   
  3) Operational questions
  
   3.1) How do I specify a KEY or other constraints on a column?
   3.2) Does PostgreSQL support nested subqueries?
   3.3) How do I define a unique indices?
   3.4) I've having a lot of problems using rules.
   3.5) I can't seem to write into the middle of large objects reliably.
   3.6) Does PostgreSQL have a graphical user interface? A report
   generator? A embedded query language interface?
   3.7) How can I write client applications to PostgreSQL?
   3.8) How do I prevent other hosts from accessing my PostgreSQL
   3.9) How do I set up a pg_group?
   3.10) What is the exact difference between binary cursors and normal
   cursors?
   3.11) Why doesn't the != operator work?
   3.12) What is a R-tree index and what is it used for?
   3.13) What is the maximum size for a tuple?
   3.14) I defined indices but my queries don't seem to make use of them.
   Why?
   3.15) Are there ODBC drivers for PostgreSQL?
   3.16) How do I use postgres for multi-dimensional indexing (> 2
   dimensions)?
   3.17) How do I do regular expression searches? case-insensitive regexp
   searching?
   3.18) I can't access the database as the 'root' user.
   3.19) I experienced a server crash during a vacuum. How do I remove
   the lock file?
   3.20) What is the difference between the various character types?
   3.21) In a query, how do I detect if a field is NULL?
   3.22) How do I see how the query optimizer is evaluating my query?
   3.23) How do I create a serial field?
   3.24) How do I create a multi-column index?
   3.25) What are the temp_XXX files in my database directory?
   3.26) Why are my table files not getting any smaller after a delete?
   3.27) Why can't I connect to my database from another machine?
   3.28) I get the error 'default index class unsupported' when creating
   an index. How do I do it?
   3.29) Why does creating an index crash the backend server?
   3.30) How do I specify a decimal constant as a float8, or a string as
   a text? Why am I getting poor precision?
   3.31) How do I find out what indexes or operations are defined in the
   database?
   3.32) My database is corrupt. I can't do anything. What should I do?
   3.33) Createdb, destroydb, createuser, destroyuser don't run. Why?
   3.34) Why do statements require an extra character at the end? Why
   does 'createuser' return 'unexpected last match in input()'? Why does
   pg_dump fail?
   3.35) All my servers crash under concurrent table access. Why?
   3.36) What tools are available for hooking postgres to Web pages?
   3.37) What is the time-warp feature and how does it relate to vacuum?
   3.38) How do I tune the database engine for better performance?
   3.39) What debugging features are available in PostgreSQL?
   3.40) What is an oid? What is a tid?
   3.41) What is the meaning of some of the terms used in Postgres?
   3.42) What is Genetic Query Optimization?
   3.42) I am running Solaris and my dates display wrong. Why?
   
  4) Questions about extending PostgreSQL
  
   4.1) I wrote a user-defined function and when I run it in psql, it
   dumps core.
   4.2) I get messages of the type NOTICE:PortalHeapMemoryFree:
   0x402251d0
   4.3) I've written some nifty new types and functions for PostgreSQL.
   4.4) How do I write a C function to return a tuple?
   
  5) Bugs
  
   5.1) How do I make a bug report?
     _________________________________________________________________
                                      
Section 1: General Questions

  1.1) What is PostgreSQL?
  
   PostgreSQL is an enhancement of the POSTGRES database management
   system, a next-generation DBMS research prototype. While PostgreSQL
   retains the powerful data model and rich data types of POSTGRES, it
   replaces the PostQuel query language with an extended subset of SQL.
   PostgreSQL is free and the complete source is available.
   
   PostgreSQL development is being performed by a team of Internet
   developers who all subscribe to the PostgreSQL development mailing
   list. The current coordinator is Marc G. Fournier
   (scrappy@@postgreSQL.org). (See below on how to join). This team is now
   responsible for all current and future development of PostgreSQL.
   
   The authors of PostgreSQL 1.01 were Andrew Yu and Jolly Chen. Many
   others have contributed to the porting, testing, debugging and
   enhancement of the code. The original Postgres code, from which
   PostgreSQL is derived, was the effort of many graduate students,
   undergraduate students, and staff programmers working under the
   direction of Professor Michael Stonebraker at the University of
   California, Berkeley.
   
   The original name of the software at Berkeley was Postgres. When SQL
   functionality was added in 1995, its name was changed to Postgres95.
   The name was changed at the end of 1996 to PostgreSQL.
   
  1.2) What does PostgreSQL run on?
  
   The authors have compiled and tested PostgreSQL on the following
   platforms(some of these compiles require gcc 2.7.0):
     * aix - IBM on AIX 3.2.5
     * alpha - DEC Alpha AXP on OSF/1 2.0
     * BSD44_derived - OSs derived from 4.4-lite BSD (NetBSD, FreeBSD)
     * bsdi - BSD/OS 2.0, 2.01, 2.1, 3.0
     * dgux - DG/UX 5.4R3.10
     * hpux - HP PA-RISC on HP-UX 9.0
     * i386_solaris - i386 Solaris
     * irix5 - SGI MIPS on IRIX 5.3
     * linux - Intel x86 on Linux 1.2 and Linux ELF (For non-ELF Linux,
       see LINUX_ELF below).
     * sparc_solaris - SUN SPARC on Solaris 2.4
     * sunos4 - SUN SPARC on SunOS 4.1.3
     * svr4 - Intel x86 on Intel SVR4
     * ultrix4 - DEC MIPS on Ultrix 4.4
       
   The following platforms have known problems/bugs:
     * nextstep - Motorola MC68K or Intel x86 on NeXTSTEP 3.2
       
  1.3) Where can I get PostgreSQL?
  
   The primary anonymous ftp site for PostgreSQL is:
     * ftp://ftp.postgreSQL.org/pub
       
   A mirror site exists at:
     * ftp://postgres95.vnet.net/pub/postgres95
     * ftp://ftp.luga.or.at/pub/postgres95
     * ftp://cal011111.student.utwente.nl/pub/postgres95
     * ftp://ftp.uni-trier.de/pub/database/rdbms/postgres/postgres95
     * ftp://rocker.sch.bme.hu
       
  1.4) What's the copyright on PostgreSQL?
  
   PostgreSQL is subject to the following COPYRIGHT.
   
   PostgreSQL Data Base Management System
   
   Copyright (c) 1994-6 Regents of the University of California
   
   Permission to use, copy, modify, and distribute this software and its
   documentation for any purpose, without fee, and without a written
   agreement is hereby granted, provided that the above copyright notice
   and this paragraph and the following two paragraphs appear in all
   copies.
   
   IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
   FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
   INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND
   ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN
   ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   
   THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
   PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
   CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
   UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
   
  1.5) Support for PostgreSQL
  
   There is no official support for PostgreSQL from the original
   maintainers or from University of California, Berkeley. It is
   maintained through volunteer effort only.
   
   The main mailing list is: questions@@postgreSQL.org. It is available
   for discussion o f matters pertaining to PostgreSQL, including but not
   limited to bug reports and fixes. For info on how to subscribe, send a
   mail with the lines in the body (not the subject line)


        subscribe
        end

   to questions-request@@postgreSQL.org.
   
   There is also a digest list available. To subscribe to this list, send
   email to: questions-digest-request@@postgreSQL.org with a BODY of:


        subscribe
        end

   Digests are sent out to members of this list whenever the main list
   has received around 30k of messages.
   
   There is a bugs mailing list available. To subscribe to this list,
   send email to bugs-request@@postgreSQL.org with a BODY of:
   
   There is also a developers discussion mailing list available. To
   subscribe to this list, send email to hackers-request@@postgreSQL.org
   with a BODY of:
   

        subscribe
        end

   Additional information about PostgreSQL can be found via the
   PostgreSQL WWW home page at:
   
     http://postgreSQL.org
     
  1.6) Latest release of PostgreSQL
  
   The latest release of PostgreSQL is version 6.0, which was released on
   January 31, 1997. 6.1 is scheduled for release soon. For information
   about what is new in 6.1, see our TODO list on our WWW page.
   
   We expect a 7.0 release in several months that will remove time-travel
   and reduce by 50% the size of on-disk system columns maintained for
   each row in a table. This release will also require a dump and
   restore.
   
  1.7) Is there a commercial version of PostgreSQL?
  
   Illustra Information Technology (a wholly owned subsidiary of Informix
   Software, Inc.) sells an object-relational DBMS called Illustra that
   was originally based on postgres. Illustra has cosmetic similarities
   to PostgreSQL but has more features, is more robust, performs better,
   and offers real documentation and support. On the flip side, it costs
   money. For more information, contact sales@@illustra.com
   
  1.8) What documentation is available for PostgreSQL?
  
   A user manual, manual pages, and some small test examples are included
   in the distribution. The sql and built-in manual pages are
   particularly important.
   
   The www page contains pointers to an implementation guide and five
   papers written about postgres design concepts and features.
   
  1.9) What version of SQL does PostgreSQL use?
  
   PostgreSQL supports a subset of SQL-92. It has most of the important
   constructs but lacks some of the functionality. The most visible
   differences are:
     * no support for nested subqueries
     * no HAVING clause under a GROUP BY
       
   On the other hand, you get to create user-defined types, functions,
   inheritance etc. If you're willing to help with PostgreSQL coding,
   eventually we can also add the missing features listed above.
   
  1.10) Does PostgreSQL work with databases from earlier versions of postgres?
  
   PostgreSQL v1.09 is compatible with databases created with v1.01.
   Those upgrading from 1.0 should read the directions in the
   MIGRATION_1.0_TO_1.02 directory.
   
   Upgrading to 6.0 requires a dump and restore from previous releases.
   
  1.11) How many people use PostgreSQL?
  
   Since we don't have any licensing or registration scheme, it's
   impossible to tell. We do know hundreds copies of PostgreSQL v1.* have
   been downloaded, and that there many hundreds of subscribers to the
   mailing lists.
   
     _________________________________________________________________
                                      
Section 2: Installation Questions

  2.1) initdb doesn't run
  
     * check to see that you have the proper paths set
     * check that the 'postgres' user owns all the right files
     * ensure that there are files in $PGDATA/files, and that they are
       non-empty. If they aren't, then "gmake install" failed for some
       reason
       
  2.2) when I start up the postmaster, I get "FindBackend: could not find a
  backend to execute..." "postmaster: could not find backend to execute..."
  
   You probably do not have the right path set up. The 'postgres'
   executable needs to be in your path.
   
  2.3) The system seems to be confused about commas, decimal points, and date
  formats.
  
   Check your locale configuration. PostgreSQL uses the locale settings
   of the user that ran the postmaster process. Set those accordingly for
   your operating environment.
   
  2.4) How do I install PostgreSQL somewhere other than /usr/local/pgsql?
  
   You need to edit Makefile.global and change POSTGRESDIR accordingly,
   or create a Makefile.custom and define POSTGRESDIR there.
   
  2.5) When I run postmaster, I get a Bad System Call core dumped message.
  
   It could be a variety of problems, but first check to see that you
   have system V extensions installed on your kernel. PostgreSQL requires
   kernel support for shared memory.
   
  2.6) I get the error message "obj/fmgr.h: No such file or directory"
  
   This indicates that you did not generate the file fmgr.h properly.
   Something failed in the running of the
   src/backend/utils/Gen_fmgrtab.sh script. Check to see the paths used
   in that script is appropriate to your system.
   
  2.7) When I try to start the postmaster, I get IpcMemoryCreate errors.
  
   You either do not have shared memory configured properly in kernel or
   you need to enlarge the shared memory available in the kernel. The
   exact amount you need depends on your architecture and how many
   buffers you configure postmaster to run with. For most systems, with
   default buffer sizes, you need a minimum of ~760K.
   
  2.8) I have changed a source file, but a recompile does 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'.
   
     _________________________________________________________________
                                      
Section 3: PostgreSQL Features

  3.1) How do I specify a KEY or other constraints on a column?
  
   Column constraints are not supported in PostgreSQL. As a consequence,
   the system does not check for duplicates.
   
   Under 6.0, create a unique index on the column. Attempts to create
   duplicate of that column will report an error.
   
  3.2) Does PostgreSQL support nested subqueries?
  
   Subqueries are not implemented, but they can be simulated using sql
   functions.
   
  3.3) How do I define a unique indices?
  
   PostgreSQL 6.0 supports unique indices.
   
  3.4) I've having a lot of problems using rules.
  
   Currently, the rule system in PostgreSQL is mostly broken. It works
   enough to support the view mechanism, but that's about it. Use
   PostgreSQL rules at your own peril.
   
  3.5) I can't seem to write into the middle of large objects reliably.
  
   The Inversion large object system in PostgreSQL is also mostly broken.
   It works well enough for storing large wads of data and reading them
   back out, but the implementation has some underlying problems. Use
   PostgreSQL large objects at your own peril.
   
  3.6) Does PostgreSQL have a graphical user interface? A report generator? A
  embedded query language interface?
  
   No. No. No. Not in the official distribution at least. Some users have
   reported some success at using 'pgbrowse' and 'onyx' as frontends to
   PostgreSQL. Several contributions are working on tk based frontend
   tools. Ask on the mailing list.
   
  3.7) How can I write client applications to PostgreSQL?
  
   PostgreSQL supports a C-callable library interface called libpq as
   well as a Tcl-based library interface called libtcl.
   
   Others have contributed a perl interface and a WWW gateway to
   PostgreSQL. See the PostgreSQL home pages for more details.
   
  3.8) How do I prevent other hosts from accessing my PostgreSQL backend?
  
   Use host-based authentication by modifying the file $PGDATA/pg_hba
   accordingly.
   
  3.9) How do I set up a pg_group?
  
   Currently, there is no easy interface to set up user groups. You have
   to explicitly insert/update the pg_group table. For example:


        jolly=> insert into pg_group (groname, grosysid, grolist)
        jolly=>     values ('posthackers', '1234', '{5443, 8261}');
        INSERT 548224
        jolly=> grant insert on foo to group posthackers;
        CHANGE
        jolly=>

   The fields in pg_group are:
     * groname: the group name. This a char16 and should be purely
       alphanumeric. Do not include underscores or other punctuation.
     * grosysid: the group id. This is an int4. This should be unique for
       each group.
     * grolist: the list of pg_user id's that belong in the group. This
       is an int4[].
       
  3.10) What is the exact difference between binary cursors and normal cursors?
  
   Normal cursors return data back in ASCII format. Since data is stored
   natively in binary format, the system must do a conversion to produce
   the ASCII format. In addition, ASCII formats are often large in size
   than binary format. Once the attributes come back in ASCII, often the
   client application then has to convert it to a binary format to
   manipulate it anyway.
   
   Binary cursors give you back the data in the native binary
   representation. Thus, binary cursors will tend to be a little faster
   since there's less overhead of conversion.
   
   However, ASCII is architectural neutral whereas binary representation
   can differ between different machine architecture. Thus, if your
   client machine uses a different representation than you server
   machine, getting back attributes in binary format is probably not what
   you want. Also, if your main purpose is displaying the data in ASCII,
   then getting it back in ASCII will save you some effort on the client
   side.
   
  3.11) Why doesn't the != operator work?
  
   SQL specifies <> as the inequality operator, and that is what we have
   defined for the built-in types.
   
   In 6.0, != is equivalent to <>.
   
  3.12) What is a R-tree index and what is it used for?
  
   An r-tree index is used for indexing spatial data. A hash index can't
   handle range searches. A B-tree index only handles range searches in a
   single dimension. R-tree's can handle multi-dimensional data. For
   example, if a R-tree index can be built on an attribute of type
   'point', the system can more efficient answer queries like select all
   points within a bounding rectangle.
   
   The canonical paper that describes the original R-Tree design is:
   
   Guttman, A. "R-Trees: A Dynamic Index Structure for Spatial
   Searching." Proc of the 1984 ACM SIGMOD Int'l Conf on Mgmt of Data,
   45-57.
   
   You can also find this paper in Stonebraker's "Readings in Database
   Systems"
   
  3.13) What is the maximum size for a tuple?
  
   Tuples are limited to 8K bytes. Taking into account system attributes
   and other overhead, one should stay well shy of 8,000 bytes to be on
   the safe side. To use attributes larger than 8K, try using the large
   objects interface.
   
   Tuples do not cross 8k boundaries so a 5k tuple will require 8k of
   storage.
   
  3.14) I defined indices but my queries don't seem to make use of them. Why?
  
   PostgreSQL does not automatically maintain statistics. One has to make
   an explicit 'vacuum' call to update the statistics. After statistics
   are updated, the optimizer has a better shot at using indices. Note
   that the optimizer is limited and does not use indices in some
   circumstances (such as OR clauses).
   
   If the system still does not see the index, it is probably because you
   have created an index on a field with the improper *_ops type. For
   example, you have created a CHAR(4) field, but have specified a
   char_ops index type_class.
   
   See the create_index manual page for information on what type classes
   are available. It must match the field type.
   
   Postgres does not warn the user when the improper index is created.
   
   Indexes not used for ORDER BY operations.
   
  3.15) Are there ODBC drivers for PostgreSQL?
  
   There are two ODBC drivers available, PostODBC and OpenLink ODBC.
   
   For all people being interested in PostODBC, there are now two mailing
   lists devoted to the discussion of PostODBC. The mailing lists are:
     * postodbc-users@@listserv.direct. net
     * postodbc-developers@@listse rv.direct.net
       
   these lists are ordinary majordomo mailing lists. You can subscribe by
   sending a mail to:
     * majordomo@@listserv.direct.net
       
   OpenLink ODBC is currently in beta under Linux. You can get it from
   http://www.openlinksw.com/postgres.html. It works with our standard
   ODBC client software so you'll have Postgres ODBC available on every
   client platform we support (Win, Mac, Unix, VMS).
   
   We will probably be selling this product to people who need
   commercial-quality support, but a freeware version will always be
   available. Questions to postgres95@@openlink.co.uk.
   
  3.16) How do I use postgres for multi-dimensional indexing (> 2 dimensions)?
  
   Builtin R-Trees can handle polygons and boxes. In theory, R-trees can
   be extended to handle higher number of dimensions. In practice,
   extending R-trees require a bit of work and we don't currently have
   any documentation on how to do it.
   
  3.17) How do I do regular expression searches? case-insensitive regexp
  searching?
  
   PostgreSQL supports the SQL LIKE syntax as well as more general
   regular expression searching with the ~ operator. The !~ is the
   negated regexp operator. ~* and !~* are the case-insensitive regular
   expression operators.
   
  3.18) I can't access the database as the 'root' user.
  
   You should not create database users with user id 0(root). They will
   be unable to access the database. This is a security precaution
   because of the ability of any user to dynamically link object modules
   into the database engine.
   
  3.19) I experienced a server crash during a vacuum. How do I remove the lock
  file?
  
   If the server crashes during a vacuum command, chances are it will
   leave a lock file hanging around. Attempts to re-run the vacuum
   command result in


        WARN:can't create lock file -- another vacuum cleaner running?

   If you are sure that no vacuum is actually running, you can remove the
   file called "pg_vlock" in your database directory (which is
   $PGDATA/base/<dbName>)
   
  3.20) What is the difference between the various character types?
  
d679 365
a1043 340

   Remember, you need to use the internal name when creating indexes on
   these fields or when doing other internal operations.
   
   The last four types above are "varlena" types (i.e. the first four
   bytes is the length, followed by the data). CHAR(#) and VARCHAR(#)
   allocate the maximum number of bytes no matter how much data is stored
   in the field. TEXT and BYTEA are the only character types that have
   variable length on the disk.
   
  3.21) In a query, how do I detect if a field is NULL?
  
   PostgreSQL has two builtin keywords, "isnull" and "notnull" (note no
   spaces). Version 1.05 and later and 6.* understand IS NULL and IS NOT
   NULL.
   
  3.22) How do I see how the query optimizer is evaluating my query?
  
   Place the word 'EXPLAIN' at the beginning of the query, for example:

        EXPLAIN SELECT * FROM table1 WHERE age = 23;

  3.23) How do I create a serial field?
  
   Postgres does not allow the user to specifiy a user column as type
   SERIAL. Instead, you can use each row's oid field as a unique value.
   However, if you need to dump and reload the database, you need to be
   using postgres version 1.07 or later or 6.* with pgdump's -o option or
   COPY's WITH OIDS option to preserver the oids.
   
   Another valid way of doing this is to create a function:

        create table my_oids (f1 int4);
        insert into my_oids values (1);
        create function new_oid () returns int4 as
                'update my_oids set f1 = f1 + 1;  select f1 from my_oids; '
        language 'sql';

   then:

        create table my_stuff (my_key int4, value text);
        insert into my_stuff values (new_oid(), 'hello');

   However, keep in mind there is a race condition here where one server
   could do the update, then another one do an update, and they both
   could select the same new id. This statement should be performed
   within a transaction.
   
  3.24) How do I create a multi-column index?
  
   In 6.0, you can not directly create a multi-column index using create
   index. You need to define a function which acts on the multiple
   columns, then use create index with that function.
   
   In 6.1, this feature is available.
   
  3.25) What are the temp_XXX files in my database directory?
  
   They are temp_ files generated by the query executor. For example, if
   a sort needs to be done to satisfy an ORDER BY, some temp files are
   generated as a result of the sort.
   
   If you have no transactions or sorts running at the time, it is safe
   to delete the temp_ files.
   
  3.26) Why are my table files not getting any smaller after a delete?
  
   If you run vacuum in pre-6.0, unused rows will be marked for reuse,
   but the file blocks are not released.
   
   In 6.0, vacuum properly shrinks tables.
   
  3.27) Why can't I connect to my database from another machine?
  
   The default configuration allows only connections from tcp/ip host
   localhost. You need to add a host entry to the file pgsql/data/pg_hba.
   
  3.28) I get the error 'default index class unsupported' when creating an
  index. How do I do it?
  
   You probably used:

        create index idx1 on person using btree (name);

   PostgreSQL indexes are extensible, and therefore in pre-6.0, you must
   specify a class_type when creating an index. Read the manual page for
   create index (called create_index).
   
   Version 6.0, if you do not specify a class_type, it defaults to the
   proper type for the column.
   
  3.29) Why does creating an index crash the backend server?
  
   You have probably defined an incorrect *_ops type class for the field
   you are indexing.
   
  3.30) How do I specify a decimal constant as a float8, or a string as a text?
  Why am I getting poor precision?
  
   Use the :: operator. It is needed only when the default promotion
   rules fail. i.e.:


        insert into tab1 values (4.23::float8, '2343'::text)

   The default floating-point constant is a float4 in releases prior to
   1.05. Later releases default to float8.
   
  3.31) How do I find out what indexes or operations are defined in the
  database?
  
   Run the file pgsql/src/tutorial/syscat.source. It illustrates many of
   the 'select's needed to get information out of the database system
   tables.
   
  3.32) My database is corrupt. I can't do anything. What should I do?
  
   The 1.02 release has a README file and utility that describes a
   possible cause of the problem and a workaround.
   
   This bug is fixed in 1.02.1.
   
  3.33) Createdb, destroydb, createuser,destroyuser don't run. Why?
  
   Release 1.02 does not have this problem.
   
   The 1.01 release of PostgreSQL uses a variable called PAGER to filter
   the output of SELECT statements. Unfortunately, this PAGER is used
   even when the standard output is not a terminal.
   
  3.34) Why do statements require an extra character at the end? Why does
  'createuser' return 'unexpected last match in input()'? Why does pg_dump
  fail?
  
   You have compile postgres with flex version 2.5.3. There is bug in
   this version of flex. Use flex version 2.5.2 or flex 2.5.4 instead.
   There is a doc/README.flex file which will properly patch the flex
   2.5.3 source code.
   
  3.35) All my servers crash under concurrent table access. Why?
  
   This problem can be caused by a kernel that is not configured to
   support semaphores.
   
  3.36) What tools are available for hooking postgres to Web pages?
  
   For web integration, PHP/FI is an excellent interface. The URL for
   that is http://www.vex.net/php/
   
   PHP is great for simple stuff, but for more complex stuff, some still
   use the perl interface and CGI.pm.
   
   An example of using WWW with C to talk to Postgres is can be tried at:
     * http://postgreSQL.org/~mlc
       
   An WWW gatway based on WDB using perl can be downloaded from:
     * http://www.eol.ists.ca/~dunlop/wdb -p95
       
  3.37) What is the time-warp feature and how does it relate to vacuum?
  
   PostgreSQL handles data changes differently than most database
   systems. When a row is changed in a table, the original row is marked
   with the time it was changed, and a new row is created with the
   current data. By default, only current rows are used in a table. If
   you specify a date/time after the table name in a FROM clause, you can
   access the data that was current at that time, i.e.


        SELECT *
        FROM employees ['July 24, 1996 09:00:00']

   displays employee rows in the table at the specified time. You can
   specify intervals like [date,date], [date,], [,date], or [,]. This
   last option accesses all rows that ever existed.
   
   INSERTed rows get a timestamp too, so rows that were not in the table
   at the desired time will not appear.
   
   Vacuum removes rows that are no longer current. This time-warp feature
   is used by the engine for rollback and crash recovery. Expiration
   times can be set with purge.
   
   In 6.0, once a table is vacuumed, the creation time of a row may be
   incorrect, causing time-traval to fail.
   
   The time-travel feature will be removed in 7.0.
   
  3.38) How do I tune the database engine for better performance?
  
   There are two things that can be done. You can use Openlink's option
   to disable fsync() by starting the postmaster with a '-o -F' option.
   This will prevent fsync()'s from flushing to disk after every
   transaction.
   
   You can also use the postmaster -B option to increase the number of
   shared memory buffers shared among the backend processes. If you make
   this parameter too high, the process will not start or crash
   unexpectedly. Each buffer is 8K and the defualt is 64 buffers.
   
  3.39) What debugging features are available in PostgreSQL?
  
   PostgreSQL has several features that report status information that
   can be valuable for debugging purposes.
   
   First, by compiling with DEBUG defined, many assert()'s monitor the
   progress of the backend and halt the program when something unexpected
   occurs.
   
   Both postmaster and postgres have several debug options available.
   First, whenever you start the postmaster, make sure you send the
   standard output and error to a log file, like:


        cd /usr/local/pgsql
        ./bin/postmaster >server.log 2>&1 &

   This will put a server.log file in the top-level PostgreSQL directory.
   This file can contain useful information about problems or errors
   encountered by the server. Postmaster has a -d option that allows even
   more detailed information to be reported. The -d option takes a number
   1-3 that specifies the debug level. The query plans in a verbose debug
   file can be formatted using the 'indent' program. (You may need to
   remove the '====' lines in 1.* releases.) Be warned that a debug level
   greater than one generates large log files in 1.* releases.
   
   You can actuall run the postgres backend from the command line, and
   type your SQL statement directly. This is recommended ONLY for
   debugging purposes. Note that a newline terminates the query, not a
   semicolon. If you have compiled with debugging symbols, you can
   perhaps use a debugger to see what is happening. Because the backend
   was not started from the postmaster, it is not running in an identical
   environment and locking/backend interaction problems may not be
   duplicated. Some operating system can attach to a running backend
   directly to diagnose problems.
   
   The postgres program has a -s, -A, -t options that can be very usefull
   for debugging and performance measurements.
   
   The EXPLAIN command (see this FAQ) allows you to see how PostgreSQL is
   iterpreting your query.
   
  3.40) What is an oid? What is a tid?
  
   Oids are Postgres's answer to unique row ids or serial columns. Every
   row that is created in Postgres gets a unique oid. All oids generated
   by initdb are less than 16384 (from backend/access/transam.h). All
   post-initdb (user-created) oids are equal or greater that this. All
   these oids are unique not only within a table, or database, but unique
   within the entire postgres installation.
   
   Postgres uses oids in its internal system tables to link rows in
   separate tables. These oids can be used to identify specific user rows
   and used in joins. It is recommended you use column type oid to store
   oid values. See the sql(l) manual page to see the other internal
   columns.
   
   Tids are used to indentify specific physical rows with block and
   offset values. Tids change after rows are modified or reloaded. They
   are used by index entries to point to physical rows. They can not be
   accessed through sql.
   
  3.41) What is the meaning of some of the terms used in Postgres?
  
   Some of the source code and older documentation use terms that have
   more common usage. Here are some:
     * row, record, tuple
     * attribute, field, column
     * table, class
     * retrieve, select
     * replace, update
     * append, insert
     * oid, serial value
     * portal, cursor
     * range variable, table name, table alias
       
   Please let me know if you think of any more.
   
  3.42) What is Genetic Query Optimization?
  
   The GEQO module in PostgreSQL is intended to solve the query
   optimization problem of joining many tables by means of a Genetic
   Algorithm (GA). It allows the handling of large join queries through
   non-exhaustive search.
   
   For further information see README.GEQO <utesch@@aut.tu-freiberg.de>.
   
  3.43) I am running Solaris and my dates display wrong. Why?
  
   Gcc under Solaris has an bug when compiled with optimization level 2.
   Edit 'configure', and change -O2 to -O, and recompile. If 'configure'
   does not exist in your top level source directory, make the change to
   Makefile.global.
   
     _________________________________________________________________
                                      
Section 4: Extending PostgreSQL

  4.1) I wrote a user-defined function and when I run it in psql, it dumps
  core.
  
   The problem could be a number of things. Try testing your user-defined
   function in a stand alone test program first. Also, make sure you are
   not sending elog NOTICES when the front-end is expecting data, such as
   during a type_in() or type_out() functions
   
  4.2) I get messages of the type NOTICE:PortalHeapMemoryFree: 0x402251d0 not
  in alloc set!
  
   You are pfree'ing something that was not palloc'ed. When writing
   user-defined functions, do not include the file "libpq-fe.h". Doing so
   will cause your palloc to be a malloc instead of a free. Then, when
   the backend pfrees the storage, you get the notice message.
   
  4.3) I've written some nifty new types and functions for PostgreSQL.
  
   Please share them with other PostgreSQL users. Send your extensions to
   mailing list, and they will eventually end up in the contrib/
   subdirectory.
   
  4.4) How do I write a C function to return a tuple?
  
   This requires extreme wizardry, so extreme that the authors have not
   ever tried it, though in principle it can be done. The short answer is
   ... you can't. This capability is forthcoming in the future.
   
     _________________________________________________________________
                                      
Section 5: Bugs

  5.1) How do I make a bug report?
  
   Check the current FAQ at http://postgreSQL.org
   
   Also check out our ftp site ftp://ftp.postgreSQL.org/pub to see if
   there is a more recent PostgreSQL version.
   
   You can also fill out the "bug-template" file and send it to:
     * bugs@@postgreSQL.org
       
   This is the address of the developers mailing list.
@


1.7
log
@Move nextstep into problem/bug section.
@
text
@d2 1
a2 1
              FREQUENTLY ASKED QUESTIONS (FAQ) FOR POSTGRESQL 
d4 2
a5 4
   
   
   Last updated: Thu Mar 6 17:44:07 EST 1997
   Version: 6.0
a8 1
   
d20 1
a21 1
   
d23 1
a23 3
   
   
   
d26 1
a26 1
   1) General questions
d52 2
a53 3
   2.6) When I try to start the postmaster, I get IpcMemoryCreate errors.
   2.7) I have changed a source file, but a recompile does not see the
   change.
d112 1
d127 1
a127 1
   
a131 2
   
   
d141 2
a142 2
   (scrappy@@postgreSQL.org). (See below on how to join). This team is
   now responsible for all current and future development of PostgreSQL.
a157 2
   
   
d163 1
a163 1
     * bsdi - BSD/OS 2.0, 2.01, 2.1
a177 2
   
   
d180 1
a180 3
   
   
    The primary anonymous ftp site for PostgreSQL is:
a182 2
   
   
a191 2
   
   
d217 1
a217 1
  1.5) Support for PostgreSQL 
a218 2
   
   
a231 2
   
   
a251 1

a254 2
   
   
a259 2
   
   
a261 2
   
   
d263 2
a264 2
   January 31, 1997. For information about what is new in 6.0, see our
   TODO list on our WWW page.
a272 2
   
   
a281 2
   
   
a290 2
   
   
a296 2
   
   
a302 2
   
   
a310 2
   
   
a315 1
   
d317 2
a318 2
   
Section 2: Installation Questions 
a319 2
   
   
a321 2
   
   
a327 2
   
   
a330 2
   
   
a336 2
   
   
a342 2
   
   
a347 2
   
   
a353 2
   
   
a360 2
   
   
a368 2
   
   
a371 1
   
d373 2
a374 2
   
Section 3: PostgreSQL Features 
a375 2
   
   
a377 2
   
   
a385 2
   
   
a390 2
   
   
a394 2
   
   
a400 2
   
   
a408 2
   
   
a415 2
   
   
a423 2
   
   
a428 2
   
   
a439 2
   
   
a447 2
   
   
a449 2
   
   
a470 2
   
   
a477 2
   
   
a495 2
   
   
a505 2
   
   
a525 2
   
   
a532 2
   
   
a536 2
   
   
a547 2
   
   
a555 2
   
   
a562 2
   
   
a570 2
   
   
a577 2
   
   
d583 1
a583 1

a595 2
   
   
a606 2
   
   
a612 2
   
   
a614 1

a616 2
   
   
a618 2
   
   
a626 1

a632 2
   
   
a634 1

a637 2
   
   
d645 3
d649 1
a649 4
   
   You can not directly create a multi-column index using create index.
   You need to define a function which acts on the multiple columns, then
   use create index with that function.
a652 2
   
   
a661 2
   
   
a668 2
   
   
a671 1
   
a674 2
   
   
a676 1

a678 2
   
   
a687 2
   
   
a693 2
   
   
a699 2
   
   
a705 2
   
   
a711 2
   
   
a718 2
   
   
a728 2
   
   
a735 2
   
   
a740 2
   
   
a749 2
   
   
a754 2
   
   
a765 2
   
   
a783 2
   
   
a795 2
   
   
a810 2
   
   
a837 2
   
   
a857 2
   
   
a869 2
   
   
a873 2
   
   
d881 6
d889 2
a890 2
   
Section 4: Extending PostgreSQL 
a891 2
   
   
a894 2
   
   
a902 2
   
   
a909 2
   
   
a915 2
   
   
a919 1
   
d921 2
a922 2
   
Section 5: Bugs 
a923 2
   
   
a925 2
   
   
a933 2
   
   
@


1.6
log
@Updated FAQ
@
text
@d6 1
a6 1
   Last updated: Thu Feb 27 09:57:50 EST 1997
a178 1
     * next - Motorola MC68K or Intel x86 on NeXTSTEP 3.2
d183 3
@


1.5
log
@Changes to get ready for 6.0 final release.
@
text
@a0 33
Frequently Asked Questions (FAQ) for PostgreSQL

Last updated: Tue Jan 28 20:08:25 EST 1997
Version: 6.0

Current maintainer: Bruce Momjian (maillist@@candle.pha.pa.us)

The most recent version of this document can be viewed at the postgreSQL Web
site, http://postgreSQL.org.

Linux-specific questions are answered in
http://postgreSQL.org/docs/FAQ-Linux.phtml.

Irix-specific questions are answered in
http://postgreSQL.org/docs/FAQ-Irix.phtml.

Changes in this version (* = modified, + = new):

   * *1.1) What is PostgreSQL?
   * *1.5) Support for PostgreSQL
   * *1.6) Latest release of PostgreSQL
   * *1.10 Does PostgreSQL work with databases from earlier versions of
     postgres?
   * *3.1) How do I specify a KEY or other constraints on a column?
   * *3.3) How do I define a unique indices?
   * *3.11) Why doesn't the != operator work?
   * *3.26) Why are my table files not getting any smaller after a delete?
   * *3.28) I get the error 'default index class unsupported' when creating
     an index. How do I do it?
   * *3.37) What is the time-warp feature and how does it relate to vacuum?
   * *5.1) How do I make a bug report?

----------------------------------------------------------------------------
d2 27
d31 102
a132 87
1) General questions

1.1) What is PostgreSQL?
1.2) What does PostgreSQL run on?
1.3) Where can I get PostgreSQL?
1.4) What's the copyright on PostgreSQL?
1.5) Support for PostgreSQL
1.6) Latest release of PostgreSQL
1.7) Is there a commercial version of PostgreSQL?
1.9) What version of SQL does PostgreSQL use?
1.10) Does PostgreSQL work with databases from earlier versions of postgres?
1.11) How many people use PostgreSQL?

2) Installation questions

2.1) initdb doesn't run
2.2) when I start up the postmaster, I get "FindBackend: could not find a
backend to execute..." "postmaster: could not find backend to execute..."
2.3) The system seems to be confused about commas, decimal points, and date
formats.
2.4) How do I install PostgreSQL somewhere other than /usr/local/pgsql?
2.5) When I run postmaster, I get a Bad System Call core dumped message.
2.6) When I try to start the postmaster, I get IpcMemoryCreate errors.
2.7) I have changed a source file, but a recompile does not see the change.
2.8) I have changed a source file, but a recompile does not see the change?
3.1) How do I specify a KEY or other constraints on a column?
3.2) Does PostgreSQL support nested subqueries?
3.3) How do I define a unique indices?
3.4) I've having a lot of problems using rules.
3.5) I can't seem to write into the middle of large objects reliably.
3.6) Does PostgreSQL have a graphical user interface? A report generator? A
embedded query language interface?
3.7) How can I write client applications to PostgreSQL?
3.8) How do I prevent other hosts from accessing my PostgreSQL
3.9) How do I set up a pg_group?
3.10) What is the exact difference between binary cursors and normal
cursors?
3.11) Why doesn't the != operator work?
3.12) What is a R-tree index and what is it used for?
3.13) What is the maximum size for a tuple?
3.14) I defined indices but my queries don't seem to make use of them. Why?
3.15) Are there ODBC drivers for PostgreSQL?
3.16) How do I use postgres for multi-dimensional indexing (> 2 dimensions)?
3.17) How do I do regular expression searches? case-insensitive regexp
searching?
3.18) I can't access the database as the 'root' user.
3.19) I experienced a server crash during a vacuum. How do I remove the lock
file?
3.20) What is the difference between the various character types?
3.21) In a query, how do I detect if a field is NULL?
3.22) How do I see how the query optimizer is evaluating my query?
3.23) How do I create a serial field?
3.24) How do I create a multi-column index?
3.25) What are the temp_XXX files in my database directory?
3.26) Why are my table files not getting any smaller after a delete?
3.27) Why can't I connect to my database from another machine?
3.28) I get the error 'default index class unsupported' when creating an
index. How do I do it?
3.29) Why does creating an index crash the backend server?
3.30) How do I specify a decimal constant as a float8, or a string as a
text? Why am I getting poor precision?
3.31) How do I find out what indexes or operations are defined in the
database?
3.32) My database is corrupt. I can't do anything. What should I do?
3.33) Createdb, destroydb, createuser, destroyuser don't run. Why?
3.34) Why does 'createuser' return 'unexpected last match in input()'?
3.35) All my servers crash under concurrent table access. Why?
3.36) What tools are available for hooking postgres to Web pages?
3.37) What is the time-warp feature and how does it relate to vacuum?
3.38) How do I tune the database engine for better performance?
3.39) What debugging features are available in PostgreSQL?
3.40) What is an oid? What is a tid?
3.41) What is the meaning of some of the terms used in Postgres?

4) Questions about extending PostgreSQL

4.1) I wrote a user-defined function and when I run it in psql, it dumps
core.
4.2) I get messages of the type NOTICE:PortalHeapMemoryFree: 0x402251d0
4.3) I've written some nifty new types and functions for PostgreSQL.
4.4) How do I write a C function to return a tuple?

5) Bugs

5.1) How do I make a bug report?
----------------------------------------------------------------------------

d135 109
a243 1
1.1) What is PostgreSQL?
a244 93
PostgreSQL is an enhancement of the POSTGRES database management system, a
next-generation DBMS research prototype. While PostgreSQL retains the
powerful data model and rich data types of POSTGRES, it replaces the
PostQuel query language with an extended subset of SQL. PostgreSQL is free
and the complete source is available.

PostgreSQL development is being performed by a team of Internet developers
who all subscribe to the PostgreSQL development mailing list. The current
coordinator is Marc G. Fournier (scrappy@@postgreSQL.org). (See below on how
to join). This team is now responsible for all current and future
development of PostgreSQL.

The authors of PostgreSQL 1.01 were Andrew Yu and Jolly Chen. Many others
have contributed to the porting, testing, debugging and enhancement of the
code. The original Postgres code, from which PostgreSQL is derived, was the
effort of many graduate students, undergraduate students, and staff
programmers working under the direction of Professor Michael Stonebraker at
the University of California, Berkeley.

The original name of the software at Berkeley was Postgres. When SQL
functionality was added in 1995, its name was changed to Postgres95. The
name was changed at the end of 1996 to PostgreSQL.

1.2) What does PostgreSQL run on?

The authors have compiled and tested PostgreSQL on the following
platforms(some of these compiles require gcc 2.7.0):

   * aix - IBM on AIX 3.2.5
   * alpha - DEC Alpha AXP on OSF/1 2.0
   * BSD44_derived - OSs derived from 4.4-lite BSD (NetBSD, FreeBSD)
   * bsdi - BSD/OS 2.0, 2.01, 2.1
   * dgux - DG/UX 5.4R3.10
   * hpux - HP PA-RISC on HP-UX 9.0
   * i386_solaris - i386 Solaris
   * irix5 - SGI MIPS on IRIX 5.3
   * linux - Intel x86 on Linux 1.2 and Linux ELF (For non-ELF Linux, see
     LINUX_ELF below).
   * next - Motorola MC68K or Intel x86 on NeXTSTEP 3.2
   * sparc_solaris - SUN SPARC on Solaris 2.4
   * sunos4 - SUN SPARC on SunOS 4.1.3
   * svr4 - Intel x86 on Intel SVR4
   * ultrix4 - DEC MIPS on Ultrix 4.4

1.3) Where can I get PostgreSQL?

The primary anonymous ftp site for PostgreSQL is:

   * ftp://ftp.postgreSQL.org/pub

A mirror site exists at:

   * ftp://postgres95.vnet.net/pub/postgres95
   * ftp://ftp.luga.or.at/pub/postgres95
   * ftp://cal011111.student.utwente.nl/pub/postgres95
   * ftp://ftp.uni-trier.de/pub/database/rdbms/postgres/postgres95
   * ftp://rocker.sch.bme.hu

1.4) What's the copyright on PostgreSQL?

PostgreSQL is subject to the following COPYRIGHT.

PostgreSQL Data Base Management System

Copyright (c) 1994-6 Regents of the University of California

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement
is hereby granted, provided that the above copyright notice and this
paragraph and the following two paragraphs appear in all copies.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
"AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

1.5) Support for PostgreSQL

There is no official support for PostgreSQL from the original maintainers or
from University of California, Berkeley. It is maintained through volunteer
effort only.

The main mailing list is: questions@@postgreSQL.org. It is available for
discussion o f matters pertaining to PostgreSQL, including but not limited
to bug reports and fixes. For info on how to subscribe, send a mail with the
lines in the body (not the subject line)
d249 6
a254 1
to questions-request@@postgreSQL.org.
a255 2
There is also a digest list available. To subscribe to this list, send email
to: questions-digest-request@@postgreSQL.org with a BODY of:
d260 10
a269 5
Digests are sent out to members of this list whenever the main list has
received around 30k of messages.

There is a bugs mailing list available. To subscribe to this list, send
email to bugs-request@@postgreSQL.org with a BODY of:
a270 2
There is also a developers discussion mailing list available. To subscribe
to this list, send email to hackers-request@@postgreSQL.org with a BODY of:
d275 5
a279 3
Additional information about PostgreSQL can be found via the PostgreSQL WWW
home page at:

d281 230
a511 170
1.6) Latest release of PostgreSQL

The latest release of PostgreSQL is version 1.09. The next release will be
numbered 6.0 for historical reasons. This release is in beta and is
available at our ftp site. We expect the beta period to be complete during
the week of January 31, 1997. For information about what is new in 6.0, see
our TODO list on our WWW page.

We expect a 7.0 release in several months that will remove time-travel and
reduce by 50% the size of on-disk system columns maintained for each row in
a table. This release will also require a dump and restore.

1.7) Is there a commercial version of PostgreSQL?

Illustra Information Technology (a wholly owned subsidiary of Informix
Software, Inc.) sells an object-relational DBMS called Illustra that was
originally based on postgres. Illustra has cosmetic similarities to
PostgreSQL but has more features, is more robust, performs better, and
offers real documentation and support. On the flip side, it costs money. For
more information, contact sales@@illustra.com

1.8) What documentation is available for PostgreSQL?

A user manual, manual pages, and some small test examples are included in
the distribution. The sql and built-in manual pages are particularly
important.

The www page contains pointers to an implementation guide and five papers
written about postgres design concepts and features.

1.9) What version of SQL does PostgreSQL use?

PostgreSQL supports a subset of SQL-92. It has most of the important
constructs but lacks some of the functionality. The most visible differences
are:

   * no support for nested subqueries
   * no HAVING clause under a GROUP BY

On the other hand, you get to create user-defined types, functions,
inheritance etc. If you're willing to help with PostgreSQL coding,
eventually we can also add the missing features listed above.

1.10) Does PostgreSQL work with databases from earlier versions of postgres?

PostgreSQL v1.09 is compatible with databases created with v1.01. Those
upgrading from 1.0 should read the directions in the MIGRATION_1.0_TO_1.02
directory.

Upgrading to 6.0 requires a dump and restore.

1.11) How many people use PostgreSQL?

Since we don't have any licensing or registration scheme, it's impossible to
tell. We do know hundreds copies of PostgreSQL v1.* have been downloaded,
and that there many hundreds of subscribers to the mailing lists.

----------------------------------------------------------------------------

Section 2: Installation Questions

2.1) initdb doesn't run

   * check to see that you have the proper paths set
   * check that the 'postgres' user owns all the right files
   * ensure that there are files in $PGDATA/files, and that they are
     non-empty. If they aren't, then "gmake install" failed for some reason

2.2) when I start up the postmaster, I get "FindBackend: could not find a
backend to execute..." "postmaster: could not find backend to execute..."

You probably do not have the right path set up. The 'postgres' executable
needs to be in your path.

2.3) The system seems to be confused about commas, decimal points, and date
formats.

Check your locale configuration. PostgreSQL uses the locale settings of the
user that ran the postmaster process. Set those accordingly for your
operating environment.

2.4) How do I install PostgreSQL somewhere other than /usr/local/pgsql?

You need to edit Makefile.global and change POSTGRESDIR accordingly, or
create a Makefile.custom and define POSTGRESDIR there.

2.5) When I run postmaster, I get a Bad System Call core dumped message.

It could be a variety of problems, but first check to see that you have
system V extensions installed on your kernel. PostgreSQL requires kernel
support for shared memory.

2.6) I get the error message "obj/fmgr.h: No such file or directory"

This indicates that you did not generate the file fmgr.h properly. Something
failed in the running of the src/backend/utils/Gen_fmgrtab.sh script. Check
to see the paths used in that script is appropriate to your system.

2.7) When I try to start the postmaster, I get IpcMemoryCreate errors.

You either do not have shared memory configured properly in kernel or you
need to enlarge the shared memory available in the kernel. The exact amount
you need depends on your architecture and how many buffers you configure
postmaster to run with. For most systems, with default buffer sizes, you
need a minimum of ~760K.

2.8) I have changed a source file, but a recompile does 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'.

----------------------------------------------------------------------------

Section 3: PostgreSQL Features

3.1) How do I specify a KEY or other constraints on a column?

Column constraints are not supported in PostgreSQL. As a consequence, the
system does not check for duplicates.

Under 6.0, create a unique index on the column. Attempts to create duplicate
of that column will report an error.

3.2) Does PostgreSQL support nested subqueries?

Subqueries are not implemented, but they can be simulated using sql
functions.

3.3) How do I define a unique indices?

PostgreSQL 6.0 supports unique indices.

3.4) I've having a lot of problems using rules.

Currently, the rule system in PostgreSQL is mostly broken. It works enough
to support the view mechanism, but that's about it. Use PostgreSQL rules at
your own peril.

3.5) I can't seem to write into the middle of large objects reliably.

The Inversion large object system in PostgreSQL is also mostly broken. It
works well enough for storing large wads of data and reading them back out,
but the implementation has some underlying problems. Use PostgreSQL large
objects at your own peril.

3.6) Does PostgreSQL have a graphical user interface? A report generator? A
embedded query language interface?

No. No. No. Not in the official distribution at least. Some users have
reported some success at using 'pgbrowse' and 'onyx' as frontends to
PostgreSQL. Several contributions are working on tk based frontend tools.
Ask on the mailing list.

3.7) How can I write client applications to PostgreSQL?

PostgreSQL supports a C-callable library interface called libpq as well as a
Tcl-based library interface called libtcl.

Others have contributed a perl interface and a WWW gateway to PostgreSQL.
See the PostgreSQL home pages for more details.

3.8) How do I prevent other hosts from accessing my PostgreSQL backend?

Use host-based authentication by modifying the file $PGDATA/pg_hba
accordingly.

3.9) How do I set up a pg_group?

Currently, there is no easy interface to set up user groups. You have to
explicitly insert/update the pg_group table. For example:
d520 162
a681 90
The fields in pg_group are:

   * groname: the group name. This a char16 and should be purely
     alphanumeric. Do not include underscores or other punctuation.
   * grosysid: the group id. This is an int4. This should be unique for each
     group.
   * grolist: the list of pg_user id's that belong in the group. This is an
     int4[].

3.10) What is the exact difference between binary cursors and normal
cursors?

Normal cursors return data back in ASCII format. Since data is stored
natively in binary format, the system must do a conversion to produce the
ASCII format. In addition, ASCII formats are often large in size than binary
format. Once the attributes come back in ASCII, often the client application
then has to convert it to a binary format to manipulate it anyway.

Binary cursors give you back the data in the native binary representation.
Thus, binary cursors will tend to be a little faster since there's less
overhead of conversion.

However, ASCII is architectural neutral whereas binary representation can
differ between different machine architecture. Thus, if your client machine
uses a different representation than you server machine, getting back
attributes in binary format is probably not what you want. Also, if your
main purpose is displaying the data in ASCII, then getting it back in ASCII
will save you some effort on the client side.

3.11) Why doesn't the != operator work?

SQL specifies <> as the inequality operator, and that is what we have
defined for the built-in types.

In 6.0, != is equivalent to <>.

3.12) What is a R-tree index and what is it used for?

An r-tree index is used for indexing spatial data. A hash index can't handle
range searches. A B-tree index only handles range searches in a single
dimension. R-tree's can handle multi-dimensional data. For example, if a
R-tree index can be built on an attribute of type 'point', the system can
more efficient answer queries like select all points within a bounding
rectangle.

The canonical paper that describes the original R-Tree design is:

Guttman, A. "R-Trees: A Dynamic Index Structure for Spatial Searching." Proc
of the 1984 ACM SIGMOD Int'l Conf on Mgmt of Data, 45-57.

You can also find this paper in Stonebraker's "Readings in Database Systems"

3.13) What is the maximum size for a tuple?

Tuples are limited to 8K bytes. Taking into account system attributes and
other overhead, one should stay well shy of 8,000 bytes to be on the safe
side. To use attributes larger than 8K, try using the large objects
interface.

Tuples do not cross 8k boundaries so a 5k tuple will require 8k of storage.

3.14) I defined indices but my queries don't seem to make use of them. Why?

PostgreSQL does not automatically maintain statistics. One has to make an
explicit 'vacuum' call to update the statistics. After statistics are
updated, the optimizer has a better shot at using indices. Note that the
optimizer is limited and does not use indices in some circumstances (such as
OR clauses).

If the system still does not see the index, it is probably because you have
created an index on a field with the improper *_ops type. For example, you
have created a CHAR(4) field, but have specified a char_ops index
type_class.

See the create_index manual page for information on what type classes are
available. It must match the field type.

Postgres does not warn the user when the improper index is created.

Indexes not used for ORDER BY operations.

3.15) Are there ODBC drivers for PostgreSQL?

There are two ODBC drivers available, PostODBC and OpenLink ODBC.

For all people being interested in PostODBC, there are now two mailing lists
devoted to the discussion of PostODBC. The mailing lists are:

   * postodbc-users@@listserv.direct. net
   * postodbc-developers@@listse rv.direct.net
a682 41
these lists are ordinary majordomo mailing lists. You can subscribe by
sending a mail to:

   * majordomo@@listserv.direct.net

OpenLink ODBC is currently in beta under Linux. You can get it from
http://www.openlinksw.com/postgres.html. It works with our standard ODBC
client software so you'll have Postgres ODBC available on every client
platform we support (Win, Mac, Unix, VMS).

We will probably be selling this product to people who need
commercial-quality support, but a freeware version will always be available.
Questions to postgres95@@openlink.co.uk.

3.16) How do I use postgres for multi-dimensional indexing (> 2
dimensions">)?

Builtin R-Trees can handle polygons and boxes. In theory, R-trees can be
extended to handle higher number of dimensions. In practice, extending
R-trees require a bit of work and we don't currently have any documentation
on how to do it.

3.17) How do I do regular expression searches? case-insensitive regexp
searching?

PostgreSQL supports the SQL LIKE syntax as well as more general regular
expression searching with the ~ operator. The !~ is the negated regexp
operator. ~* and !~* are the case-insensitive regular expression operators.

3.18) I can't access the database as the 'root' user.

You should not create database users with user id 0(root). They will be
unable to access the database. This is a security precaution because of the
ability of any user to dynamically link object modules into the database
engine.

3.19) I experienced a server crash during a vacuum. How do I remove the lock
file?

If the server crashes during a vacuum command, chances are it will leave a
lock file hanging around. Attempts to re-run the vacuum command result in
d686 7
a692 4
If you are sure that no vacuum is actually running, you can remove the file
called "pg_vlock" in your database directory (which is $PGDATA/base/)

3.20) What is the difference between the various character types?
d706 24
a729 2
Remember, you need to use the internal name when creating indexes on these
fields or when doing other internal operations.
a730 14
The last four types above are "varlena" types (i.e. the first four bytes is
the length, followed by the data). CHAR(#) and VARCHAR(#) allocate the
maximum number of bytes no matter how much data is stored in the field. TEXT
and BYTEA are the only character types that have variable length on the
disk.

3.21) In a query, how do I detect if a field is NULL?

PostgreSQL has two builtin keywords, "isnull" and "notnull" (note no
spaces). Version 1.05 and later and 6.* understand IS NULL and IS NOT NULL.

3.22) How do I see how the query optimizer is evaluating my query?

Place the word 'EXPLAIN' at the beginning of the query, for example:
d734 13
a746 7
3.23) How do I create a serial field?

Postgres does not allow the user to specifiy a user column as type SERIAL.
Instead, you can use each row's oid field as a unique value. However, if you
need to dump and reload the database, you need to be using postgres version
1.07 or later or 6.* with pgdump's -o option or COPY's WITH OIDS option to
preserver the oids.
a747 1
Another valid way of doing this is to create a function:
d755 4
a758 1
then:
d763 49
a811 18
However, keep in mind there is a race condition here where one server could
do the update, then another one do an update, and they both could select the
same new id. This statement should be performed within a transaction.

3.24) How do I create a multi-column index?

You can not directly create a multi-column index using create index. You
need to define a function which acts on the multiple columns, then use
create index with that function.

3.25) What are the temp_XXX files in my database directory?

They are temp_ files generated by the query executor. For example, if a sort
needs to be done to satisfy an ORDER BY, some temp files are generated as a
result of the sort.

If you have no transactions or sorts running at the time, it is safe to
delete the temp_ files.
a812 16
3.26) Why are my table files not getting any smaller after a delete?

If you run vacuum in pre-6.0, unused rows will be marked for reuse, but the
file blocks are not released.

In 6.0, vacuum properly shrinks tables.

3.27) Why can't I connect to my database from another machine?

The default configuration allows only connections from tcp/ip host
localhost. You need to add a host entry to the file pgsql/data/pg_hba.

3.28) I get the error 'default index class unsupported' when creating an
index. How do I do it?

You probably used:
d816 23
a838 3
PostgreSQL indexes are extensible, and therefore in pre-6.0, you must
specify a class_type when creating an index. Read the manual page for create
index (called create_index).
a839 13
Version 6.0, if you do not specify a class_type, it defaults to the proper
type for the column.

3.29) Why does creating an index crash the backend server?

You have probably defined an incorrect *_ops type class for the field you
are indexing.

3.30) How do I specify a decimal constant as a float8, or a string as a
text? Why am I getting poor precision?

Use the :: operator. It is needed only when the default promotion rules
fail. i.e.:
d843 79
a921 36
The default floating-point constant is a float4 in releases prior to 1.05.
Later releases default to float8.

3.31) How do I find out what indexes or operations are defined in the
database?

Run the file pgsql/src/tutorial/syscat.source. It illustrates many of the
'select's needed to get information out of the database system tables.

3.32) My database is corrupt. I can't do anything. What should I do?

The 1.02 release has a README file and utility that describes a possible
cause of the problem and a workaround.

This bug is fixed in 1.02.1.

3.33) Createdb, destroydb, createuser,destroyuser don't run. Why?

Release 1.02 does not have this problem.

The 1.01 release of PostgreSQL uses a variable called PAGER to filter the
output of SELECT statements. Unfortunately, this PAGER is used even when the
standard output is not a terminal.

3.34) Why does 'createuser' return 'unexpected last match in input(">)'?

You have compile postgres with flex version 2.5.3. There is bug in this
version of flex. Use flex version 2.5.2 or flex 2.5.4 instead. There is a
doc/README.flex file which will properly patch the flex 2.5.3 source code.

3.35) All my servers crash under concurrent table access. Why?

This problem can be caused by a kernel that is not configured to support
semaphores.

3.36) What tools are available for hooking postgres to Web pages?
a922 22
For web integration, PHP/FI is an excellent interface. The URL for that is
http://www.vex.net/php/

PHP is great for simple stuff, but for more complex stuff, some still use
the perl interface and CGI.pm.

An example of using WWW with C to talk to Postgres is can be tried at:

   * http://postgreSQL.org/~mlc

An WWW gatway based on WDB using perl can be downloaded from:

   * http://www.eol.ists.ca/~dunlop/wdb -p95

3.37) What is the time-warp feature and how does it relate to vacuum?

PostgreSQL handles data changes differently than most database systems. When
a row is changed in a table, the original row is marked with the time it was
changed, and a new row is created with the current data. By default, only
current rows are used in a table. If you specify a date/time after the table
name in a FROM clause, you can access the data that was current at that
time, i.e.
d927 46
a972 17
displays employee rows in the table at the specified time. You can specify
intervals like [date,date], [date,], [,date], or [,]. This last option
accesses all rows that ever existed.

INSERTed rows get a timestamp too, so rows that were not in the table at the
desired time will not appear.

Vacuum removes rows that are no longer current. This time-warp feature is
used by the engine for rollback and crash recovery. Expiration times can be
set with purge.

In 6.0, once a table is vacuumed, the creation time of a row may be
incorrect, causing time-traval to fail.

The time-travel feature will be removed in 7.0.

3.38) How do I tune the database engine for better performance?
a973 20
There are two things that can be done. You can use Openlink's option to
disable fsync() by starting the postmaster with a '-o -F' option. This will
prevent fsync()'s from flushing to disk after every transaction.

You can also use the postmaster -B option to increase the number of shared
memory buffers shared among the backend processes. If you make this
parameter too high, the process will not start or crash unexpectedly. Each
buffer is 8K and the defualt is 64 buffers.

3.39) What debugging features are available in PostgreSQL?

PostgreSQL has several features that report status information that can be
valuable for debugging purposes.

First, by compiling with DEBUG defined, many assert()'s monitor the progress
of the backend and halt the program when something unexpected occurs.

Both postmaster and postgres have several debug options available. First,
whenever you start the postmaster, make sure you send the standard output
and error to a log file, like:
d978 145
a1122 107
This will put a server.log file in the top-level PostgreSQL directory. This
file can contain useful information about problems or errors encountered by
the server. Postmaster has a -d option that allows even more detailed
information to be reported. The -d option takes a number 1-3 that specifies
the debug level. The query plans in a verbose debug file can be formatted
using the 'indent' program. (You may need to remove the '====' lines in 1.*
releases.) Be warned that a debug level greater than one generates large log
files in 1.* releases.

You can actuall run the postgres backend from the command line, and type
your SQL statement directly. This is recommended ONLY for debugging
purposes. Note that a newline terminates the query, not a semicolon. If you
have compiled with debugging symbols, you can perhaps use a debugger to see
what is happening. Because the backend was not started from the postmaster,
it is not running in an identical environment and locking/backend
interaction problems may not be duplicated. Some operating system can attach
to a running backend directly to diagnose problems.

The postgres program has a -s, -A, -t options that can be very usefull for
debugging and performance measurements.

The EXPLAIN command (see this FAQ) allows you to see how PostgreSQL is
iterpreting your query.

3.40) What is an oid? What is a tid?

Oids are Postgres's answer to unique row ids or serial columns. Every row
that is created in Postgres gets a unique oid. All oids generated by initdb
are less than 16384 (from backend/access/transam.h). All post-initdb
(user-created) oids are equal or greater that this. All these oids are
unique not only within a table, or database, but unique within the entire
postgres installation.

Postgres uses oids in its internal system tables to link rows in separate
tables. These oids can be used to identify specific user rows and used in
joins. It is recommended you use column type oid to store oid values. See
the sql(l) manual page to see the other internal columns.

Tids are used to indentify specific physical rows with block and offset
values. Tids change after rows are modified or reloaded. They are used by
index entries to point to physical rows. They can not be accessed through
sql.

3.41) What is the meaning of some of the terms used in Postgres?

Some of the source code and older documentation use terms that have more
common usage. Here are some:

   * row, record, tuple
   * attribute, field, column
   * table, class
   * retrieve, select
   * replace, update
   * append, insert
   * oid, serial value
   * portal, cursor
   * range variable, table name, table alias

Please let me know if you think of any more.

----------------------------------------------------------------------------

Section 4: Extending PostgreSQL

4.1) I wrote a user-defined function and when I run it in psql, it dumps
core.

The problem could be a number of things. Try testing your user-defined
function in a stand alone test program first. Also, make sure you are not
sending elog NOTICES when the front-end is expecting data, such as during a
type_in() or type_out() functions

4.2) I get messages of the type NOTICE:PortalHeapMemoryFree: 0x402251d0 not
in alloc set!

You are pfree'ing something that was not palloc'ed. When writing
user-defined functions, do not include the file "libpq-fe.h". Doing so will
cause your palloc to be a malloc instead of a free. Then, when the backend
pfrees the storage, you get the notice message.

4.3) I've written some nifty new types and functions for PostgreSQL.

Please share them with other PostgreSQL users. Send your extensions to
mailing list, and they will eventually end up in the contrib/ subdirectory.

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

This requires extreme wizardry, so extreme that the authors have not ever
tried it, though in principle it can be done. The short answer is ... you
can't. This capability is forthcoming in the future.

----------------------------------------------------------------------------

Section 5: Bugs

5.1) How do I make a bug report?

Check the current FAQ at http://postgreSQL.org

Also check out our ftp site ftp://ftp.postgreSQL.org/pub to see if there is
a more recent PostgreSQL version.

You can also fill out the "bug-template" file and send it to:

   * bugs@@postgreSQL.org

This is the address of the developers mailing list.
@


1.4
log
@Documentatoin update
@
text
@d1 33
a34 50
   html>
   
              FREQUENTLY ASKED QUESTIONS (FAQ) FOR POSTGRESQL 
                                       
   
   
   Last updated: Thu Dec 12 21:30:37 EST 1996
   Version: 6.0
   
   Current maintainer: Bruce Momjian (maillist@@candle.pha.pa.us)
   
   
   The most recent version of this document can be viewed at the
   postgreSQL Web site, http://postgreSQL.org.
   
   Linux-specific questions are answered in
   http://postgreSQL.org/docs/FAQ-Linux.phtml.
   
   Irix-specific questions are answered in
   http://postgreSQL.org/docs/FAQ-Irix.phtml.
   
   Changes in this version (* = modified, + = new):
   
   *1.1) What is PostgreSQL?
   
   *1.5) Support for PostgreSQL
   
   *1.6) Latest release of PostgreSQL
   
   *1.10 Does PostgreSQL work with databases from earlier versions of
   postgres?
   
   *3.1) How do I specify a KEY or other constraints on a column?
   
   *3.3) How do I define a unique indices?
   
   *3.11) Why doesn't the != operator work?
   
   *3.26) Why are my table files not getting any smaller after a delete?
   
   *3.28) I get the error 'default index class unsupported' when creating
   an index. How do I do it?
   
   *3.37) What is the time-warp feature and how does it relate to vacuum?
   
   *5.1) How do I make a bug report?
     _________________________________________________________________
   
   
   
d37 87
a123 99
   1) General questions
  
   1.1) What is PostgreSQL?
   1.2) What does PostgreSQL run on?
   1.3) Where can I get PostgreSQL?
   1.4) What's the copyright on PostgreSQL?
   1.5) Support for PostgreSQL
   1.6) Latest release of PostgreSQL
   1.7) Is there a commercial version of PostgreSQL?
   1.9) What version of SQL does PostgreSQL use?
   1.10) Does PostgreSQL work with databases from earlier versions of
   postgres?
   1.11) How many people use PostgreSQL?
   
  2) Installation questions
  
   2.1) initdb doesn't run
   2.2) when I start up the postmaster, I get "FindBackend: could not
   find a backend to execute..." "postmaster: could not find backend to
   execute..."
   2.3) The system seems to be confused about commas, decimal points, and
   date formats.
   2.4) How do I install PostgreSQL somewhere other than
   /usr/local/pgsql?
   2.5) The backend compiled successfully, but compiling libpq resulted
   in a complaint: "libpq/pqcomm.h" not found when compiling fe-auth.c.
   2.6) When I run postmaster, I get a Bad System Call core dumped
   message.
   2.7) When I try to start the postmaster, I get IpcMemoryCreate errors.
   2.8) I have changed a source file, but a recompile does not see the
   change.
   
  3) PostgreSQL Features questions
  
   3.1) How do I specify a KEY or other constraints on a column?
   3.2) Does PostgreSQL support nested subqueries?
   3.3) How do I define a unique indices?
   3.4) I've having a lot of problems using rules.
   3.5) I can't seem to write into the middle of large objects reliably.
   3.6) Does PostgreSQL have a graphical user interface? A report
   generator? A embedded query language interface?
   3.7) How can I write client applications to PostgreSQL?
   3.8) How do I prevent other hosts from accessing my PostgreSQL
   3.9) How do I set up a pg_group?
   3.10) What is the exact difference between binary cursors and normal
   cursors?
   3.11) Why doesn't the != operator work?
   3.12) What is a R-tree index and what is it used for?
   3.13) What is the maximum size for a tuple?
   3.14) I defined indices but my queries don't seem to make use of them.
   Why?
   3.15) Are there ODBC drivers for PostgreSQL?
   3.16) How do I use postgres for multi-dimensional indexing (> 2
   dimensions)?
   3.17) How do I do regular expression searches? case-insensitive regexp
   searching?
   3.18) I can't access the database as the 'root' user.
   3.19) I experienced a server crash during a vacuum. How do I remove
   the lock file?
   3.20) What is the difference between the various character types?
   3.21) In a query, how do I detect if a field is NULL?
   3.22) How do I see how the query optimizer is evaluating my query?
   3.23) How do I create a serial field?
   3.24) How do I create a multi-column index?
   3.25) What are the temp_XXX files in my database directory?
   3.26) Why are my table files not getting any smaller after a delete?
   3.27) Why can't I connect to my database from another machine?
   3.28) I get the error 'default index class unsupported' when creating
   an index. How do I do it?
   3.29) Why does creating an index crash the backend server?
   3.30) How do I specify a decimal constant as a float8, or a string as
   a text? Why am I getting poor precision?
   3.31) How do I find out what indexes or operations are defined in the
   database?
   3.32) My database is corrupt. I can't do anything. What should I do?
   3.33) Createdb, destroydb, createuser, destroyuser don't run. Why?
   3.34) Why does 'createuser' return 'unexpected last match in input()'?
   3.35) All my servers crash under concurrent table access. Why?
   3.36) What tools are available for hooking postgres to Web pages?
   3.37) What is the time-warp feature and how does it relate to vacuum?
   3.38) How do I tune the database engine for better performance?
   3.39) What debugging features are available in PostgreSQL?
   3.40) What is an oid? What is a tid?
   3.41) What is the meaning of some of the terms used in Postgres?
   
  4) Questions about extending PostgreSQL
  
   4.1) I wrote a user-defined function and when I run it in psql, it
   dumps core.
   4.2) I get messages of the type NOTICE:PortalHeapMemoryFree:
   0x402251d0
   4.3) I've written some nifty new types and functions for PostgreSQL.
   4.4) How do I write a C function to return a tuple?
   
  5) Bugs
  
   5.1) How do I make a bug report?
     _________________________________________________________________
   
d126 122
a247 144
  1.1) What is PostgreSQL?
  
   
   
   PostgreSQL is an enhancement of the POSTGRES database management
   system, a next-generation DBMS research prototype. While PostgreSQL
   retains the powerful data model and rich data types of POSTGRES, it
   replaces the PostQuel query language with an extended subset of SQL.
   PostgreSQL is free and the complete source is available.
   
   PostgreSQL development is being performed by a team of Internet
   developers who all subscribe to the PostgreSQL development mailing
   list. The current coordinator is Marc G. Fournier
   (scrappy@@postgreSQL.org). (See below on how to join). This team is
   now responsible for all current and future development of PostgreSQL.
   
   The authors of PostgreSQL 1.01 were Andrew Yu and Jolly Chen. Many
   others have contributed to the porting, testing, debugging and
   enhancement of the code. The original Postgres code, from which
   PostgreSQL is derived, was the effort of many graduate students,
   undergraduate students, and staff programmers working under the
   direction of Professor Michael Stonebraker at the University of
   California, Berkeley.
   
   The original name of the software at Berkeley was Postgres. When SQL
   functionality was added in 1995, its name was changed to Postgres95.
   The name was changed at the end of 1996 to PostgreSQL.
   
  1.2) What does PostgreSQL run on?
  
   
   
   The authors have compiled and tested PostgreSQL on the following
   platforms(some of these compiles require gcc 2.7.0):
     * DEC Alpha AXP on OSF/1 2.0
     * HP PA-RISC on HP-UX 9.0
     * i386 Solaris
     * SUN SPARC on Solaris 2.4
     * SUN SPARC on SunOS 4.1.3
     * DEC MIPS on Ultrix 4.4
     * Intel x86 on Linux 1.2 and Linux ELF
     * OSs derived from 4.4-lite BSD (NetBSD, FreeBSD)
     * IBM on AIX 3.2.5
     * BSD/OS 2.0, 2.01 & 2.1
     * SGI MIPS on IRIX 5.3
       
   
   
   The following ports are bundled with the PostgreSQL distribution. The
   authors do not have handy access to these platforms but the ports have
   been tested by the others.
     * Motorola MC68K or Intel x86 on NeXTSTEP 3.2
     * Intel x86 on Intel SVR4
       
   
   
  1.3) Where can I get PostgreSQL?
  
   
   
    The primary anonymous ftp site for PostgreSQL is:
     * ftp://ftp.postgreSQL.org/pub
       
   
   
   A mirror site exists at:
     * ftp://postgres95.vnet.net/pub/postgres95
     * ftp://ftp.luga.or.at/pub/postgres95
     * ftp://cal011111.student.utwente.nl/pub/postgres95
     * ftp://ftp.uni-trier.de/pub/database/rdbms/postgres/postgres95
     * ftp://rocker.sch.bme.hu
       
  1.4) What's the copyright on PostgreSQL?
  
   
   
   PostgreSQL is subject to the following COPYRIGHT.
   
   PostgreSQL Data Base Management System
   
   Copyright (c) 1994-6 Regents of the University of California
   
   Permission to use, copy, modify, and distribute this software and its
   documentation for any purpose, without fee, and without a written
   agreement is hereby granted, provided that the above copyright notice
   and this paragraph and the following two paragraphs appear in all
   copies.
   
   IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
   FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
   INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND
   ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN
   ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   
   THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
   PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
   CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
   UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
   
  1.5) Support for PostgreSQL 
  
   
   
   There is no official support for PostgreSQL from the original
   maintainers or from University of California, Berkeley. It is
   maintained through volunteer effort only.
   
   The main mailing list is: questions@@postgreSQL.org. It is available
   for discussion o f matters pertaining to PostgreSQL, including but not
   limited to bug reports and fixes. For info on how to subscribe, send a
   mail with the lines in the body (not the subject line)


        help
        info questions

   
   
   to majordomo@@postgreSQL.org.
   
   There is also a digest list available. To subscribe to this list, send
   email to: majordomo@@postgreSQL.org with a BODY of:


        subscribe questions-digest

   Digests are sent out to members of this list whenever the main list
   has received around 30k of messages.
   
   There is also a developers mailing list available. To subscribe to
   this list, send email to hackers-request@@postgreSQL.org with a BODY
   of:
   


        subscribe hackers

   
   
   Additional information about PostgreSQL can be found via the
   PostgreSQL WWW home page at:
   
a248 241
     
   
   
  1.6) Latest release of PostgreSQL
  
   
   
   The latest release of PostgreSQL is version 1.09. The next release
   will be numbered 6.0 for historical reasons. This release is in beta
   and is available at our ftp site. We expect the beta period to be
   complete during the week of January 2, 1997. For information about
   what is new in 6.0, see our TODO list on our WWW page.
   
   We expect a 7.0 release in several months that will remove time-travel
   and reduce by 50% the size of on-disk system columns maintained for
   each row in a table. This release will also require a dump and
   restore.
   
  1.7) Is there a commercial version of PostgreSQL?
  
   
   
   Illustra Information Technology (a wholly owned subsidiary of Informix
   Software, Inc.) sells an object-relational DBMS called Illustra that
   was originally based on postgres. Illustra has cosmetic similarities
   to PostgreSQL but has more features, is more robust, performs better,
   and offers real documentation and support. On the flip side, it costs
   money. For more information, contact sales@@illustra.com
   
  1.8) What documentation is available for PostgreSQL?
  
   
   
   A user manual, manual pages, and some small test examples are included
   in the distribution. The sql and built-in manual pages are
   particularly important.
   
   The www page contains pointers to an implementation guide and five
   papers written about postgres design concepts and features.
   
  1.9) What version of SQL does PostgreSQL use?
  
   
   
   PostgreSQL supports a subset of SQL-92. It has most of the important
   constructs but lacks some of the functionality. The most visible
   differences are:
     * no support for nested subqueries
     * no HAVING clause under a GROUP BY
       
   
   
   On the other hand, you get to create user-defined types, functions,
   inheritance etc. If you're willing to help with PostgreSQL coding,
   eventually we can also add the missing features listed above.
   
  1.10) Does PostgreSQL work with databases from earlier versions of postgres?
  
   
   
   PostgreSQL v1.09 is compatible with databases created with v1.01.
   Those upgrading from 1.0 should read the directions in the
   MIGRATION_1.0_TO_1.02 directory.
   
   Upgrading to 6.0 requires a dump and restore.
   
  1.11) How many people use PostgreSQL?
  
   
   
   Since we don't have any licensing or registration scheme, it's
   impossible to tell. We do know hundreds copies of PostgreSQL v1.* have
   been downloaded, and that there many hundreds of subscribers to the
   mailing lists.
   
   
     _________________________________________________________________
   
Section 2: Installation Questions 

   
   
  2.1) initdb doesn't run
  
   
   
     * check to see that you have the proper paths set
     * check that the 'postgres' user owns all the right files
     * ensure that there are files in $PGDATA/files, and that they are
       non-empty. If they aren't, then "gmake install" failed for some
       reason
       
   
   
  2.2) when I start up the postmaster, I get "FindBackend: could not find a
  backend to execute..." "postmaster: could not find backend to execute..."
  
   
   
   You probably do not have the right path set up. The 'postgres'
   executable needs to be in your path.
   
  2.3) The system seems to be confused about commas, decimal points, and date
  formats.
  
   
   
   Check your locale configuration. PostgreSQL uses the locale settings
   of the user that ran the postmaster process. Set those accordingly for
   your operating environment.
   
  2.4) How do I install PostgreSQL somewhere other than /usr/local/pgsql?
  
   
   
   You need to manually edit the paths in src/Makefile.global to your
   site configuration.
   
  2.5) The backend compiled successfully, but compiling libpq resulted in a
  complaint: "libpq/pqcomm.h" not found when compiling fe-auth.c.
  
   
   
   You've probably installed PostgreSQL somewhere other than
   /usr/local/pgsql, but didn't edit the src/Makefile.global accordingly.
   See question 2.6.
   
  2.6) When I run postmaster, I get a Bad System Call core dumped message.
  
   
   
   It could be a variety of problems, but first check to see that you
   have system V extensions installed on your kernel. PostgreSQL requires
   kernel support for shared memory.
   
  2.7) I get the error message "obj/fmgr.h: No such file or directory"
  
   
   
   This indicates that you did not generate the file fmgr.h properly.
   Something failed in the running of the
   src/backend/utils/Gen_fmgrtab.sh script. Check to see the paths used
   in that script is appropriate to your system.
   
  2.8) When I try to start the postmaster, I get IpcMemoryCreate errors.
  
   
   
   You either do not have shared memory configured properly in kernel or
   you need to enlarge the shared memory available in the kernel. The
   exact amount you need depends on your architecture and how many
   buffers you configure postmaster to run with. For most systems, with
   default buffer sizes, you need a minimum of ~760K.
   
  2.10) I have changed a source file, but a recompile does 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'.
   
   
     _________________________________________________________________
   
Section 3: PostgreSQL Features 

   
   
  3.1) How do I specify a KEY or other constraints on a column?
  
   
   
   Column constraints are not supported in PostgreSQL. As a consequence,
   the system does not check for duplicates.
   
   Under 6.0, create a unique index on the column. Attempts to create
   duplicate of that column will report an error.
   
  3.2) Does PostgreSQL support nested subqueries?
  
   
   
   Subqueries are not implemented, but they can be simulated using sql
   functions.
   
  3.3) How do I define a unique indices?
  
   
   
   PostgreSQL 6.0 supports unique indices.
   
  3.4) I've having a lot of problems using rules.
  
   
   
   Currently, the rule system in PostgreSQL is mostly broken. It works
   enough to support the view mechanism, but that's about it. Use
   PostgreSQL rules at your own peril.
   
  3.5) I can't seem to write into the middle of large objects reliably.
  
   
   
   The Inversion large object system in PostgreSQL is also mostly broken.
   It works well enough for storing large wads of data and reading them
   back out, but the implementation has some underlying problems. Use
   PostgreSQL large objects at your own peril.
   
  3.6) Does PostgreSQL have a graphical user interface? A report generator? A
  embedded query language interface?
  
   
   
   No. No. No. Not in the official distribution at least. Some users have
   reported some success at using 'pgbrowse' and 'onyx' as frontends to
   PostgreSQL. Several contributions are working on tk based frontend
   tools. Ask on the mailing list.
   
  3.7) How can I write client applications to PostgreSQL?
  
   
   
   PostgreSQL supports a C-callable library interface called libpq as
   well as a Tcl-based library interface called libtcl.
   
   Others have contributed a perl interface and a WWW gateway to
   PostgreSQL. See the PostgreSQL home pages for more details.
   
  3.8) How do I prevent other hosts from accessing my PostgreSQL backend?
  
   
   
   Use host-based authentication by modifying the file $PGDATA/pg_hba
   accordingly.
   
  3.9) How do I set up a pg_group?
  
   
   
   Currently, there is no easy interface to set up user groups. You have
   to explicitly insert/update the pg_group table. For example:
d250 170
d428 46
a473 163
   
   
   The fields in pg_group are:
     * groname: the group name. This a char16 and should be purely
       alphanumeric. Do not include underscores or other punctuation.
     * grosysid: the group id. This is an int4. This should be unique for
       each group.
     * grolist: the list of pg_user id's that belong in the group. This
       is an int4[].
       
   
   
  3.10) What is the exact difference between binary cursors and normal cursors?
  
   
   
   Normal cursors return data back in ASCII format. Since data is stored
   natively in binary format, the system must do a conversion to produce
   the ASCII format. In addition, ASCII formats are often large in size
   than binary format. Once the attributes come back in ASCII, often the
   client application then has to convert it to a binary format to
   manipulate it anyway.
   
   Binary cursors give you back the data in the native binary
   representation. Thus, binary cursors will tend to be a little faster
   since there's less overhead of conversion.
   
   However, ASCII is architectural neutral whereas binary representation
   can differ between different machine architecture. Thus, if your
   client machine uses a different representation than you server
   machine, getting back attributes in binary format is probably not what
   you want. Also, if your main purpose is displaying the data in ASCII,
   then getting it back in ASCII will save you some effort on the client
   side.
   
  3.11) Why doesn't the != operator work?
  
   
   
   SQL specifies <> as the inequality operator, and that is what we have
   defined for the built-in types.
   
   In 6.0, != is equivalent to <>.
   
  3.12) What is a R-tree index and what is it used for?
  
   
   
   An r-tree index is used for indexing spatial data. A hash index can't
   handle range searches. A B-tree index only handles range searches in a
   single dimension. R-tree's can handle multi-dimensional data. For
   example, if a R-tree index can be built on an attribute of type
   'point', the system can more efficient answer queries like select all
   points within a bounding rectangle.
   
   The canonical paper that describes the original R-Tree design is:
   
   Guttman, A. "R-Trees: A Dynamic Index Structure for Spatial
   Searching." Proc of the 1984 ACM SIGMOD Int'l Conf on Mgmt of Data,
   45-57.
   
   You can also find this paper in Stonebraker's "Readings in Database
   Systems"
   
  3.13) What is the maximum size for a tuple?
  
   
   
   Tuples are limited to 8K bytes. Taking into account system attributes
   and other overhead, one should stay well shy of 8,000 bytes to be on
   the safe side. To use attributes larger than 8K, try using the large
   objects interface.
   
   Tuples do not cross 8k boundaries so a 5k tuple will require 8k of
   storage.
   
  3.14) I defined indices but my queries don't seem to make use of them. Why?
  
   
   
   PostgreSQL does not automatically maintain statistics. One has to make
   an explicit 'vacuum' call to update the statistics. After statistics
   are updated, the optimizer has a better shot at using indices. Note
   that the optimizer is limited and does not use indices in some
   circumstances (such as OR clauses).
   
   If the system still does not see the index, it is probably because you
   have created an index on a field with the improper *_ops type. For
   example, you have created a CHAR(4) field, but have specified a
   char_ops index type_class.
   
   See the create_index manual page for information on what type classes
   are available. It must match the field type.
   
   Postgres does not warn the user when the improper index is created.
   
   Indexes not used for ORDER BY operations.
   
  3.15) Are there ODBC drivers for PostgreSQL?
  
   
   
   There are two ODBC drivers available, PostODBC and OpenLink ODBC.
   
   For all people being interested in PostODBC, there are now two mailing
   lists devoted to the discussion of PostODBC. The mailing lists are:
     * postodbc-users@@listserv.direct. net
     * postodbc-developers@@listse rv.direct.net
       
   
   
   these lists are ordinary majordomo mailing lists. You can subscribe by
   sending a mail to:
     * majordomo@@listserv.direct.net
       
   
   
   OpenLink ODBC is currently in beta under Linux. You can get it from
   http://www.openlinksw.com/postgres.html. It works with our standard
   ODBC client software so you'll have Postgres ODBC available on every
   client platform we support (Win, Mac, Unix, VMS).
   
   We will probably be selling this product to people who need
   commercial-quality support, but a freeware version will always be
   available. Questions to postgres95@@openlink.co.uk.
   
  3.16) How do I use postgres for multi-dimensional indexing (> 2
  dimensions">)?
  
   
   
   Builtin R-Trees can handle polygons and boxes. In theory, R-trees can
   be extended to handle higher number of dimensions. In practice,
   extending R-trees require a bit of work and we don't currently have
   any documentation on how to do it.
   
  3.17) How do I do regular expression searches? case-insensitive regexp
  searching?
  
   
   
   PostgreSQL supports the SQL LIKE syntax as well as more general
   regular expression searching with the ~ operator. The !~ is the
   negated regexp operator. ~* and !~* are the case-insensitive regular
   expression operators.
   
  3.18) I can't access the database as the 'root' user.
  
   
   
   You should not create database users with user id 0(root). They will
   be unable to access the database. This is a security precaution
   because of the ability of any user to dynamically link object modules
   into the database engine.
   
  3.19) I experienced a server crash during a vacuum. How do I remove the lock
  file?
  
   
   
   If the server crashes during a vacuum command, chances are it will
   leave a lock file hanging around. Attempts to re-run the vacuum
   command result in
d475 85
d563 4
a566 7
   
   
   If you are sure that no vacuum is actually running, you can remove the
   file called "pg_vlock" in your database directory (which is
   $PGDATA/base/)
   
  3.20) What is the difference between the various character types?
d580 2
a581 24
   
   
   Remember, you need to use the internal name when creating indexes on
   these fields or when doing other internal operations.
   
   The last four types above are "varlena" types (i.e. the first four
   bytes is the length, followed by the data). CHAR(#) and VARCHAR(#)
   allocate the maximum number of bytes no matter how much data is stored
   in the field. TEXT and BYTEA are the only character types that have
   variable length on the disk.
   
  3.21) In a query, how do I detect if a field is NULL?
  
   
   
   PostgreSQL has two builtin keywords, "isnull" and "notnull" (note no
   spaces). Version 1.05 and later and 6.* understand IS NULL and IS NOT
   NULL.
   
  3.22) How do I see how the query optimizer is evaluating my query?
  
   
   
   Place the word 'EXPLAIN' at the beginning of the query, for example:
d583 14
d600 1
a600 13
   
   
  3.23) How do I create a serial field?
  
   
   
   Postgres does not allow the user to specifiy a user column as type
   SERIAL. Instead, you can use each row's oid field as a unique value.
   However, if you need to dump and reload the database, you need to be
   using postgres version 1.07 or later or 6.* with pgdump's -o option or
   COPY's WITH OIDS option to preserver the oids.
   
   Another valid way of doing this is to create a function:
d602 7
d616 1
a616 4
   
   
   then:

d621 25
a645 49
   
   
   However, keep in mind there is a race condition here where one server
   could do the update, then another one do an update, and they both
   could select the same new id. This statement should be performed
   within a transaction.
   
  3.24) How do I create a multi-column index?
  
   
   
   You can not directly create a multi-column index using create index.
   You need to define a function which acts on the multiple columns, then
   use create index with that function.
   
  3.25) What are the temp_XXX files in my database directory?
  
   
   
   They are temp_ files generated by the query executor. For example, if
   a sort needs to be done to satisfy an ORDER BY, some temp files are
   generated as a result of the sort.
   
   If you have no transactions or sorts running at the time, it is safe
   to delete the temp_ files.
   
  3.26) Why are my table files not getting any smaller after a delete?
  
   
   
   If you run vacuum in pre-6.0, unused rows will be marked for reuse,
   but the file blocks are not released.
   
   In 6.0, vacuum properly shrinks tables.
   
  3.27) Why can't I connect to my database from another machine?
  
   
   
   The default configuration allows only connections from tcp/ip host
   localhost. You need to add a host entry to the file pgsql/data/pg_hba.
   
   
  3.28) I get the error 'default index class unsupported' when creating an
  index. How do I do it?
  
   
   
   You probably used:
d647 9
d659 14
a672 23
   
   
   PostgreSQL indexes are extensible, and therefore in pre-6.0, you must
   specify a class_type when creating an index. Read the manual page for
   create index (called create_index).
   
   Version 6.0, if you do not specify a class_type, it defaults to the
   proper type for the column.
   
  3.29) Why does creating an index crash the backend server?
  
   
   
   You have probably defined an incorrect *_ops type class for the field
   you are indexing.
   
  3.30) How do I specify a decimal constant as a float8, or a string as a text?
  Why am I getting poor precision?
  
   
   
   Use the :: operator. It is needed only when the default promotion
   rules fail. i.e.:
d674 2
d679 17
a695 77
   
   
   The default floating-point constant is a float4 in releases prior to
   1.05. Later releases default to float8.
   
  3.31) How do I find out what indexes or operations are defined in the
  database?
  
   
   
   Run the file pgsql/src/tutorial/syscat.source. It illustrates many of
   the 'select's needed to get information out of the database system
   tables.
   
  3.32) My database is corrupt. I can't do anything. What should I do?
  
   
   
   The 1.02 release has a README file and utility that describes a
   possible cause of the problem and a workaround.
   
   This bug is fixed in 1.02.1.
   
  3.33) Createdb, destroydb, createuser,destroyuser don't run. Why?
  
   
   
   Release 1.02 does not have this problem.
   
   The 1.01 release of PostgreSQL uses a variable called PAGER to filter
   the output of SELECT statements. Unfortunately, this PAGER is used
   even when the standard output is not a terminal.
   
  3.34) Why does 'createuser' return 'unexpected last match in input(">)'?
  
   
   
   You have compile postgres with flex version 2.5.3. There is bug in
   this version of flex. Use flex version 2.5.2 or flex 2.5.4 instead.
   There is a doc/README.flex file which will properly patch the flex
   2.5.3 source code.
   
  3.35) All my servers crash under concurrent table access. Why?
  
   
   
   This problem can be caused by a kernel that is not configured to
   support semaphores.
   
  3.36) What tools are available for hooking postgres to Web pages?
  
   
   
   For web integration, PHP/FI is an excellent interface. The URL for
   that is http://www.vex.net/php/
   
   PHP is great for simple stuff, but for more complex stuff, some still
   use the perl interface and CGI.pm.
   
   An example of using WWW with C to talk to Postgres is can be tried at:
     * http://postgreSQL.org/~mlc
       
   
   
   An WWW gatway based on WDB using perl can be downloaded from:
     * http://www.eol.ists.ca/~dunlop/wdb -p95
       
  3.37) What is the time-warp feature and how does it relate to vacuum?
  
   
   
   PostgreSQL handles data changes differently than most database
   systems. When a row is changed in a table, the original row is marked
   with the time it was changed, and a new row is created with the
   current data. By default, only current rows are used in a table. If
   you specify a date/time after the table name in a FROM clause, you can
   access the data that was current at that time, i.e.
d697 41
d742 3
a744 46
   
   
   displays employee rows in the table at the specified time. You can
   specify intervals like [date,date], [date,], [,date], or [,]. This
   last option accesses all rows that ever existed.
   
   INSERTed rows get a timestamp too, so rows that were not in the table
   at the desired time will not appear.
   
   Vacuum removes rows that are no longer current. This time-warp feature
   is used by the engine for rollback and crash recovery. Expiration
   times can be set with purge.
   
   In 6.0, once a table is vacuumed, the creation time of a row may be
   incorrect, causing time-traval to fail.
   
   The time-travel feature will be removed in 7.0.
   
  3.38) How do I tune the database engine for better performance?
  
   
   
   There are two things that can be done. You can use Openlink's option
   to disable fsync() by starting the postmaster with a '-o -F' option.
   This will prevent fsync()'s from flushing to disk after every
   transaction.
   
   You can also use the postmaster -B option to increase the number of
   shared memory buffers shared among the backend processes. If you make
   this parameter too high, the process will not start or crash
   unexpectedly. Each buffer is 8K and the defualt is 64 buffers.
   
  3.39) What debugging features are available in PostgreSQL?
  
   
   
   PostgreSQL has several features that report status information that
   can be valuable for debugging purposes.
   
   First, by compiling with DEBUG defined, many assert()'s monitor the
   progress of the backend and halt the program when something unexpected
   occurs.
   
   Both postmaster and postgres have several debug options available.
   First, whenever you start the postmaster, make sure you send the
   standard output and error to a log file, like:
d746 34
d784 107
a890 134
   
   
   This will put a server.log file in the top-level PostgreSQL directory.
   This file can contain useful information about problems or errors
   encountered by the server. Postmaster has a -d option that allows even
   more detailed information to be reported. The -d option takes a number
   1-3 that specifies the debug level. The query plans in a verbose debug
   file can be formatted using the 'indent' program. (You may need to
   remove the '====' lines in 1.* releases.) Be warned that a debug level
   greater than one generates large log files in 1.* releases.
   
   You can actuall run the postgres backend from the command line, and
   type your SQL statement directly. This is recommended ONLY for
   debugging purposes. Note that a newline terminates the query, not a
   semicolon. If you have compiled with debugging symbols, you can
   perhaps use a debugger to see what is happening. Because the backend
   was not started from the postmaster, it is not running in an identical
   environment and locking/backend interaction problems may not be
   duplicated. Some operating system can attach to a running backend
   directly to diagnose problems.
   
   The postgres program has a -s, -A, -t options that can be very usefull
   for debugging and performance measurements.
   
   The EXPLAIN command (see this FAQ) allows you to see how PostgreSQL is
   iterpreting your query.
   
  3.40) What is an oid? What is a tid?
  
   
   
   Oids are Postgres's answer to unique row ids or serial columns. Every
   row that is created in Postgres gets a unique oid. All oids generated
   by initdb are less than 16384 (from backend/access/transam.h). All
   post-initdb (user-created) oids are equal or greater that this. All
   these oids are unique not only within a table, or database, but unique
   within the entire postgres installation.
   
   Postgres uses oids in its internal system tables to link rows in
   separate tables. These oids can be used to identify specific user rows
   and used in joins. It is recommended you use column type oid to store
   oid values. See the sql(l) manual page to see the other internal
   columns.
   
   Tids are used to indentify specific physical rows with block and
   offset values. Tids change after rows are modified or reloaded. They
   are used by index entries to point to physical rows. They can not be
   accessed through sql.
   
  3.41) What is the meaning of some of the terms used in Postgres?
  
   
   
   Some of the source code and older documentation use terms that have
   more common usage. Here are some:
     * row, record, tuple
     * attribute, field, column
     * table, class
     * retrieve, select
     * replace, update
     * append, insert
     * oid, serial value
     * portal, cursor
     * range variable, table name, table alias
       
   
   
   Please let me know if you think of any more.
   
   
     _________________________________________________________________
   
Section 4: Extending PostgreSQL 

   
   
  4.1) I wrote a user-defined function and when I run it in psql, it dumps
  core.
  
   
   
   The problem could be a number of things. Try testing your user-defined
   function in a stand alone test program first. Also, make sure you are
   not sending elog NOTICES when the front-end is expecting data, such as
   during a type_in() or type_out() functions
   
  4.2) I get messages of the type NOTICE:PortalHeapMemoryFree: 0x402251d0 not
  in alloc set!
  
   
   
   You are pfree'ing something that was not palloc'ed. When writing
   user-defined functions, do not include the file "libpq-fe.h". Doing so
   will cause your palloc to be a malloc instead of a free. Then, when
   the backend pfrees the storage, you get the notice message.
   
  4.3) I've written some nifty new types and functions for PostgreSQL.
  
   
   
   Please share them with other PostgreSQL users. Send your extensions to
   mailing list, and they will eventually end up in the contrib/
   subdirectory.
   
  4.4) How do I write a C function to return a tuple?
  
   
   
   This requires extreme wizardry, so extreme that the authors have not
   ever tried it, though in principle it can be done. The short answer is
   ... you can't. This capability is forthcoming in the future.
   
   
     _________________________________________________________________
   
Section 5: Bugs 

   
   
  5.1) How do I make a bug report?
  
   
   
   Check the current FAQ at http://postgreSQL.org
   
   Also check out our ftp site ftp://ftp.postgreSQL.org/pub to see if
   there is a more recent PostgreSQL version.
   
   You can also fill out the "bug-template" file and send it to:
     * hackers@@postgreSQL.org
       
   
   
   This is the address of the developers mailing list.
@


1.3
log
@New FAQ's.
@
text
@a0 21
Frequently Asked Questions (FAQ) for Postgres95

Last updated: Mon Oct 14 08:05:23 EDT 1996
Version: 2.0

Current maintainer: Bruce Momjian (maillist@@candle.pha.pa.us)

The most recent version of this document can be viewed at the postgres95 Web
site, http://www.ki.net/postgres95.

Linux-specific questions are answered in
http://www.ki.net/postgres95/docs/FAQ-Linux.phtml.

Irix-specific questions are answered in
http://www.ki.net/postgres95/docs/FAQ-Irix.phtml.

Changes in this version (* = modified, + = new):

   * *3.41) What is the meaning of some of the terms used in Postgres?

----------------------------------------------------------------------------
d2 50
d54 99
a152 99
1) General questions

1.1) What is Postgres95?
1.2) What does Postgres95 run on?
1.3) Where can I get Postgres95?
1.4) What's the copyright on Postgres95?
1.5) Support for Postgres95
1.6) Latest release of Postgres95
1.7) Is there a commercial version of Postgres95?
1.9) What version of SQL does Postgres95 use?
1.10) Does Postgres95 work with databases from earlier versions of postgres?
1.11) How many people use Postgres95?

2) Installation questions

2.1) I get the error "cpp: command not found" when I try to compile
2.2) I get 'yy_flush_buffer undefined' when I try to compile the backend
2.3) initdb doesn't run
2.4) when I start up the postmaster, I get
2.5) The system seems to be confused about commas, decimal points, and date
formats.
2.6) How do I install postgres95 somewhere other than /usr/local/postgres95?
2.7) The backend compiled successfully, but compiling libpq resulted in a
complaint: "libpq/pqcomm.h" not found when compiling fe-auth.c.
2.8) Where can I find the bug fixes for postgres95?
2.9) I can't apply the patches even though everything looks like it should
work.
2.10) When I run postmaster, I get a Bad System Call core dumped message.
2.11) I get the error message "obj/fmgr.h: No such file or directory"
2.12) When I try to start the postmaster, I get IpcMemoryCreate errors.
2.13) I get the strange make errors right at the beginning:
2.14) I have changed a source file, but a recompile does not see the change.

3) Postgres95 Features questions

3.1) How do I specify a KEY or other constraints on a column?
3.2) Does Postgres95 support nested subqueries?
3.3) How do I define a unique indices?
3.4) I've having a lot of problems with using rules.
3.5) I can't seem to write into the middle of large objects reliably.
3.6) Does postgres95 have a graphical user interface? A report
3.7) How can I write client applications to Postgres95?
3.8) How do I prevent other hosts from accessing my Postgres95
3.9) How do I set up a pg_group?
3.10) What is the exact difference between binary cursors and normal
cursors?
3.11) Why doesn't the != operator work?
3.12) What is a R-tree index and what is it used for?
3.13) What is the maximum size for a tuple?
3.14) I defined indices but my queries don't seem to make use of them. Why?
3.15) Are there ODBC drivers for Postgres95?
3.16) How do I use postgres for multi-dimensional indexing (> 2 dimensions)?
3.17) How do I do regular expression searches? case-insensitive regexp
searching?
3.18) I can't access the database as the 'root' user.
3.19) I experienced a server crash during a vacuum. How do I remove the lock
file?
3.20) What is the difference between the various character types?
3.21) In a query, how do I detect if a field is NULL?
3.22) How do I see how the query optimizer is evaluating my query?
3.23) How do I create a serial field?
3.24) How do I create a multi-column index?
3.25) What are the temp_XXX files in my database directory?
3.26) Why are my table files not getting any smaller after a delete?
3.27) Why can't I connect to my database from another machine?
3.28) I get the error 'default index class unsupported' when creating an
index. How do I do it?
3.29) Why does creating an index crash the backend server?
3.30) How do I specify a decimal constant as a float8, or a string as a
text? Why am I getting poor precision?
3.30) How do I specify a decimal constant as a float8, or a string as a
text? Why am I getting poor precision?
3.31) How do I find out what indexes or operations are defined in the
database?
3.32) My database is corrupt. I can't do anything. What should I do?
3.33) Createdb, destroydb, createuser,destroyuser don't run. Why?
3.34) Why does 'createuser' return 'unexpected last match in input()'?
3.35) All my servers crash under concurrent table access. Why?
3.36) What tools are available for hooking postgres to Web pages?
3.37) What is the time-warp feature and how does it relate to vacuum?
3.38) How do I tune the database engine for better performance?
3.39) What debugging features are available in Postgres95?
3.40) What is an oid? What is a tid?
3.41) What is the meaning of some of the terms used in Postgres?

4) Questions about extending Postgres95

4.1) I wrote a user-defined function and when I run it in psql, it dumps
core.
4.2) I get messages of the type NOTICE:PortalHeapMemoryFree: 0x402251d0
4.3) I've written some nifty new types and functions for Postgres95.
4.4) How do I write a C function to return a tuple?

5) Bugs

5.1) How do I find out about bug fixes?
5.2) How do I make a bug report?
----------------------------------------------------------------------------

d155 113
a267 1
1.1) What is Postgres95?
a268 91
Postgres95 is an enhancement of the POSTGRES database management system, a
next-generation DBMS research prototype. While Postgres95 retains the
powerful data model and rich data types of POSTGRES, it replaces the
PostQuel query language with an extended subset of SQL. Postgres95 is free
and the complete source is available.

Postgres95 development is being performed by a team of Internet developers
who all subscribe to the Postgres95 development mailing list. The current
coordinator is Marc G. Fournier (scrappy@@ki.net). (See below on how to
join). This team is now responsible for all current and future development
of Postgres95.

The authors of Postgres95 1.01 were Andrew Yu and Jolly Chen. Many others
have contributed to the porting, testing, debugging and enhancement of the
code. The original Postgres code, from which Postgres95 is derived, was the
effort of many graduate students, undergraduate students, and staff
programmers working under the direction of Professor Michael Stonebraker at
the University of California, Berkeley.

1.2) What does Postgres95 run on?

The authors have compiled and tested Postgres95 on the following
platforms(some of these compiles require gcc 2.7.0):

   * DEC Alpha AXP on OSF/1 2.0
   * HP PA-RISC on HP-UX 9.0
   * i386 Solaris
   * SUN SPARC on Solaris 2.4
   * SUN SPARC on SunOS 4.1.3
   * DEC MIPS on Ultrix 4.4
   * Intel x86 on Linux 1.2 and Linux ELF
   * OSs derived from 4.4-lite BSD (NetBSD, FreeBSD)
   * IBM on AIX 3.2.5
   * BSD/OS 2.0, 2.01 & 2.1
   * SGI MIPS on IRIX 5.3

The following ports are bundled with the Postgres95 distribution. The
authors do not have handy access to these platforms but the ports have been
tested by the others.

   * Motorola MC68K or Intel x86 on NeXTSTEP 3.2
   * Intel x86 on Intel SVR4

1.3) Where can I get Postgres95?

The primary anonymous ftp site for postgres95 is:

   * ftp://ftp.ki.net/pub/postgres95

A mirror site exists at:

   * ftp://postgres95.vnet.net/pub/postgres95
   * ftp://ftp.luga.or.at/pub/postgres95
   * ftp://cal011111.student.utwente.nl/pub/postgres95

1.4) What's the copyright on Postgres95?

Postgres95 is subject to the following COPYRIGHT.

POSTGRES95 Data Base Management System

Copyright (c) 1994-6 Regents of the University of California

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement
is hereby granted, provided that the above copyright notice and this
paragraph and the following two paragraphs appear in all copies.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
"AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

1.5) Support for Postgres95

There is no official support for Postgres95 from the original maintainers or
from University of California, Berkeley. It is maintained through volunteer
effort only.

With the generosity of the Jason Wright and others at Vnet, the postgres95
mailing list now has a new home -- postgres95@@postgres95.vnet.net. It is
available for discussion of matters pertaining to Postgres95, including but
not limited to bug reports and fixes. For info on how to subscribe, send a
mail with the lines in the body (not the subject line)
d271 1
a271 121
        info postgres95

to majordomo@@postgres95.vnet.net.

There is also a digest list available. To subscribe to this list, send email
to majordomo@@postgres95.vnet.net with a BODY of:

        subscribe postgres95-digest

Digests are sent out to members of this list whenever the main list has
received around 30k of messages.

Archives and digests of the new mailing list at Vnet can be found at:

   * ftp://postgres95.vnet.net/pub/postgres95/archives
   * ftp://postgres95.vnet.net/pub/postgres95/digests

There is also a developers mailing list available. To subscribe to this
list, send email to pg95-dev-request@@ki.net with a BODY of:

        subscribe pg95-dev

Additional information about Postgres95 can be found via the postgres95 WWW
home page at:

     http://www.ki.net/postgres95

1.6) Latest release of Postgres95

The latest release of postgres95 is version 1.08.

1.7) Is there a commercial version of Postgres95?

Illustra Information Technology (a wholly owned subsidiary of Informix
Software, Inc.) sells an object-relational DBMS called Illustra that was
originally based on postgres. Illustra has cosmetic similarities to
postgres95 but has more features, is more robust, performs better, and
offers real documentation and support. On the flip side, it costs money. For
more information, contact sales@@illustra.com

1.8) What documentation is available for Postgres95?

A user manual, manual pages, and some small test examples are included in
the distribution. The sql and built-in manual pages are particularly
important.

The www page contains pointers to an implementation guide and five papers
written about postgres design concepts and features.

1.9) What version of SQL does Postgres95 use?

Postgres95 supports a subset of SQL-92. It has most of the important
constructs but lacks some of the functionality. The most visible differences
are:

   * no support for primary keys or column constraints
   * no support for nested subqueries
   * no HAVING clause under a GROUP BY

On the other hand, you get to create user-defined types, functions,
inheritance etc. If you're willing to help with postgres95 coding,
eventually we can also add the missing features listed above.

1.10) Does Postgres95 work with databases from earlier versions of postgres?

Postgres95 v1.08 is compatible with databases created with v1.01. Those
upgrading from 1.0 should read the directions in the MIGRATION_1.0_TO_1.02
directory.

1.11) How many people use Postgres95?

Since we don't have any licensing or registration scheme, it's impossible to
tell. We do know hundreds copies of postgres95 v1.* have been downloaded,
and that there many hundreds of subscribers to the mailing lists.

----------------------------------------------------------------------------

Section 2: Installation Questions

2.1) I get the error "cpp: command not found" when I try to compile the
backend.

Edit the src/backend/utils/Gen_fmgrtab.sh script to include the path for the
cpp for your particular site.

2.2) I get 'yy_flush_buffer undefined' when I try to compile the backend

Use a more recent version of flex, version 2.5.2. Version 2.5.3 has a known
bug.

2.3) initdb doesn't run

   * check to see that you have the proper paths set
   * check that the 'postgres' user owns all the right files
   * ensure that there are files in $PGDATA/files, and that they are
     non-empty. If they aren't, then "gmake install" failed for some reason

2.4) when I start up the postmaster, I get "FindBackend: could not find a
backend to execute..." "postmaster: could not find backend to execute..."

You probably do not have the right path set up. The 'postgres' executable
needs to be in your path.

2.5) The system seems to be confused about commas, decimal points, and date
formats.

Check your locale configuration. postgres95 uses the locale settings of the
user that ran the postmaster process. Set those accordingly for your
operating environment.

2.6) How do I install postgres95 somewhere other than /usr/local/postgres95?

You need to manually edit the paths in src/Makefile.global to your site
configuration.

2.7) The backend compiled successfully, but compiling libpq resulted in a
complaint: "libpq/pqcomm.h" not found when compiling fe-auth.c.

You've probably installed postgres95 somewhere other than
/usr/local/postgres, but didn't edit the src/Makefile.global accordingly.
See question 2.6.
d273 268
a540 1
2.8) Where can I find the bug fixes for postgres95?
a541 106
The patches should be applied in the order listed. The patch files can be
ftp'ed directly from the directory:

   * ftp://ftp.ki.net/pub/postgres95

2.9) I can't apply the patches even though everything looks like it should
work.

If you cut and paste directly off your web browser, tabs and whitespaces may
not be preserved properly. Use the 'save as file' option from your web
browser instead.

2.10) When I run postmaster, I get a Bad System Call core dumped message.

It could be a variety of problems, but first check to see that you have
system V extensions installed on your kernel. Postgres95 requires kernel
support for shared memory.

2.11) I get the error message "obj/fmgr.h: No such file or directory"

This indicates that you did not generate the file fmgr.h properly. Something
failed in the running of the src/backend/utils/Gen_fmgrtab.sh script. Check
to see the paths used in that script is appropriate to your system.

2.12) When I try to start the postmaster, I get IpcMemoryCreate errors.

You either do not have shared memory configured properly in kernel or you
need to enlarge the shared memory available in the kernel. The exact amount
you need depends on your architecture and how many buffers you configure
postmaster to run with. For most systems, with default buffer sizes, you
need a minimum of ~760K.

2.13) I get the strange make errors right at the beginning:

        warning: NUL character seen; rest of line ignored
        *** missing separator.  Stop.

or

        Is a directory.  Stop.

Eliminate any whitespaces at the end of the PORTNAME line in
Makefile.global. Extraneous tabs or spaces will confuse the make templates.

2.14) I have changed a source file, but a recompile does not see the change?

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

----------------------------------------------------------------------------

Section 3: Postgres95 Features

3.1) How do I specify a KEY or other constraints on a column?

Column constraints are not supported in postgres95. As a consequence, the
system does not check for duplicates.

3.2) Does Postgres95 support nested subqueries?

Subqueries are not implemented, but they can be simulated using sql
functions.

3.3) How do I define a unique indices?

Postgres95 does not support unique indices. Defining an index does not
preclude insertion of duplicate index key values.

3.4) I've having a lot of problems with using rules.

Currently, the rule system in postgres95 is mostly broken. It works enough
to support the view mechanism, but that's about it. Use postgres95 rules at
your own peril.

3.5) I can't seem to write into the middle of large objects reliably.

The Inversion large object system in postgres95 is also mostly broken. It
works well enough for storing large wads of data and reading them back out,
but the implementation has some underlying problems. Use postgres95 large
objects at your own peril.

3.6) Does postgres95 have a graphical user interface? A report generator? A
embedded query language interface?

No. No. No. Not in the official distribution at least. Some users have
reported some success at using 'pgbrowse' and 'onyx' as frontends to
postgres95. Several contributions are working on tk based frontend tools.
Ask on the mailing list.

3.7) How can I write client applications to Postgres95?

Postgres95 supports a C-callable library interface called libpq as well as a
Tcl-based library interface called libtcl.

Others have contributed a perl interface and a WWW gateway to postgres95.
See the postgres95 home pages for more details.

3.8) How do I prevent other hosts from accessing my Postgres95 backend?

Use host-based authentication by modifying the file $PGDATA/pg_hba
accordingly.

3.9) How do I set up a pg_group?

Currently, there is no easy interface to set up user groups. You have to
explicitly insert/update the pg_group table. For example:
d550 163
a712 52
The fields in pg_group are:

   * groname: the group name. This a char16 and should be purely
     alphanumeric. Do not include underscores or other punctuation.
   * grosysid: the group id. This is an int4. This should be unique for each
     group.
   * grolist: the list of pg_user id's that belong in the group. This is an
     int4[].

3.10) What is the exact difference between binary cursors and normal
cursors?

Normal cursors return data back in ASCII format. Since data is stored
natively in binary format, the system must do a conversion to produce the
ASCII format. In addition, ASCII formats are often large in size than binary
format. Once the attributes come back in ASCII, often the client application
then has to convert it to a binary format to manipulate it anyway.

Binary cursors give you back the data in the native binary representation.
Thus, binary cursors will tend to be a little faster since there's less
overhead of conversion.

However, ASCII is architectural neutral whereas binary representation can
differ between different machine architecture. Thus, if your client machine
uses a different representation than you server machine, getting back
attributes in binary format is probably not what you want. Also, if your
main purpose is displaying the data in ASCII, then getting it back in ASCII
will save you some effort on the client side.

3.11) Why doesn't the != operator work?

SQL specifies <> as the inequality operator, and that is what we have
defined for the built-in types. You are free, however, to extend postgres95
to include the != operator if you like.

3.12) What is a R-tree index and what is it used for?

An r-tree index is used for indexing spatial data. A hash index can't handle
range searches. A B-tree index only handles range searches in a single
dimension. R-tree's can handle multi-dimensional data. For example, if a
R-tree index can be built on an attribute of type 'point', the system can
more efficient answer queries like select all points within a bounding
rectangle.

The canonical paper that describes the original R-Tree design is:

Guttman, A. "R-Trees: A Dynamic Index Structure for Spatial Searching." Proc
of the 1984 ACM SIGMOD Int'l Conf on Mgmt of Data, 45-57.

You can also find this paper in Stonebraker's "Readings in Database Systems"

3.13) What is the maximum size for a tuple?
a713 78
Tuples are limited to 8K bytes. Taking into account system attributes and
other overhead, one should stay well shy of 8,000 bytes to be on the safe
side. To use attributes larger than 8K, try using the large objects
interface.

Tuples do not cross 8k boundaries so a 5k tuple will require 8k of storage.

3.14) I defined indices but my queries don't seem to make use of them. Why?

Postgres95 does not automatically maintain statistics. One has to make an
explicit 'vacuum' call to update the statistics. After statistics are
updated, the optimizer has a better shot at using indices. Note that the
optimizer is limited and does not use indices in some circumstances (such as
OR clauses).

If the system still does not see the index, it is probably because you have
created an index on a field with the improper *_ops type. For example, you
have created a CHAR(4) field, but have specified a char_ops index
type_class.

See the create_index manual page for information on what type classes are
available. It must match the field type.

Postgres does not warn the user when the improper index is created.

Indexes not used for ORDER BY operations.

3.15) Are there ODBC drivers for Postgres95?

There are two ODBC drivers available, PostODBC and OpenLink ODBC.

For all people being interested in PostODBC, there are now two mailing lists
devoted to the discussion of PostODBC. The mailing lists are:

   * postodbc-users@@listserv.direct. net
   * postodbc-developers@@listse rv.direct.net

these lists are ordinary majordomo mailing lists. You can subscribe by
sending a mail to:

   * majordomo@@listserv.direct.net

OpenLink ODBC is currently in beta under Linux. You can get it from
http://www.openlinksw.com/postgres.html. It works with our standard ODBC
client software so you'll have Postgres ODBC available on every client
platform we support (Win, Mac, Unix, VMS).

We will probably be selling this product to people who need
commercial-quality support, but a freeware version will always be available.
Questions to postgres95@@openlink.co.uk.

3.16) How do I use postgres for multi-dimensional indexing (> 2
dimensions">)?

Builtin R-Trees can handle polygons and boxes. In theory, R-trees can be
extended to handle higher number of dimensions. In practice, extending
R-trees require a bit of work and we don't currently have any documentation
on how to do it.

3.17) How do I do regular expression searches? case-insensitive regexp
searching?

Postgres95 supports the SQL LIKE syntax as well as more general regular
expression searching with the ~ operator. The !~ is the negated regexp
operator. ~* and !~* are the case-insensitive regular expression operators.

3.18) I can't access the database as the 'root' user.

You should not create database users with user id 0(root). They will be
unable to access the database. This is a security precaution because of the
ability of any user to dynamically link object modules into the database
engine.

3.19) I experienced a server crash during a vacuum. How do I remove the lock
file?

If the server crashes during a vacuum command, chances are it will leave a
lock file hanging around. Attempts to re-run the vacuum command result in
d717 7
a723 4
If you are sure that no vacuum is actually running, you can remove the file
called "pg_vlock" in your database directory (which is $PGDATA/base/)

3.20) What is the difference between the various character types?
d737 24
a760 10
Remember, you need to use the internal name when creating indexes on these
fields or when doing other internal operations.

The last four types above are "varlena" types (i.e. the first four bytes is
the length, followed by the data). CHAR(#) and VARCHAR(#) allocate the
maximum number of bytes no matter how much data is stored in the field. TEXT
and BYTEA are the only character types that have variable length on the
disk.

3.21) In a query, how do I detect if a field is NULL?
a761 6
Postgres95 has two builtin keywords, "isnull" and "notnull" (note no
spaces). Version 1.05 and later and 2.* understand IS NULL and IS NOT NULL.

3.22) How do I see how the query optimizer is evaluating my query?

Place the word 'EXPLAIN' at the beginning of the query, for example:
d765 13
a777 9
3.23) How do I create a serial field?

Postgres does not allow the user to specifiy a user column as type SERIAL.
Instead, you can use each row's oid field as a unique value. However, if you
need to dump and reload the database, you need to be using postgres version
1.07 or later or 2.* with pgdump's -o option or COPY's WITH OIDS option to
preserver the oids.

Another valid way of doing this is to create a function:
d786 4
a789 1
then:
d794 49
a842 27
However, keep in mind there is a race condition here where one server could
do the update, then another one do an update, and they both could select the
same new id. This statement should be performed within a transaction.

3.24) How do I create a multi-column index?

You can not directly create a multi-column index using create index. You
need to define a function which acts on the multiple columns, then use
create index with that function.

3.25) What are the temp_XXX files in my database directory?

They are temp_ files generated by the query executor. For example, if a sort
needs to be done to satisfy an ORDER BY, some temp files are generated as a
result of the sort.

If you have no transactions or sorts running at the time, it is safe to
delete the temp_ files.

3.26) Why are my table files not getting any smaller after a delete?

If you run vacuum, unused rows will be marked for reuse, but the file blocks
are not released. We could move the unused rows to the end of the file and
use ftruncate() to decrease the file size, but no one has implemented this
yet.

3.27) Why can't I connect to my database from another machine?
a843 7
The default configuration allows only connections from tcp/ip host
localhost. You need to add a host entry to the file postgres95/data/pg_hba.

3.28) I get the error 'default index class unsupported' when creating an
index. How do I do it?

You probably used:
d847 23
a869 5
Postgres95 indexes are extensible, and therefore you must specify a
class_type when creating an index. Read the manual page for create index
(called create_index). Version 2.0 will correct this deficiency.

3.29) Why does creating an index crash the backend server?
a870 8
You have probably defined an incorrect *_ops type class for the field you
are indexing.

3.30) How do I specify a decimal constant as a float8, or a string as a
text? Why am I getting poor precision?

Use the :: operator. It is needed only when the default promotion rules
fail. i.e.:
d874 77
a950 21
The default floating-point constant is a float4 in releases prior to 1.05.
Later releases default to float8.

3.31) How do I find out what indexes or operations are defined in the
database?

Run the file postgres95/src/tutorial/syscat.source. It illustrates many of
the 'select's needed to get information out of the database system tables.

3.32) My database is corrupt. I can't do anything. What should I do?

The 1.02 release has a README file and utility that describes a possible
cause of the problem and a workaround. See the file
postgres95/contrib/zap_ltv/README for more information. Also please contact
the README author to help generate a complete fix for this bug.

This bug may be fixed in 1.02.

3.33) Createdb, destroydb, createuser,destroyuser don't run. Why?

Release 1.02 does not have this problem.
a951 39
The 1.01 release of postgres95 uses a variable called PAGER to filter the
output of SELECT statements. Unfortunately, this PAGER is used even when the
standard output is not a terminal.

3.34) Why does 'createuser' return 'unexpected last match in input(">)'?

You have compile postgres with flex version 2.5.3. There is bug in this
version of flex. Use flex version 2.5.2 instead. There is a doc/README.flex
file which will properly patch the flex 2.5.3 source code.

3.35) All my servers crash under concurrent table access. Why?

This problem can be caused by a kernel that is not configured to support
semaphores.

3.36) What tools are available for hooking postgres to Web pages?

For web integration, PHP/FI is an excellent interface. The URL for that is
http://www.vex.net/php/

PHP is great for simple stuff, but for more complex stuff, some still use
the perl interface and CGI.pm.

An example of using WWW with C to talk to Postgres is can be tried at:

   * http://www.ki.net/~mlc

An WWW gatway based on WDB using perl can be downloaded from:

   * http://www.eol.ists.ca/~dunlop/wdb -p95

3.37) What is the time-warp feature and how does it relate to vacuum?

Postgres95 handles data changes differently than most database systems. When
a row is changed in a table, the original row is marked with the time it was
changed, and a new row is created with the current data. By default, only
current rows are used in a table. If you specify a date/time after the table
name in a FROM clause, you can access the data that was current at that
time, i.e.
d956 46
a1001 3
displays employee rows in the table at the specified time. You can specify
intervals like [date,date], [date,], [,date], or [,]. This last option
accesses all rows that ever existed.
a1002 2
INSERTed rows get a timestamp too, so rows that were not in the table at the
desired time will not appear.
d1004 1
a1004 28
Vacuum removes rows that are no longer current. This time-warp feature is
used by the engine for rollback and crash recovery. Expiration times can be
set with purge.

3.38) How do I tune the database engine for better performance?

There are two things that can be done. You can use Openlink's option to
disable fsync() by starting the postmaster with a '-o -F' option. This will
prevent fsync()'s from flushing to disk after every transaction.

You can also use the postmaster -B option to increase the number of shared
memory buffers shared among the backend processes. If you make this
parameter too high, the process will not start or crash unexpectedly. Each
buffer is 8K and the defualt is 64 buffers.

3.39) What debugging features are available in Postgres95?

Postgres95 has several features that report status information that can be
valuable for debugging purposes.

First, by compiling with DEBUG defined, many assert()'s monitor the progress
of the backend and halt the program when something unexpected occurs.

Both postmaster and postgres have several debug options available. First,
whenever you start the postmaster, make sure you send the standard output
and error to a log file, like:

        cd /usr/local/postgres95
d1007 134
a1140 106
This will put a server.log file in the top-level postgres95 directory. This
file can contain useful information about problems or errors encountered by
the server. Postmaster has a -d option that allows even more detailed
information to be reported. The -d option takes a number 1-3 that specifies
the debug level. The query plans in a verbose debug file can be formatted
using the 'indent' program. (You may need to remove the '====' lines.) Be
warned that a debug level greater than one generates large log files.

You can actuall run the postgres backend from the command line, and type
your SQL statement directly. This is recommended ONLY for debugging
purposes. Note that a newline terminates the query, not a semicolon. If you
have compiled with debugging symbols, you can perhaps use a debugger to see
what is happening. Because the backend was not started from the postmaster,
it is not running in an identical environment and locking/backend
interaction problems may not be duplicated. Some operating system can attach
to a running backend directly to diagnose problems.

The postgres program has a -s, -A, -t options that can be very usefull for
debugging and performance measurements.

The EXPLAIN command (see this FAQ) allows you to see how postgres95 is
iterpreting your query.

3.40) What is an oid? What is a tid?

Oids are Postgres's answer to unique row ids or serial columns. Every row
that is created in Postgres gets a unique oid. All oids generated by initdb
are less than 16384 (from backend/access/transam.h). All post-initdb
(user-created) oids are equal or greater that this. All these oids are
unique not only within a table, or database, but unique within the entire
postgres installation.

Postgres uses oids in its internal system tables to link rows in separate
tables. These oids can be used to identify specific user rows and used in
joins. It is recommended you use column type oid to store oid values. See
the sql(l) manual page to see the other internal columns.

Tids are used to indentify specific physical rows with block and offset
values. Tids change after rows are modified or reloaded. They are used by
index entries to point to physical rows. They can not be accessed through
sql.

3.41) What is the meaning of some of the terms used in Postgres?

Some of the source code and older documentation use terms that have more
common usage. Here are some:

   * row, record, tuple
   * attribute, field, column
   * table, class
   * retrieve, select
   * replace, update
   * oid, serial value
   * portal, cursor
   * range variable, table name, table alias

Please let me know if you think of any more.

----------------------------------------------------------------------------

Section 4: Extending Postgres95

4.1) I wrote a user-defined function and when I run it in psql, it dumps
core.

The problem could be a number of things. Try testing your user-defined
function in a stand alone test program first. Also, make sure you are not
sending elog NOTICES when the front-end is expecting data, such as during a
type_in() or type_out() functions

4.2) I get messages of the type NOTICE:PortalHeapMemoryFree: 0x402251d0 not
in alloc set!

You are pfree'ing something that was not palloc'ed. When writing
user-defined functions, do not include the file "libpq-fe.h". Doing so will
cause your palloc to be a malloc instead of a free. Then, when the backend
pfrees the storage, you get the notice message.

4.3) I've written some nifty new types and functions for Postgres95.

Please share them with other postgres95 users. Send your extensions to
mailing list, and they will eventually end up in the contrib/ subdirectory.

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

This requires extreme wizardry, so extreme that the authors have not ever
tried it, though in principle it can be done. The short answer is ... you
can't. This capability is forthcoming in the future.

----------------------------------------------------------------------------

Section 5: Bugs

5.1) How do I find out about bug fixes?

The directory ftp://ftp.ki.net/pub/postgres95 contains patches for the
latest release.

5.2) How do I make a bug report?

First, check to see that your bug is not one that has already been fixed
(question 5.1). Then, fill out the "bug-template" file and send it to:

   * pg95-dev@@ki.net

This is the address of the developers mailing list.
@


1.2
log
@New FAQ.
@
text
@d3 1
a3 1
Last updated: Fri Sep 27 17:48:23 EDT 1996
d11 6
d19 1
a19 1
   * *3.23) How do I create a serial field?
d250 1
a250 1
The latest release of postgres95 is version 1.07.
d286 1
a286 1
Postgres95 v1.07 is compatible with databases created with v1.01. Those
d555 1
a555 1
http://www.openlinksw.com/postgre s.html. It works with our standard ODBC
d635 2
a636 2
1.07 or 2.* with pgdump's -o option or COPY's WITH OIDS option to preserver
the oids.
d780 2
a781 1
used by the engine for rollback and crash recovery.
d862 2
@


1.1
log
@Initial revision
@
text
@a0 1
==================================================
a1 2
==================================================
last updated:		Sun Aug 11 01:35:34 EDT 1996
d3 2
a4 2
current maintainer:	Bruce Momjian (maillist@@candle.pha.pa.us)
original author:	Jolly Chen (jolly@@cs.berkeley.edu)
d6 10
a15 13
changes in this version (* = modified, + = new):
* 1.8)	What documentation is available for Postgres95?
* 3.13)	What is the maximum size for a tuple?
* 3.14)	I defined indices but my queries don't seem to make use of them. Why?
* 3.37)	What is the time-warp feature and how does it relate to vacuum?
+ 3.38)	How do I tune the database engine for better performace?

This file is divided approximately as follows:
1.*)	General questions
2.*)	Installation questions
3.*)	Postgres95 Features questions
4.*)	Questions about extending Postgres95
5.*)	Bugs
a17 137
1.1)	What is Postgres95?
1.2)	What does Postgres95 run on?
1.3)	Where can I get Postgres95?
1.4)	What's the copyright on Postgres95?
1.5)	Support for Postgres95
1.6)	Future releases of Postgres95
1.7)	Is there a commercial version of Postgres95?
1.9)	What version of SQL does Postgres95 use?
1.10)	Does Postgres95 work with databases from earlier versions of postgres?
1.11)	How many people use Postgres95?
2.1)	I get the error "cpp: command not found"  when I try to compile
2.2)	I get 'yy_flush_buffer undefined' when I try to compile the backend
2.3)	initdb doesn't run
2.4)	when I start up the postmaster, I get
2.5)	The system seems to be confused about commas, decimal points, and
2.6)	How do I install postgres95 somewhere other than /usr/local/postgres95?
2.7)	The backend compiled successfully, but compiling libpq resulted
	in a complaint:	"libpq/pqcomm.h" not found when compiling fe-auth.c.
2.8)	Where can I find the bug fixes for postgres95?
2.9)	I can't apply the patches even though everything looks like it should
	work. 
2.10)	When I run postmaster, I get a Bad System Call core dumped message.
2.11)	I get the error message "obj/fmgr.h: No such file or directory"
2.12)	When I try to start the postmaster, I get IpcMemoryCreate errors.
2.13)	I get the strange make errors right at the beginning:
2.14)	I have changed a source file, but a recompile does not see the
3.1)	How do I specify a KEY or other constraints on a column?
3.2)	Does Postgres95 support nested subqueries?
3.3)	How do I define a unique indices?
3.4)	I've having a lot of problems with using rules.
3.5)	I can't seem to write into the middle of large objects reliably.
3.6)	Does postgres95 have a graphical user interface?  A report
3.7)	How can I write client applications to Postgres95?
3.8)	How do I prevent other hosts from accessing my Postgres95
3.9)	How do I set up a pg_group?
3.10)	What is the exact difference between binary cursors and normal cursors?
3.11)	Why doesn't the != operator work?
3.12)	What is a R-tree index and what is it used for?
3.13)	What is the maximum size for a tuple?
3.14)	I defined indices but my queries don't seem to make use of them. Why?
3.15)	Are there ODBC drivers for Postgres95?
3.16)	How do I use postgres for multi-dimensional indexing (> 2 dimensions)?
3.17)	How do I do regular expression searches?  case-insensitive
	regexp searching?
3.18)	I can't access the database as the 'root' user.
3.19)	I experienced a server crash during a vacuum.  How do I remove the
	lock file?
3.20)	What is the difference between the various character types?
3.21)	In a query, how do I detect if a field is NULL?
3.22)	How do I see how the query optimizer is evaluating my query?
3.23)	How do I create a serial field?
3.24)	How do I create a multi-column index?
3.25)	What are the temp_XXX files in my database directory?
3.26)	Why are my table files not getting any smaller after a delete?
3.27)	Why can't I connect to my database from another machine?
3.28)	I get the error 'default index class unsupported' when creating an
	index.  How do I do it?
3.29)	Why does creating an index crash the backend server?
3.30)	How do I specify a decimal constant as a float8, or a string as a text?
3.31)	How do I find out what indexes or operations are defined in the
	database?
3.32)	My database is corrupt.  I can't do anything.  What should I do?
3.33)	Createdb, destroydb, createuser,destroyuser don't run.  Why?
3.34)	Why does 'createuser' return 'unexpected last match in input()'?
3.35)	All my servers crash under concurrent table access.  Why?
3.36)	What tools are available for hooking postgres to Web pages?
3.37)	What is the time-warp feature and how does it relate to vacuum?
3.38)	How do I tune the database engine for better performace?
4.1)	I wrote a user-defined function and when I run it in psql, it
	dumps core. 
4.2)	I get messages of the type NOTICE:PortalHeapMemoryFree: 0x402251d0
4.3)	I've written some nifty new types and functions for Postgres95.  
4.4)	How do I write a C function to return a tuple?
5.1)	How do I find out about bug fixes?
5.2)	How do I make a bug report?


----------------------------------------------------------------------
Section 1:	General Questions
----------------------------------------------------------------------

1.1)	What is Postgres95?

	Postgres95 is an enhancement of the POSTGRES database
	management system, a next-generation DBMS research prototype. 
	While Postgres95 retains the powerful data model and rich data
	types of POSTGRES, it replaces the PostQuel query language with an
	extended subset of SQL.  Postgres95 is free and the complete
	source is available. 

	Postgres95 development is being performed by a team of Internet
	developers who all subscribe to the Postgres95 development mailing
	list.  The current coordinator is Marc G. Fournier (scrappy@@ki.net). 
	(See below on how to join).  This team is now responsible for all
	current and future development of Postgres95.

	The authors of Postgres95 1.01 were Andrew Yu and Jolly Chen.
	Many others have contributed to the porting, testing, debugging and
	enhancement of the code.  The original Postgres code, from which
	Postgres95 is derived, was the effort of many graduate
	students, undergraduate students, and staff programmers
	working under the direction of Professor Michael Stonebraker
	at the University of California, Berkeley. 

1.2)	What does Postgres95 run on?

	The authors have compiled and tested Postgres95 on the following
	platforms(some of these compiles require gcc 2.7.0):

        - DEC Alpha AXP on OSF/1 2.0
        - HP PA-RISC on HP-UX 9.0
        - i386 Solaris
        - SUN SPARC on Solaris 2.4
        - SUN SPARC on SunOS 4.1.3
        - DEC MIPS on Ultrix 4.4
        - Intel x86 on Linux 1.2 and Linux ELF
        - OSs derived from 4.4-lite BSD (NetBSD, FreeBSD)
        - IBM on AIX 3.2.5
        - BSD/OS 2.0, 2.01 & 2.1
        - SGI MIPS on IRIX 5.3

	The following ports are bundled with the Postgres95 distribution. The
	authors do not have handy access to these platforms but the
	ports have been tested by the others.

        - Motorola MC68K or Intel x86 on NeXTSTEP 3.2
        - Intel x86 on Intel SVR4

1.3)	Where can I get Postgres95?
	
	The primary anonymous ftp site for postgres95 is:

		ftp://ftp.ki.net/pub/postgres95

	A mirror site exists at:
		
		ftp://postgres95.vnet.net/pub/postgres95
d19 161
a179 1
1.4)	What's the copyright on Postgres95?
a180 2
	Postgres95 is subject to the following COPYRIGHT.
	
d192 3
a194 3
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
d197 3
a199 3
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
d202 252
a453 1
1.5)	Support for Postgres95
d455 138
a592 385
	There is no official support for Postgres95 from the original
	maintainers or from University of California, Berkeley.  It is
	maintained through volunteer effort only.

	With the generosity of the Jason Wright and others at Vnet,
        the postgres95 mailing list now has a new home --
	postgres95@@postgres95.vnet.net.  It is available for
	discussion of matters pertaining to Postgres95, including but
	not limited to bug reports and fixes. For info on how to
	subscribe, send a mail with the lines in the body (not the
	subject line): 
		help
		info postgres95
	to 
		majordomo@@postgres95.vnet.net

	There is also a digest list available.  To subscribe to this list,
	send email to majordomo@@postgres95.vnet.net with a BODY of:
		subscribe postgres95-digest
	Digests are sent out to members of this list whenever the main list has
	received around 30k of messages.

	Archives and digests of the new mailing list at Vnet can be found at:
		ftp://postgres95.vnet.net/pub/postgres95/archives
		ftp://postgres95.vnet.net/pub/postgres95/digests

	There is also a developers mailing list available.  To subscribe to
	this list, send email to pg95-dev-request@@ki.net with a BODY of:

		subscribe pg95-dev

	Additional information about Postgres95 can be found via the
	postgres95 WWW home page at:
		http://www.ki.net/postgres95

1.6)	Future releases of Postgres95

	The latest release of postgres95 is version 1.02.

1.7)	Is there a commercial version of Postgres95?
 
	Illustra Information Technology (a wholly owned subsidiary of 
	Informix Software, Inc.) sells an object-relational
	DBMS called Illustra that was originally based on postgres.
	Illustra has cosmetic similarities to postgres95 but has more
	features, is more robust, performs better, and offers real
	documentation and support.  On the flip side, it costs money.
	For more information, contact sales@@illustra.com

1.8)	What documentation is available for Postgres95?

	A user manual, manual pages, and some small test examples
        are included in the distribution.  The www page contains
	pointers to an implementation guide and five papers written
	about postgres design concepts and features.

1.9)	What version of SQL does Postgres95 use?

	Postgres95 supports a subset of SQL-92.  It has most of the
	important constructs but lacks some of the functionality.
	The most visible differences are:
		- no support for primary keys or column constraints
		- no support for nested subqueries
		- no HAVING clause under a GROUP BY

	On the other hand, you get to create user-defined types,
	functions, inheritance etc.  If you're willing to help with
        postgres95 coding, eventually we can also add the missing
        features listed above. 
	
1.10)	Does Postgres95 work with databases from earlier versions of postgres?
	
	Postgres95 v1.02 is compatible with databases created with v1.01.
	Those upgrading from 1.0 to 1.02 should read the directions in the
	MIGRATION_1.0_TO_1.02 directory.

1.11)	How many people use Postgres95?

	Since we don't have any licensing or registration scheme, it's
	impossible to tell.  We do know hundreds copies of postgres95 
	v1.* have been downloaded, and that there many hundreds of 
	subscribers to the mailing lists.
	
----------------------------------------------------------------------
Section 2:	Installation Questions
----------------------------------------------------------------------

2.1)	I get the error "cpp: command not found"  when I try to compile
the backend. 

	Edit the src/backend/utils/Gen_fmgrtab.sh script to include the path
	for the cpp for your particular site. 

2.2)	I get 'yy_flush_buffer undefined' when I try to compile the backend

	Use a more recent version of flex, version 2.5.2.  Version 2.5.3
	has a known bug.

2.3)	initdb doesn't run

	* check to see that you have the proper paths set
	* check that the 'postgres' user owns all the right files
	* ensure that there are files in $PGDATA/files, and that they 
	  are non-empty.  If they aren't, then "gmake install" failed for
	  some reason   

2.4)	when I start up the postmaster, I get
		"FindBackend: could not find a backend to execute..."
		"postmaster: could not find backend to execute..."

	You probably do not have the right path set up. the 'postgres'
	executable needs to be in your path.  

2.5)	The system seems to be confused about commas, decimal points, and
date formats.

	Check your locale configuration. postgres95 uses the locale
	settings of the user that ran the postmaster process.  Set those
	accordingly for your operating environment. 

2.6)	How do I install postgres95 somewhere other than /usr/local/postgres95?

	You need to manually edit the paths in src/Makefile.global to 
	your site configuration.

2.7)	The backend compiled successfully, but compiling libpq resulted
	in a complaint:	"libpq/pqcomm.h" not found when compiling fe-auth.c.

	You've probably installed postgres95 somewhere other than
	/usr/local/postgres, but didn't edit the src/Makefile.global
	accordingly.  See question 2.6.

2.8)	Where can I find the bug fixes for postgres95?

	The patches should be applied in the order listed.  The patch files
	can be ftp'ed directly from the directory:
  	   ftp://ftp.ki.net/pub/postgres95

2.9)	I can't apply the patches even though everything looks like it should
	work. 

	If you cut and paste directly off your web browser, tabs and 
	whitespaces may not be preserved properly.  Use the 'save as file'
	option from your web browser instead.

2.10)	When I run postmaster, I get a Bad System Call core dumped message.

	It could be a variety of problems, but first check to see that you
	have system V extensions installed on your kernel.  Postgres95 
	requires kernel support for shared memory.

2.11)	I get the error message "obj/fmgr.h: No such file or directory"

	This indicates that you did not generate the file fmgr.h
	properly.  Something failed in the running of the
	src/backend/utils/Gen_fmgrtab.sh script.  Check to see the
        paths used in that script is appropriate to your system.
 
2.12)	When I try to start the postmaster, I get IpcMemoryCreate errors.

	You either do not have shared memory configured properly in kernel
	or you need to enlarge the shared memory available in the kernel.
	The exact amount you need depends on your architecture and how
	many buffers you configure postmaster to run with.   For most
	systems, with default buffer sizes, you need a minimum of ~760K.  

2.13)	I get the strange make errors right at the beginning:
		warning: NUL character seen; rest of line ignored
		*** missing separator.  Stop.
	or
		Is a directory.  Stop.

	Eliminate any whitespaces at the end of the PORTNAME line in
	Makefile.global.  Extraneous tabs or spaces will confuse the make
	templates.

2.14)	I have changed a source file, but a recompile does not see the
change?

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

----------------------------------------------------------------------
Section 3:	Postgres95 Features
----------------------------------------------------------------------

3.1)	How do I specify a KEY or other constraints on a column?

	Column constraints are not supported in postgres95.
	As a consequence, the system does not check for duplicates. 
	
3.2)	Does Postgres95 support nested subqueries?

	Subqueries are not implemented, but they can be simulated using sql
	functions.

3.3)	How do I define a unique indices?

	Postgres95 does not support unique indices.  Defining an index does
	not preclude insertion of duplicate index key values.

3.4)	I've having a lot of problems with using rules.
	
	Currently, the rule system in postgres95 is mostly broken.  It
	works enough to support the view mechanism, but that's about it.  Use
	postgres95 rules at your own peril.

3.5)	I can't seem to write into the middle of large objects reliably.

	The Inversion large object system in postgres95 is also
	mostly broken.  It works well enough for storing large wads
	of data and reading them back out, but the implementation has
	some underlying problems.  Use postgres95 large objects at
	your own peril. 

3.6)	Does postgres95 have a graphical user interface?  A report
generator? A embedded query language interface?  

	No. No. No.  Not in the official distribution at least.  Some
	users have reported some success at using 'pgbrowse' and 'onyx' as
	frontends to postgres95.  Several contributions are working on
        tk based frontend tools.  Ask on the mailing list.
	
3.7)	How can I write client applications to Postgres95?

	Postgres95 supports a C-callable library interface called libpq
	as well as a Tcl-based library interface called libtcl.

	Others have contributed a perl interface and a WWW gateway
	to postgres95.  See the postgres95 home pages for more details. 

3.8)	How do I prevent other hosts from accessing my Postgres95
	backend?
	
        Use host-based authentication by modifying the file
	$PGDATA/pg_hba accordingly.

3.9)	How do I set up a pg_group?
	
	Currently, there is no easy interface to set up user groups.
	You have to explicitly insert/update the pg_group table.  For example:

	jolly=> insert into pg_group (groname, grosysid, grolist)
	jolly=>     values ('posthackers', '1234', '{5443, 8261}');
	INSERT 548224
	jolly=> grant insert on foo to group posthackers;
	CHANGE
	jolly=> 

	The fields in pg_group are:
		groname:  the group name.  This a char16 and should
			  be purely alphanumeric.  Do not include underscores
			  or other punctuation.
		grosysid: the group id.  This is an int4. 
			  This should be unique for each group.
		grolist:   the list of pg_user id's that belong in the group.
			  This is an int4[].

3.10) What is the exact difference between binary cursors and normal cursors?

	Normal cursors return data back in ASCII format.  Since data is stored
	natively in binary format, the system must do a conversion to produce
	the ASCII format.  In addition, ASCII formats are often large in size
	than binary format.  Once the attributes come back in ASCII, often the
	client application then has to convert it to a binary format to
	manipulate it anyway. 
	
	Binary cursors give you back the data in the native binary
	representation.  Thus, binary cursors will tend to be a little faster
	since there's less overhead of conversion. 
	
	However, ASCII is architectural neutral whereas binary representation
	can differ between different machine architecture.  Thus, if your client
	machine uses a different representation than you server machine, getting
	back attributes in binary format is probably not what you want.  Also,
	if your main purpose is displaying the data in ASCII, then getting it
	back in ASCII will save you some effort on the client side.

3.11)	Why doesn't the != operator work?
		
	SQL specifies <> as the inequality operator, and that is what
	we have defined for the built-in types.  You are free, however, to
	extend postgres95 to include the != operator if you like.  

3.12)	What is a R-tree index and what is it used for?

	An r-tree index is used for indexing spatial data. A hash index can't
	handle range searches. A B-tree index only handles range searches in a
	single dimension. R-tree's can handle multi-dimensional data.  For
	example, if a R-tree index can be built on an attribute of type
	'point', the system can more efficient answer queries like select all
	points within a bounding rectangle.
	
	The canonical paper that describes the original R-Tree design is:
	
	Guttman, A. "R-Trees: A Dynamic Index Structure for Spatial Searching."
	Proc of the 1984 ACM SIGMOD Int'l Conf on Mgmt of Data, 45-57.
	
	You can also find this paper in Stonebraker's "Readings in Database
	Systems"

3.13)	What is the maximum size for a tuple?

	Tuples are limited to 8K bytes.  Taking into account system attributes
	and other overhead, one should stay well shy of 8,000 bytes to be on
	the safe side.   To use attributes larger than 8K, try using the large
	objects interface.

	Tuples do not cross 8k boundaries so a 5k tuple will require 8k
	of storage.

3.14)	I defined indices but my queries don't seem to make use of them. Why?
	
	Postgres95 does not automatically maintain statistics.  One has to
	make an explicit 'vacuum' call to update the statistics.   After
	statistics are updated, the optimizer has a better shot at using
	indices.  Note that the optimizer is limited and does not use indices
	in some circumstances (such as OR clauses).

	If the system still does not see the index, it is probably because you
	have created an index on a field with the improper *_ops type.  For
	example, you have created a CHAR(4) field, but have specified a 
	char_ops index type_class.
	
	See the create_index manual page for information on what type classes
	are available.  It must match the field type.
	
	Postgres does not warn the user when the improper index is created.

	Indexes not used for ORDER BY operations.

3.15)	Are there ODBC drivers for Postgres95?

	PostODBC is available as an ODBC driver for Postgres95.

	For all people being interested in PostODBC, a freely available ODBC
	driver for Postgres95, there are now two mailing lists devoted to the
	discussion of PostODBC. The mailing lists are:
	
	        postodbc-users@@listserv.direct.net
	and
	        postodbc-developers@@listserv.direct.net
	
	these lists are ordinary majordomo mailing lists.  You can subscribe
	by sending a mail to
	
	        majordomo@@listserv.direct.net

3.16)	How do I use postgres for multi-dimensional indexing (> 2 dimensions)?
	
	Builtin R-Trees can handle polygons and boxes.  In theory, R-trees can
	be extended to handle higher number of dimensions.  In practice,
	extending R-trees require a bit of work and we don't currently have
	any documentation on how to do it. 

3.17)	How do I do regular expression searches?  case-insensitive
regexp searching?
	
	Postgres95 supports the SQL LIKE syntax as well as more general
	regular expression searching with the ~ operator.  The !~ is the
	negated regexp operator.  ~* and !~* are the case-insensitive regular
	expression operators.

3.18)	I can't access the database as the 'root' user.

	You should not create database users with user id 0(root).  They will 
	be unable to access the database.  This is a security precaution 
	because of the ability of any user to dynamically link object modules 
	into the database engine.

3.19)	I experienced a server crash during a vacuum.  How do I remove the
lock file?
	
	If the server crashes during a vacuum command, chances are it will
	leave a lock file hanging around.  Attempts to re-run the vacuum
	command result in 
		WARN:can't create lock file -- another vacuum cleaner running?
	
	If you are sure that no vacuum is actually running, you can remove the
	file called "pg_vlock" in your database directory (which is
	$PGDATA/base/<dbName>)

3.20)	What is the difference between the various character types?
	
Type		Internal Name	Notes
d594 29
a622 105
CHAR		char		1 character   }
CHAR2		char2		2 characters  }
CHAR4		char4		4 characters  } optimized for a fixed length
CHAR8		char8		8 characters  }
CHAR16		char16		16 characters }
CHAR(#)		bpchar		blank padded to the specified fixed length
VARCHAR(#)	varchar		size specifies maximum length, no padding
TEXT		text		length limited only by maximum tuple length
BYTEA		bytea		variable-length array of bytes
	
	Remember, you need to use the internal name when creating indexes
	on these fields or when doing other internal operations.
	
	The last four types above are "varlena" types (i.e. the first
	four bytes is the length, followed by the data).  CHAR(#) and
	VARCHAR(#) allocate the maximum number of bytes no matter how
	much data is stored in the field.  TEXT and BYTEA are the only
	character types that have variable length on the disk.
 
3.21)	In a query, how do I detect if a field is NULL?

	Postgres95 has two builtin keywords, "isnull" and "notnull" (note no
	spaces).  For example:
		select * from tbl where field isnull
	will return rows from tbl where the field is null valued.

3.22)	How do I see how the query optimizer is evaluating my query?

	Place the word 'EXPLAIN' at the beginning of the query, for example:

	EXPLAIN SELECT * FROM table1 WHERE age = 23;

3.23)	How do I create a serial field?
	
	There is no way to create a serial or unique field in Postgres95.  You
	can use each row's oid field as a unique value.  However, if you need
	to dump and reload the database, you will be assigned new oid's. 
	There is no way to restore the original oids.
	
	One valid way of doing this is to create a function:
	
	create table my_oids (f1 int4);
	insert into my_oids values (1);
	create function new_oid () returns int4 as 
		'update my_oids set f1 = f1 + 1;  select f1 from my_oids; ' 
	language 'sql';
	
	then:
	
	create table my_stuff (my_key int4, value text);
	insert into my_stuff values (new_oid(), 'hello');

	However, keep in mind there is a race condition here where one
	server could do the update, then another one do an update, and
	they both could select the same new id.  This statement should
	be performed within a transaction.

3.24)	How do I create a multi-column index?

	You can not directly create a multi-column index using create index. 
	You need to define a function which acts on the multiple columns, then
	use create index with that function.

3.25)	What are the temp_XXX files in my database directory?

	They are temp_ files generated by the query executor.  For example,
	if a sort needs to be done to satisfy an ORDER BY, some temp files are
	generated as a result of the sort.  
	
	If you have no transactions or sorts running at the time, it is safe to
	delete the temp_ files.

3.26)	Why are my table files not getting any smaller after a delete?
	
	If you run vacuum, unused rows will be marked for reuse, but the file
	blocks are not released.  We could move the unused rows to the end of
	the file and use ftruncate() to decrease the file size, but no one has
	implemented this yet.

3.27)	Why can't I connect to my database from another machine?
	
	The default configuration allows only connections from tcp/ip host
	localhost.  You need to add a host entry to the file 
	postgres95/data/pg_hba.

3.28)	I get the error 'default index class unsupported' when creating an
index.  How do I do it?
	
	You probably used:
	
		create index idx1 on person using btree (name);
	
	Postgres95 indexes are extensible, and therefore you must specify a
	class_type when creating an index.  Read the manual page for create
	index (called create_index).

3.29)	Why does creating an index crash the backend server?
	
	You have probably defined an incorrect *_ops type class for the field
	you are indexing.

3.30)	How do I specify a decimal constant as a float8, or a string as a text?
	
	Use the :: operator.  It is needed only when the default promotion
	rules fail. i.e.:
d624 1
a624 1
		insert into tab1 values (4.23::float8, '2343'::text)
d626 79
a704 1
3.31)	How do I find out what indexes or operations are defined in the
a705 4
	
	Run the file postgres95/src/tutorial/syscat.source.  It illustrates
	many of the 'select's needed to get information out of the database
	system tables.
d707 58
a764 1
3.32)	My database is corrupt.  I can't do anything.  What should I do?
d766 3
a768 5
	The 1.02 release has a README file and utility that describes a
	possible cause of the problem and a workaround.  See the file
	postgres95/contrib/zap_ltv/README for more information.  Also
	please contact the README author to help generate a complete 
	fix for this bug.
d770 2
a771 1
	This bug may be fixed in 1.02.
d773 2
a774 1
3.33)	Createdb, destroydb, createuser,destroyuser don't run.  Why?
d776 1
a776 1
	Release 1.02 does not have this problem.
d778 3
a780 6
	The 1.01 release of postgres95 uses a variable called PAGER to
	filter the output of SELECT statements.  Unfortunately, this
	PAGER is used even when the standard output is not a terminal.
	Upgrade to 1.02, due out August 1996, or undefine your PAGER
	variable.  There is also a patch located in the July archives of
	the mailing list that fixes this problem on 1.01.
d782 4
a785 1
3.34)	Why does 'createuser' return 'unexpected last match in input()'?
d787 1
a787 4
	You have compile postgres with flex version 2.5.3.  There is bug
	in this version of flex.  Use flex version 2.5.2 instead.  There
	is a doc/README.flex file which will properly patch the flex 2.5.3
	source code.
d789 2
a790 1
3.35)	All my servers crash under concurrent table access.  Why?
d792 2
a793 2
	This problem can be caused by a kernel that is not configured to
	support semaphores.
d795 3
a797 1
3.36)	What tools are available for hooking postgres to Web pages?
d799 2
a800 2
	For web integration, PHP/FI is an excellent interface. The URL for
	that is http://www.vex.net/php/
d802 7
a808 2
	PHP is great for simple stuff, but for more complex stuff, some
	still use the perl interface and CGI.pm.
d810 8
a817 2
	An example of using WWW with C to talk to Postgres is can be
	tried at:
d819 2
a820 1
		http://www.ki.net/~mlc
d822 2
a823 1
3.37)	What is the time-warp feature and how does it relate to vacuum?
d825 1
a825 7
	Postgres95 handles data changes differently than most database
	systems.  When a row is changed in a table, the original row
	is marked with the time it was changed, and a new row is created
	with the current data.  By default, only current rows are used
	in a table.  If you specify a date/time after the table name in
	a FROM clause, you can access the data that was current at that
	time, i.e.
d827 6
a832 2
		SELECT *
		FROM employees ['July 24, 1996 09:00:00']
d834 4
a837 3
	displays employee rows in the table at the specified time.
	You can specify intervals like [date,date], [date,], [,date],
	or [,].  This last option accesses all rows that ever existed.
d839 4
a842 2
	INSERTed rows get a timestamp too, so rows that were not in
	the table at the desired time will not appear.
d844 1
a844 2
	Vacuum removes rows that are no longer current.  This time-warp
	feature is used by the engine for rollback and crash recovery.
d846 2
a847 1
3.38)	How do I tune the database engine for better performace?
d849 6
a854 4
	There are two things that can be done.  You can use Openlink's
	option to disable fsync() by starting the postmaster with a 
	'-o -F' option.  This will prevent fsync()'s from flushing to
	disk after every transaction.
d856 1
a856 5
	You can also use the postmaster -B option to increase the number
	of shared memory buffers shared among the backend processes.  If
	you make this parameter too high, the process will not start or
	crash unexpectedly.  Each buffer is 8K and the defualt is 64
	buffers.
d858 1
d860 1
d862 2
a863 3
----------------------------------------------------------------------
Section 4:	Extending Postgres95
----------------------------------------------------------------------
d865 4
a868 2
4.1)	I wrote a user-defined function and when I run it in psql, it
dumps core. 
d870 2
a871 5
	The problem could be a number of things.  Try testing your
	user-defined function in a stand alone test program first.
	Also, make sure you are not sending elog NOTICES when the front-end
	is expecting data, such as during a type_in() or type_out()
	functions 
d873 4
a876 2
4.2)	I get messages of the type 	
	NOTICE:PortalHeapMemoryFree: 0x402251d0 not in alloc set!
d878 1
a878 7
	You are pfree'ing something that was not palloc'ed.  When writing
	user-defined functions, do not include the file
	"libpq-fe.h".  Doing so will cause your palloc to be a malloc
	instead of a free.  Then, when the backend pfrees the storage,
	you get the notice message. 
	
4.3)	I've written some nifty new types and functions for Postgres95.  
d880 2
a881 3
	Please share them with other postgres95 users.  Send your
	extensions to mailing list, and they will eventually end up in
	the contrib/ subdirectory.
d883 1
a883 1
4.4)	How do I write a C function to return a tuple?
d885 3
a887 4
	This requires extreme wizardry, so extreme that the authors
	have not ever tried it, though in principle it can be done.  
	The short answer is ... you can't.   This capability is
	forthcoming in the future.
d889 1
a889 3
----------------------------------------------------------------------
Section 5:	Bugs
----------------------------------------------------------------------
d891 1
a891 1
5.1)	How do I find out about bug fixes?
d893 1
a893 2
	The directory ftp.ki.net:/pub/postgres95 contains patches for
	the latest release.
d895 2
a896 1
5.2)	How do I make a bug report?
d898 1
a898 3
	First, check to see that your bug is not one that has already
	been fixed (question 5.1).  Then, fill out the "bug-template"
	file and send it to:
d900 2
a901 1
		pg95-dev@@ki.net
d903 1
a903 1
	This is the address of the developers mailing list.
d905 1
@


1.1.1.1
log
@Support Docs & Contrib
@
text
@@
