[HACKERS] psql: Prompt change

2003-02-03 Thread Þórhallur Hálfdánarson
Hi

mydatabase=#

What about making this configurable, so that one could for examble change is prompt to:

me:mydatabase@myhost=#

Would a patch be accepted if I ever would get around to it? (I won't have time for the 
next few weeks, so if anyone else wants to do the implementation: feel free :)


Regards,
Tolli (still confused after issuing commands on the wrong dbhost)

-- 
Tolli
[EMAIL PROTECTED]

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] On file locking

2003-02-03 Thread Antti Haapala

 That same documentation mentions that locks acquired using flock()
 will *not* invoke the mandatory lock semantics even if on a file
 marked for it, so I guess flock() isn't implemented on top of fcntl()
 in Linux.

They're not. And there's another difference between fcntl and flock in
Linux: although fork(2) states that file locks are not inherited, locks
made by flock are inherited to children and they keep the lock even when
the parent process is killed with SIGKILL. Tested this.

Just see man syscall, there exists both
flock(2)
and
fcntl(2)



-- 
Antti Haapala
+358 50 369 3535
ICQ: #177673735


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [mail] Re: [HACKERS] Windows Build System

2003-02-03 Thread Igor Georgiev

- Original Message -
From: Justin Clift [EMAIL PROTECTED]
To: Curt Sampson [EMAIL PROTECTED]
Cc: Peter Eisentraut [EMAIL PROTECTED]; Curtis Faith
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, February 02, 2003 4:42 AM
Subject: Re: [mail] Re: [HACKERS] Windows Build System
   + It would be greatly helpful to have some way for the install program
 to automatically add the Log in as a service Win32 priviledge to the
 postgres user without having to instruct the user to do so.  We can
 create the user automatically through a shell command, but no idea how
 to add that permission.  If someone could do some Win32 API stuff to do
 it behind the scenes without a shell command even, that would be great.

   + The WinMaster project is a first go at creating a Win32 GUI command
 console for controlling the PostgreSQL service.  It's still a bit too
 basic for real use though:
 http://gborg.postgresql.org/project/winmaster/projdisplay.php
 Further suggestions, volunteers, etc are totally welcome.
 :-)
 Regards and best wishes,
 Justin Clift

 It's still a bit too  basic for real use though:
Yeah i know. I write this for my internal use.
Initial purpose of this stuff is only to avoid teaching of an old lady with
minimum computer skills to use bash and hide this ugly dos box :)
Mark L. Woodward (mlw) anounce few monts ago a self installing PostgreSQL
for Windows so
i write him about this console. He do a lof job to.
Special thanks Mark.

OK, now how to make WinMaster more usefull ?
It's open source so if any1 want use it he/she may help to
develop it.

I. Install as a service feature for winmaster are included in my plans
for future.
II.I'm thinking about direct link to PostgreSQL server instead usung
CreateProcess,
but this is unclear idea at present time. Any suggestions will be
welcome.
IIIPlease add any feature rquests to
http://gborg.postgresql.org/project/winmaster/bugs/buglist.php?fr=yes
and ideas to mailto:[EMAIL PROTECTED]

Justin you are right !!!
Further suggestions, volunteers, etc are totally welcome!!!
Further suggestions, volunteers, etc are totally welcome!!!
Further suggestions, volunteers, etc are totally welcome!!!



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] PGP signing releases

2003-02-03 Thread greg

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


 I think we should PGP sign all the official packages that are 
 provided for download from the various mirror sites.

Doesn't anyone around here read pgsql-general? :) I've been arguing for 
this over there since June of last year. I've also been signing the 
checksums with PGP and posting those to the mailing list. 

If this is done (and I am very glad to see a renewed interest forming), 
I'd like to see it done the correct way - it's too easy to get this wrong 
and could actually decrease the security of the project by providing a 
false sense of security. I think this list would be a good place to discuss 
how it would be implemented.


- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200302030948
-BEGIN PGP SIGNATURE-
Comment: http://www.gtsm.com/pgp.html

iD8DBQE+PoGQvJuQZxSWSsgRAinkAJ9HViGZIfWVvX8RswLsNfec7ln6yQCfbO+L
WjSKSr61QKkfpL6Ax0vt4Ag=
=0MK8
-END PGP SIGNATURE-



---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[HACKERS] new procedural language - PL/R

2003-02-03 Thread Joe Conway
I'm nearing completion of a new procedural language, PL/R. It provides an 
interface to the R Statistical Computing language. R is similar to the 
commercial package S-Plus; for more on R see:
  http://www.r-project.org/

Here is the first paragraph of their intro:
R is a language and environment for statistical computing and graphics. It is 
a GNU project which is similar to the S language and environment which was 
developed at Bell Laboratories (formerly ATT, now Lucent Technologies) by 
John Chambers and colleagues. R can be considered as a different 
implementation of S. There are some important differences, but much code 
written for S runs unaltered under R.

Before I post the source somewhere, I have a few questions:

1) R itself is under GPL, and as far as I can tell the shared library libR.so 
is also under GPL, not LGPL. I assume that means I need to release plr under 
GPL -- does that sound correct?

2) Knowing the trend to move stuff *out* of the PostgreSQL source tarball, and 
assuming plr is released under GPL, is there any chance that it would be 
accepted into src/pl or contrib, or should I start a gborg project (I'd prefer 
if it could at least live in contrib)? If I am somehow able to release it 
under a BSD license, would that change the answer (if so, I'll at least ask 
the r-devel list about LGPL on the shared library)?

3) The only major feature not yet developed is the ability to handle triggers. 
Any strong feelings on whether this is necessary for a first release? I see 
that pl/perl doesn't handle triggers. It seems like using a plpgsql trigger to 
call a plr function is a reasonable workaround.

Thanks for any thoughts or comments.

Joe


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


[HACKERS] v7.3.2 Tag'd and Bundle'd ...

2003-02-03 Thread Marc G. Fournier

Will announce tomorrow morning if there are no issues with it ...

%ls -lt ~ftp/pub/source/v7.3.2
total 21677
-rw-r--r--  1 pgsql  pgsql70 Feb  3 11:36 postgresql-test-7.3.2.tar.gz.md5
-rw-r--r--  1 pgsql  pgsql65 Feb  3 11:36 postgresql-7.3.2.tar.gz.md5
-rw-r--r--  1 pgsql  pgsql70 Feb  3 11:36 postgresql-base-7.3.2.tar.gz.md5
-rw-r--r--  1 pgsql  pgsql70 Feb  3 11:36 postgresql-docs-7.3.2.tar.gz.md5
-rw-r--r--  1 pgsql  pgsql69 Feb  3 11:36 postgresql-opt-7.3.2.tar.gz.md5
-rw-r--r--  1 pgsql  pgsql   1073173 Feb  3 11:36 postgresql-test-7.3.2.tar.gz
-rw-r--r--  1 pgsql  pgsql390768 Feb  3 11:36 postgresql-opt-7.3.2.tar.gz
-rw-r--r--  1 pgsql  pgsql   2534316 Feb  3 11:36 postgresql-docs-7.3.2.tar.gz
-rw-r--r--  1 pgsql  pgsql   7064688 Feb  3 11:36 postgresql-base-7.3.2.tar.gz
-rw-r--r--  1 pgsql  pgsql  11062831 Feb  3 11:35 postgresql-7.3.2.tar.gz


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[HACKERS] Win32 Technical Questions

2003-02-03 Thread Merlin Moncure
Can the ConsoleApp thing be written in C so we don't have to get an
extra C++ compiler for one file (for those who don't want to use the
Microsoft toolchain)?

Critical sections and semaphores and mutexes are all available from the
win32 API.  I agree with Peter: I am not sure it is a good idea to
introduce MFC dependency for process control and application
initializations.  This would allow compilation without having the MFC
(although, Borland supplies a version of the MFC with its non-free
compilers).  Also, a C++ compiler would not be required although this to
me as strictly an aesthetic point.

Likewise, I think the API functions are the best choice for file i/o for
possible adaption of asynch file i/o.

Despite the name, the apps written carefully using the win32 api should
generally compile ok in 64 bit environment.

Merlin



---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] PGP signing releases

2003-02-03 Thread Neil Conway
On Sun, 2003-02-02 at 21:23, Marc G. Fournier wrote:
 well, if you want to tell me the steps, I'll consider it ...

I certainly wouldn't consider myself to be an expert in PGP, but my
understanding of the basic steps is:

(1) Generate a public/private key pair for the PGDG team. This should be
used to sign all official packages.

(2) Have this PK signed by various people who can actually verify that
Marc Fournier == 'that PGP key' == 'PGDG member'.

(2) Upload the public key to PGP keyservers, like keyserver.net,
www.pgp.net, etc. as well as provide a copy of the public key on
www.postgresql.org and ftp.postgresql.org

(3) Sign official releases using the PGDG private key, and provide the
signatures on www.postgresql.org along with the packages themselves.

If someone more experienced in the use of PGP would like to comment,
please go ahead.

Cheers,

Neil
-- 
Neil Conway [EMAIL PROTECTED] || PGP Key ID: DB3C29FC




---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [HACKERS] PGP signing releases

2003-02-03 Thread Rod Taylor
 (3) Sign official releases using the PGDG private key, and provide the
 signatures on www.postgresql.org along with the packages themselves.

Sounds about right. I'd go as far as to sign release announcements and
security emails as well.

-- 
Rod Taylor [EMAIL PROTECTED]

PGP Key: http://www.rbt.ca/rbtpub.asc



signature.asc
Description: This is a digitally signed message part


Re: [HACKERS] POSIX regex performance bug in 7.3 Vs. 7.2

2003-02-03 Thread wade
At 08:31 PM 2/1/03 +0800, Christopher Kings-Lynne wrote:
Why on earth are you using a CVS version!?!?!?!

Chris

This problem manifests itself under 7.3.1 release as well.  CVS is used so
we can access patches to the SRF stuff implemented after 7.3.1 was released.

Tom... any links that document the procedure for obtaining the profile
information you requested?  I've used a profiler briefly, but am not sure
how to go about gathering information pertainent to this problematic query
only.

 -Wade Klaver.

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Win32 Technical Questions

2003-02-03 Thread Katie Ward
The only MFC dependency is CWinApp, which I agree can be replaced.  The rest
of it is written in c++ -- no MFC dependencies.  C++ is still important
because of the critical-scection locking/unlocking through automatic stack
variables.

Katie

 -Original Message-
 From: Merlin Moncure [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 03, 2003 11:51 AM
 To: Katie Ward
 Cc: [EMAIL PROTECTED]
 Subject: Win32 Technical Questions


 Can the ConsoleApp thing be written in C so we don't have to get an
 extra C++ compiler for one file (for those who don't want to use the
 Microsoft toolchain)?

 Critical sections and semaphores and mutexes are all available from the
 win32 API.  I agree with Peter: I am not sure it is a good idea to
 introduce MFC dependency for process control and application
 initializations.  This would allow compilation without having the MFC
 (although, Borland supplies a version of the MFC with its non-free
 compilers).  Also, a C++ compiler would not be required although this to
 me as strictly an aesthetic point.

 Likewise, I think the API functions are the best choice for file i/o for
 possible adaption of asynch file i/o.

 Despite the name, the apps written carefully using the win32 api should
 generally compile ok in 64 bit environment.

 Merlin




---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [HACKERS] PGP signing releases

2003-02-03 Thread Greg Copeland
On Sun, 2003-02-02 at 20:23, Marc G. Fournier wrote:

 right, that is why we started to provide md5 checksums ...

md5 checksums only validate that the intended package (trojaned or
legit) has been properly received.  They offer nothing from a security
perspective unless the checksums have been signed with a key which can
be readily validated from multiple independent sources.

Regards,

-- 
Greg Copeland [EMAIL PROTECTED]
Copeland Computer Consulting


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] Win32 Powerfail testing - results

2003-02-03 Thread Dave Page
 Vince Vielhaber allegedly said:
 On Mon, 3 Feb 2003, Dave Page wrote:

 Run | Errors Detected
 =
  07 | COUNT CHECK - Duplicate or missing rows detected (10262)!! 09 |
  DISTINCT CHECK - Duplicate or missing rows detected (9893)!!
 | COUNT CHECK - Duplicate or missing rows detected (9893)!!
  14 | COUNT CHECK - Duplicate or missing rows detected (10024)!!

 Out of curiousity, what was required to return things to normal
 again?

I ran the test app in reset mode which drops the table, then re-creates it
and populates it with fresh data. I thought it best to drop first to
eliminate possible problems with corrupt, but invisible tuples (if such a
thing could have occured).
Regards, Dave.



---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] new procedural language - PL/R

2003-02-03 Thread Joe Conway
Tom Lane wrote:

Joe Conway [EMAIL PROTECTED] writes:

2) Knowing the trend to move stuff *out* of the PostgreSQL source tarball, and 
assuming plr is released under GPL, is there any chance that it would be 
accepted into src/pl or contrib, or should I start a gborg project (I'd prefer 
if it could at least live in contrib)?

I think we'd have to insist on gborg.  The only reason there are any
non-BSD-license items left in contrib is that I haven't finished my TODO
item to get their licenses changed or remove 'em.


Thanks for the confirmation. That's what I suspected.


If I am somehow able to release it 
under a BSD license, would that change the answer (if so, I'll at least ask 
the r-devel list about LGPL on the shared library)?

BSD would be good.  I agree that it'll be a pain in the neck to
maintain a PL that is not in the main tree, so I'd support accepting it
if we can get the license right.


OK -- I'll see what they have to say about it over on r-devel.



3) The only major feature not yet developed is the ability to handle triggers. 
Any strong feelings on whether this is necessary for a first release?

No.  I'm not sure you'd really need triggers written in R ever ;-)


Yeah, that's what I figured too.

Thanks for the feedback!

Joe



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] v7.3.2 Tag'd and Bundle'd ...

2003-02-03 Thread Lamar Owen
On Monday 03 February 2003 11:38, Marc G. Fournier wrote:
 Will announce tomorrow morning if there are no issues with it ...

Where did the following three man pages go?
man1/clusterdb.1
man1/pg_controldata.1
man1/pg_resetxlog.1

In 7.3.1 they were at:
./postgresql-7.3.1/doc/man1/clusterdb.1
./postgresql-7.3.1/doc/man1/pg_controldata.1
./postgresql-7.3.1/doc/man1/pg_resetxlog.1

Do we have the right docs?  Hmmm The 7.3.2 tarball has the wrong man pages 
-- looks like maybe the 7.2 ones, as there's a pg_access.1 in it, but 7.3.1 
doesn't have that.  Directory listing of the doc/man1 dir:
[lowen@localhost BUILD]$ ls postgresql-7.3.2/doc/man1
createdb.1dropuser.1  pgaccess.1pg_passwd.1   postmaster.1
createlang.1  ecpg.1  pg_config.1   pg_restore.1  psql.1
createuser.1  initdb.1pg_ctl.1  pgtclsh.1 vacuumdb.1
dropdb.1  initlocation.1  pg_dump.1 pgtksh.1
droplang.1ipcclean.1  pg_dumpall.1  postgres.1
[lowen@localhost BUILD]$ ls postgresql-7.3.1/doc/man1
clusterdb.1   droplang.1  ipcclean.1pg_dumpall.1postgres.1
createdb.1dropuser.1  pg_config.1   pg_resetxlog.1  postmaster.1
createlang.1  ecpg.1  pg_controldata.1  pg_restore.1psql.1
createuser.1  initdb.1pg_ctl.1  pgtclsh.1   vacuumdb.1
dropdb.1  initlocation.1  pg_dump.1 pgtksh.1
[lowen@localhost BUILD]$
-- 
Lamar Owen
WGCR Internet Radio
1 Peter 4:11


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] PGP signing releases

2003-02-03 Thread Kurt Roeckx
On Mon, Feb 03, 2003 at 12:24:14PM -0600, Greg Copeland wrote:
 On Sun, 2003-02-02 at 20:23, Marc G. Fournier wrote:
 
  right, that is why we started to provide md5 checksums ...
 
 md5 checksums only validate that the intended package (trojaned or
 legit) has been properly received.  They offer nothing from a security
 perspective unless the checksums have been signed with a key which can
 be readily validated from multiple independent sources.

If you can get the md5 sum of multiple independent sources,
it's about the same thing.  It all depends on how much you trust
those sources.

I'm not saying md5 is as secure as pgp, not at all, but you can't
trust those pgp keys to be the real one either.


Kurt


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] v7.3.2 Tag'd and Bundle'd ...

2003-02-03 Thread Marc G. Fournier

oh joy, here we go again ...

you are right, my mistake :(  I copied out of peter's directory ... fixing
now ...


On Mon, 3 Feb 2003, Lamar Owen wrote:

 On Monday 03 February 2003 11:38, Marc G. Fournier wrote:
  Will announce tomorrow morning if there are no issues with it ...

 Where did the following three man pages go?
 man1/clusterdb.1
 man1/pg_controldata.1
 man1/pg_resetxlog.1

 In 7.3.1 they were at:
 ./postgresql-7.3.1/doc/man1/clusterdb.1
 ./postgresql-7.3.1/doc/man1/pg_controldata.1
 ./postgresql-7.3.1/doc/man1/pg_resetxlog.1

 Do we have the right docs?  Hmmm The 7.3.2 tarball has the wrong man pages
 -- looks like maybe the 7.2 ones, as there's a pg_access.1 in it, but 7.3.1
 doesn't have that.  Directory listing of the doc/man1 dir:
 [lowen@localhost BUILD]$ ls postgresql-7.3.2/doc/man1
 createdb.1dropuser.1  pgaccess.1pg_passwd.1   postmaster.1
 createlang.1  ecpg.1  pg_config.1   pg_restore.1  psql.1
 createuser.1  initdb.1pg_ctl.1  pgtclsh.1 vacuumdb.1
 dropdb.1  initlocation.1  pg_dump.1 pgtksh.1
 droplang.1ipcclean.1  pg_dumpall.1  postgres.1
 [lowen@localhost BUILD]$ ls postgresql-7.3.1/doc/man1
 clusterdb.1   droplang.1  ipcclean.1pg_dumpall.1postgres.1
 createdb.1dropuser.1  pg_config.1   pg_resetxlog.1  postmaster.1
 createlang.1  ecpg.1  pg_controldata.1  pg_restore.1psql.1
 createuser.1  initdb.1pg_ctl.1  pgtclsh.1   vacuumdb.1
 dropdb.1  initlocation.1  pg_dump.1 pgtksh.1
 [lowen@localhost BUILD]$
 --
 Lamar Owen
 WGCR Internet Radio
 1 Peter 4:11



---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[HACKERS] Win32 and fsync()

2003-02-03 Thread Dann Corbit
For Win32, in order to emulate fsync() we will need to call
FlushFileBuffers():
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/
base/flushfilebuffers.asp

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] new procedural language - PL/R

2003-02-03 Thread cbbrowne
 Any strong feelings on whether this is necessary for a first release?
  
  No.  I'm not sure you'd really need triggers written in R ever ;-)
 
 Yeah, that's what I figured too.

Indeed.  R sounds like it might be an interesting platform from which to
do data mining, and in that sort of context, you're almost exclusively
reading data, so the loss of triggers would be of no great importance.

What might be nifty would be to have some mappings that did Clever
Transformations of Queries Into Views, particularly if that allowed
harnessing the DBMS to do some of the statistical analysis behind your
back...
--
If this was helpful, http://svcs.affero.net/rm.php?r=cbbrowne rate me
http://www3.sympatico.ca/cbbrowne/rdbms.html
After you've  heard two  eyewitness accounts of  an auto  accident it
makes you wonder about history. -- Bits and Pieces

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] new procedural language - PL/R

2003-02-03 Thread Joe Conway
[EMAIL PROTECTED] wrote:

What might be nifty would be to have some mappings that did Clever
Transformations of Queries Into Views, particularly if that allowed
harnessing the DBMS to do some of the statistical analysis behind your
back...


I'm not quite sure what you mean here, but it does support pulling data into 
the R interpreter as a data.frame via SPI, and returning R 
matricies/vectors/data.frames as either Postgres arrays or as rows and columns 
of a table function. Here's two contrived, but illustrative, examples:

create or replace function test_dtup() returns record as 
'data.frame(letters[1:10],1:10)' language 'plr';
select * from test_dtup() as t(f1 text, f2 int);
 f1 | f2
+
 a  |  1
 b  |  2
 c  |  3
 d  |  4
 e  |  5
 f  |  6
 g  |  7
 h  |  8
 i  |  9
 j  | 10
(10 rows)

create or replace function test_spi_tup(text) returns record as 
'pg.spi.exec(arg1)' language 'plr';
select * from test_spi_tup('select oid, typname from pg_type where typname = 
''oid'' or typname = ''text''') as t(typeid oid, typename name);
 typeid | typename
+--
 25 | text
 26 | oid
(2 rows)

You could easily perform a parameterized query via SPI, retrieve the results 
into an R data.frame, do some statistical manipulations, and then return the 
results as a table function. The table function itself could be wrapped in a 
view to hide the whole thing from the end-user.

You can also create custom aggregates. There has been at least one thread not 
too long ago regarding an aggregate to calculate median, for instance. Here it 
is in plr:

create table foo(f1 text, f2 float8);
insert into foo values('cat1',1.21);
insert into foo values('cat1',1.24);
insert into foo values('cat1',1.18);
insert into foo values('cat1',1.26);
insert into foo values('cat1',1.15);
insert into foo values('cat2',1.15);
insert into foo values('cat2',1.26);
insert into foo values('cat2',1.32);
insert into foo values('cat2',1.30);
create or replace function r_median(_float8) returns float as 'median(arg1)' 
language 'plr';
CREATE AGGREGATE median (sfunc = array_accum, basetype = float8, stype = 
_float8, finalfunc = r_median);
select f1, median(f2) from foo group by f1 order by f1;
  f1  | median
--+
 cat1 |   1.21
 cat2 |   1.28
(2 rows)

It's not as fast as the native PostgreSQL functions if you just need average 
or standard deviation, but it's alot easier and faster than writing your own 
for something more out-of-the-ordinary.

Joe


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly


Re: [HACKERS] win32 port --asynchronous I/O and memory

2003-02-03 Thread Jan Wieck
Merlin Moncure wrote:
 
 Just a quick question... are you guys using the C runtime or the win32
 API to do things like file i/o and memory allocation.  If you are using
 the win32 api, are you using asynchronous I/O?  Generally, how much raw
 win32 code do you expect to write (assumption: as little as possible).
 
 As for memory, what's the general allocation scheme?  I have not looked
 at the source much, but I know postgres has a very good memory manager.
 There are a few different ways of going about it.  I wrote a database
 backend of sorts a while back and my experience was that you have to
 take certain precautions or you are in danger of thrashing the server,
 which in extreme cases is basically the same as crashing the system.
 Part of the danger is memory allocations for the database sometimes
 compete with the file system caching, causing massive performance
 degradations.  MSSQL avoids this because it is very tightly wound with
 the virtual allocation system.

PostgreSQL's memory context system is untouched and uses the standard C
libraries malloc()/free() as in Unix.

As a rule of thumb, we only touched things that needed to be touched
because of missing features or differences in the C libraries.


Jan

-- 
#==#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.  #
#== [EMAIL PROTECTED] #

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] POSIX regex performance bug in 7.3 Vs. 7.2

2003-02-03 Thread wade
At 10:52 PM 1/31/03 -0500, Tom Lane wrote:
wade [EMAIL PROTECTED] writes:
   We recently upgraded a project from 7.2 to 7.3.1 to make use of some of
 the cool new features in 7.3.  The installed version is CVS stable from
 yesterday.  However, we noticed a major performance hit in POSIX regular
 expression matches against columns using the ~* operator.  

The only thought that comes to mind is that multibyte character sets are
supported in 7.3 whereas they were optional (and not default) in 7.2.
I'd not have expected a factor-of-150 performance hit from that, though.

Could you rebuild your backend with profiling enabled and get a gprof
summary of where the time is going?

   regards, tom lane


Here is the profile information.  I included a log of the session that
generated it at the top of the gprof  output.  If there is any other info I
can help you with, please let me know.
http://arch.wavefire.com/pgregexgmon.txt

  -Wade Klaver

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Merlin Moncure
 For Win32, in order to emulate fsync() we will need to call
 FlushFileBuffers():
The supplied link does not work.  FlushFileBuffers() is for flushing
files opened with CreateFile() etc.

For files opened with fopen(), call fflush().

For files opened with _open(), call _commit().

Likekly the win32 port code, which I have yet to inspect, will use the
second version.  

Merlin



---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Andrew Dunstan
I'm having difficulty digging up the reference, but I think I recall seeing
something that said, roughly, on W32 there are 2 sets of buffers - those in
the user level library and those in the kernel level driver, and
FlushFileBuffers drains the first, while _commit drains both (it includes a
call to FlushFileBuffers).

I'm also fairly sure I saw something like
#define fsync _commit
in the Berkeley DB sources the other day, which might be a clue.

I'll be happy to be corrected, though.

cheers

andrew


- Original Message -
From: Dann Corbit [EMAIL PROTECTED]
To: PostgreSQL Hackers [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 3:15 PM
Subject: [HACKERS] Win32 and fsync()


 For Win32, in order to emulate fsync() we will need to call
 FlushFileBuffers():
 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/
 base/flushfilebuffers.asp

 ---(end of broadcast)---
 TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] POSIX regex performance bug in 7.3 Vs. 7.2

2003-02-03 Thread Tom Lane
wade [EMAIL PROTECTED] writes:
 Here is the profile information.  I included a log of the session that
 generated it at the top of the gprof  output.  If there is any other info I
 can help you with, please let me know.

A four-second test isn't long enough to gather any statistically
meaningful profile info.  On most machines, gprof samples 100 times per
second, so realistically you need a minute or two of runtime to have
trustworthy numbers.

Please replicate the rows in the table by a factor of ten or twenty or
so and try again.

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Merlin Moncure
I'm having difficulty digging up the reference, but I think I recall
seeing something that said, roughly, on W32 there are 2 sets of buffers
- those in the user level library and those in the kernel level driver,
and FlushFileBuffers drains the first, while _commit drains both (it
includes a call to FlushFileBuffers).

You were correct: here is the source.


int __cdecl _commit (
int filedes
)
{
int retval;

/* if filedes out of range, complain */
if ( ((unsigned)filedes = (unsigned)_nhandle) ||
 !(_osfile(filedes)  FOPEN) )
{
errno = EBADF;
return (-1);
}

_lock_fh(filedes);

/* if filedes open, try to commit, else fall through to bad */
if (_osfile(filedes)  FOPEN) {

if ( !FlushFileBuffers((HANDLE)_get_osfhandle(filedes))
) {
retval = GetLastError();
} else {
retval = 0; /* return success */
}

/* map the OS return code to C errno value and return
code */
if (retval == 0) {
goto good;
} else {
_doserrno = retval;
goto bad;
}

}

bad :
errno = EBADF;
retval = -1;
good :
_unlock_fh(filedes);
return (retval);
}

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Gavin Sherry
On Mon, 3 Feb 2003, Andrew Dunstan wrote:

 I'm also fairly sure I saw something like
 #define fsync _commit
 in the Berkeley DB sources the other day, which might be a clue.
 
 I'll be happy to be corrected, though.

You'd be right:

/*
 * Win32 has fsync, getcwd, snprintf and vsnprintf, but under different names.
 */
#define fsync(fd)   _commit(fd)

Funny Win32-ism

Still not sure if it has the same semantics as Unix fsync() but sleepycat
(Berkeley) DB seems to think so.

Gavin


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Dann Corbit
 -Original Message-
 From: Merlin Moncure [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, February 03, 2003 3:00 PM
 To: Andrew Dunstan
 Cc: [EMAIL PROTECTED]
 Subject: Re: [HACKERS] Win32 and fsync()
 
 
 I'm having difficulty digging up the reference, but I think I recall
 seeing something that said, roughly, on W32 there are 2 sets 
 of buffers
 - those in the user level library and those in the kernel 
 level driver, and FlushFileBuffers drains the first, while 
 _commit drains both (it includes a call to FlushFileBuffers).
 
 You were correct: here is the source.
 
 
 int __cdecl _commit (
 int filedes
 )
 {
 int retval;
 
 /* if filedes out of range, complain */
 if ( ((unsigned)filedes = (unsigned)_nhandle) ||
  !(_osfile(filedes)  FOPEN) )
 {
 errno = EBADF;
 return (-1);
 }
 
 _lock_fh(filedes);
 
 /* if filedes open, try to commit, else fall through to bad */
 if (_osfile(filedes)  FOPEN) {
 
 if ( 
 !FlushFileBuffers((HANDLE)_get_osfhandle(filedes))
 ) {
 retval = GetLastError();
 } else {
 retval = 0; /* return success */
 }
 
 /* map the OS return code to C errno value 
 and return code */
 if (retval == 0) {
 goto good;
 } else {
 _doserrno = retval;
 goto bad;
 }
 
 }
 
 bad :
 errno = EBADF;
 retval = -1;
 good :
 _unlock_fh(filedes);
 return (retval);
 }

Where is the other flush besides FlushFileBuffers()?

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Gavin Sherry
On Mon, 3 Feb 2003, Dann Corbit wrote:

  -Original Message-
  From: Merlin Moncure [mailto:[EMAIL PROTECTED]] 
  Sent: Monday, February 03, 2003 3:00 PM
  To: Andrew Dunstan
  Cc: [EMAIL PROTECTED]
  Subject: Re: [HACKERS] Win32 and fsync()
  
  
  I'm having difficulty digging up the reference, but I think I recall
  seeing something that said, roughly, on W32 there are 2 sets 
  of buffers
  - those in the user level library and those in the kernel 
  level driver, and FlushFileBuffers drains the first, while 
  _commit drains both (it includes a call to FlushFileBuffers).
  
  You were correct: here is the source.
  
  
  int __cdecl _commit (
  int filedes
  )
  {
  int retval;
  
  /* if filedes out of range, complain */
  if ( ((unsigned)filedes = (unsigned)_nhandle) ||
   !(_osfile(filedes)  FOPEN) )
  {
  errno = EBADF;
  return (-1);
  }
  
  _lock_fh(filedes);
  
  /* if filedes open, try to commit, else fall through to bad */
  if (_osfile(filedes)  FOPEN) {
  
  if ( 
  !FlushFileBuffers((HANDLE)_get_osfhandle(filedes))
  ) {
  retval = GetLastError();
  } else {
  retval = 0; /* return success */
  }
  
  /* map the OS return code to C errno value 
  and return code */
  if (retval == 0) {
  goto good;
  } else {
  _doserrno = retval;
  goto bad;
  }
  
  }
  
  bad :
  errno = EBADF;
  retval = -1;
  good :
  _unlock_fh(filedes);
  return (retval);
  }
 
 Where is the other flush besides FlushFileBuffers()?

The only real code there is, it seems, an exclusive look on the file
descriptor. (Provided of course that that is what _lock_fh(filedes) does).

Gavin



---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Andrew Dunstan
I'm not sure what the provenance of this code for _commit is - I thought it
was in the standard MS libs - have they finally seen the light and open
sourced it? ;-)

andrew

- Original Message -
From: Dann Corbit [EMAIL PROTECTED]
To: Merlin Moncure [EMAIL PROTECTED]; Andrew Dunstan
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 6:24 PM
Subject: Re: [HACKERS] Win32 and fsync()


  -Original Message-
  From: Merlin Moncure [mailto:[EMAIL PROTECTED]]
  Sent: Monday, February 03, 2003 3:00 PM
  To: Andrew Dunstan
  Cc: [EMAIL PROTECTED]
  Subject: Re: [HACKERS] Win32 and fsync()
 
 
  I'm having difficulty digging up the reference, but I think I recall
  seeing something that said, roughly, on W32 there are 2 sets
  of buffers
  - those in the user level library and those in the kernel
  level driver, and FlushFileBuffers drains the first, while
  _commit drains both (it includes a call to FlushFileBuffers).
 
  You were correct: here is the source.
 
 
  int __cdecl _commit (
  int filedes
  )
  {
  int retval;
 
  /* if filedes out of range, complain */
  if ( ((unsigned)filedes = (unsigned)_nhandle) ||
   !(_osfile(filedes)  FOPEN) )
  {
  errno = EBADF;
  return (-1);
  }
 
  _lock_fh(filedes);
 
  /* if filedes open, try to commit, else fall through to bad */
  if (_osfile(filedes)  FOPEN) {
 
  if (
  !FlushFileBuffers((HANDLE)_get_osfhandle(filedes))
  ) {
  retval = GetLastError();
  } else {
  retval = 0; /* return success */
  }
 
  /* map the OS return code to C errno value
  and return code */
  if (retval == 0) {
  goto good;
  } else {
  _doserrno = retval;
  goto bad;
  }
 
  }
 
  bad :
  errno = EBADF;
  retval = -1;
  good :
  _unlock_fh(filedes);
  return (retval);
  }

 Where is the other flush besides FlushFileBuffers()?

 ---(end of broadcast)---
 TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Dann Corbit
 -Original Message-
 From: Andrew Dunstan [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, February 03, 2003 3:31 PM
 To: Dann Corbit; Merlin Moncure
 Cc: [EMAIL PROTECTED]
 Subject: Re: [HACKERS] Win32 and fsync()
 
 
 I'm not sure what the provenance of this code for _commit is 
 - I thought it was in the standard MS libs - have they 
 finally seen the light and open sourced it? ;-)

MS has always shipped the source code to their standard libraries on the
CD.  However, the compiler source remains closed.  This seems
insignificant, but sometimes functions are totally inlined within the
compiler (e.g. math functions like sin() and exp()).

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] POSIX regex performance bug in 7.3 Vs. 7.2

2003-02-03 Thread wade
At 05:51 PM 2/3/03 -0500, Tom Lane wrote:
wade [EMAIL PROTECTED] writes:
 Here is the profile information.  I included a log of the session that
 generated it at the top of the gprof  output.  If there is any other info I
 can help you with, please let me know.

A four-second test isn't long enough to gather any statistically
meaningful profile info.  On most machines, gprof samples 100 times per
second, so realistically you need a minute or two of runtime to have
trustworthy numbers.

Please replicate the rows in the table by a factor of ten or twenty or
so and try again.

   regards, tom lane
OK, here goes again.
I have tried a different table, this one with 27444 rows.
In this case, the query with the regex of the form row ~* 'regex'
runs in 1.113 seconds and the other runs in 600.
The session idled for a while after the query completed if that makes a
difference.
Queries and explain output are included at the top of the gprof output.
http://arch.wavefire.com/pgregexgmon.txt
  -Wade Klaver


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] POSIX regex performance bug in 7.3 Vs. 7.2

2003-02-03 Thread Tom Lane
Sigh.  It seems that somebody broke caching of compiled regexes,
so that your regex is recompiled each time it's used.  I haven't
dug into the logic yet, but I think it must have been a mistake
in Thomas' change to make the regex cache be searched circularly:

2002-06-14 22:49  thomas

* src/backend/utils/adt/regexp.c: Search the existing regular
expression cache as a ring buffer.  Will optimize the case for
repeated calls for the same expression,  which seems to be the most
common case. Formerly, always searched  from the first entry.  May
want to look at the least-recently-used algorithm to make sure it 
is identifying the right slots to reclaim. Seems silly to do math
when  it seems that we could simply use an incrementing counter...

Considering that we now know that this is a factor-of-150 performance
hit, I wonder if this is a must fix for 7.3.2?  We already wrapped
the tarball, but ...

regards, tom lane

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] POSIX regex performance bug in 7.3 Vs. 7.2

2003-02-03 Thread wade
  Well, IMHO I would rather see a delay of the roll-out by a day or two
than see a release with such a serious performance glitch.  Especially
since I personally have been shooting my big mouth off to all my geek
friends on the leaps and bounds PG has made in the last few releases.  With
my luck one of them will find it. :)
  I guess in the end, it comes down to the rest of you developer types, but
I would be inclined to re-wrap.  However, this is easy for me to say given
that I have no idea how much work it actually is to re-wrap.
  -Wade Klaver

At 08:07 PM 2/3/03 -0500, Tom Lane wrote:
Sigh.  It seems that somebody broke caching of compiled regexes,
so that your regex is recompiled each time it's used.  I haven't
dug into the logic yet, but I think it must have been a mistake
in Thomas' change to make the regex cache be searched circularly:

2002-06-14 22:49  thomas

   * src/backend/utils/adt/regexp.c: Search the existing regular
   expression cache as a ring buffer.  Will optimize the case for
   repeated calls for the same expression,  which seems to be the most
   common case. Formerly, always searched  from the first entry.  May
   want to look at the least-recently-used algorithm to make sure it 
   is identifying the right slots to reclaim. Seems silly to do math
   when  it seems that we could simply use an incrementing counter...

Considering that we now know that this is a factor-of-150 performance
hit, I wonder if this is a must fix for 7.3.2?  We already wrapped
the tarball, but ...

   regards, tom lane



---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[HACKERS] regression failure on freebsd/alpha

2003-02-03 Thread Christopher Kings-Lynne
Latest CVS, timetz and horology is failing...

parallel group (13 tests):  text name varchar float4 char int2 boolean oid
int8 float8 bit int4 numeric
 boolean  ... ok
 char ... ok
 name ... ok
 varchar  ... ok
 text ... ok
 int2 ... ok
 int4 ... ok
 int8 ... ok
 oid  ... ok
 float4   ... ok
 float8   ... ok
 bit  ... ok
 numeric  ... ok
test strings  ... ok
test numerology   ... ok
parallel group (20 tests):  time circle timetz tinterval interval box path
comments point abstime reltime polygon lseg date inet timestamp timestamptz
type_sanity oidjoins opr_sanity
 point... ok
 lseg ... ok
 box  ... ok
 path ... ok
 polygon  ... ok
 circle   ... ok
 date ... ok
 time ... ok
 timetz   ... FAILED
 timestamp... ok
 timestamptz  ... ok
 interval ... ok
 abstime  ... ok
 reltime  ... ok
 tinterval... ok
 inet ... ok
 comments ... ok
 oidjoins ... ok
 type_sanity  ... ok
 opr_sanity   ... ok
test geometry ... ok
test horology ... FAILED
test insert   ... ok
test create_function_1... ok
test create_type  ... ok
test create_table ... ok
test create_function_2... ok
test copy ... ok
parallel group (7 tests):  create_aggregate create_operator triggers vacuum
inherit constraints create_misc
 constraints  ... ok
 triggers ... ok
 create_misc  ... ok
 create_aggregate ... ok
 create_operator  ... ok
 inherit  ... ok
 vacuum   ... ok
parallel group (2 tests):  create_view create_index
 create_index ... ok
 create_view  ... ok
test sanity_check ... ok
test errors   ... ok
test select   ... ok
parallel group (16 tests):  select_distinct_on select_having random
select_into arrays select_distinct case transactions subselect union portals
select_implicit aggregates hash_index join btree_index
 select_into  ... ok
 select_distinct  ... ok
 select_distinct_on   ... ok
 select_implicit  ... ok
 select_having... ok
 subselect... ok
 union... ok
 case ... ok
 join ... ok
 aggregates   ... ok
 transactions ... ok
 random   ... ok
 portals  ... ok
 arrays   ... ok
 btree_index  ... ok
 hash_index   ... ok
test privileges   ... ok
test misc ... ok
parallel group (5 tests):  portals_p2 cluster select_views rules foreign_key
 select_views ... ok
 portals_p2   ... ok
 rules... ok
 foreign_key  ... ok
 cluster  ... ok
parallel group (11 tests):  truncate limit temp prepare conversion
rangefuncs without_oid copy2 domain plpgsql alter_table
 limit... ok
 plpgsql  ... ok
 copy2... ok
 temp ... ok
 domain   ... ok
 rangefuncs   ... ok
 prepare  ... ok
 without_oid  ... ok
 conversion   ... ok
 truncate ... ok
 alter_table  ... ok


Regression diff attached.

Chris





regression.diffs
Description: Binary data

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [HACKERS] Win32 Powerfail testing - results

2003-02-03 Thread Dave Page


 -Original Message-
 From: Tom Lane [mailto:[EMAIL PROTECTED]] 
 Sent: 03 February 2003 21:52
 To: Dave Page
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [HACKERS] Win32 Powerfail testing - results 
 
 
 Dave Page [EMAIL PROTECTED] writes:
   Rod Taylor allegedly said:
  Any change of tossing in a periodic VACUUM or would that throw off 
  the results?
 
  Dunno, Tom could best answer that, but a *complete guess* based on 
  piecing together tidbits of how it all works from various threads 
  here, would be that it would merely increase the time period during 
  which a powerfail would be unlikely to cause duplicate 
 rows. Reasoning 
  for this is that vacuum would be messing with tuples that 
 are already 
  dead.
 
 I think it'd be interesting to try it both ways.  VACUUM 
 might throw in new failure modes.  I'm not sure if it could 
 mask the failure mode you already found.

OK, I'll bung Win2K back on the test box tomorrow. Any preference as to
the type of vacuum? I assume full would be most likely to cause
problems. I'll add the vacuum after the commit...

Regards, Dave.

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] POSIX regex performance bug in 7.3 Vs. 7.2

2003-02-03 Thread Tom Lane
Wade, how many distinct patterns do you have in that table?  What's the
population distribution (in particular, do the top 32 patterns account
for most of the table)?

It's looking like the issue is not so much that the 7.3 code is
completely broken, as that its LRU replacement policy for precompiled
regex patterns got rejiggered in a way that doesn't match your data.

regards, tom lane

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] POSIX regex performance bug in 7.3 Vs. 7.2

2003-02-03 Thread Tom Lane
Next question: may I guess that you weren't using MULTIBYTE in 7.2?

After still more digging, I'm coming round to the opinion that the
problem is that MULTIBYTE is forced on in 7.3, and this imposes a
factor-of-256 overhead in a bunch of the operations in regcomp.c.
In particular, compiling a case-independent regex is now hugely
more expensive than it used to be.

The parties who wanted to force MULTIBYTE on promised that there 
would be no such penalties :-(

regards, tom lane

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] regression failure on freebsd/alpha

2003-02-03 Thread Christopher Kings-Lynne
 Christopher Kings-Lynne [EMAIL PROTECTED] writes:
  Latest CVS, timetz and horology is failing...

 Would you poke into it and see why?

I can, but I'm not sure what you want me to do - I'm not really familiar
with it all bar the stuff I attached to the email...

Chris


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] regression failure on freebsd/alpha

2003-02-03 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes:
 Latest CVS, timetz and horology is failing...

Would you poke into it and see why?

I made some recent adjustments to the rounding code in timetz, but I
didn't expect any portability issues to surface...

regards, tom lane

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] PGP signing releases

2003-02-03 Thread Curt Sampson
On Mon, 3 Feb 2003, Kurt Roeckx wrote:

 I'm not saying md5 is as secure as pgp, not at all, but you can't
 trust those pgp keys to be the real one either.

Sure you can. Just verify that they've been signed by someone you trust.

For example, next time I happen to run into Bruce Momjian, I hope he'll
have his PGP key fingerprint with him. I can a) verify that he's the
same guy I who, under the name Bruce Momjian, was giving the seminar I
went to last weekend, and b) check his passport ID to see that the U.S.
government believes that someone who looks him is indeed Bruce Momjian
and a U.S. citizen. That, for me, is enough to trust that he is who he
says he is when he gives me the fingerprint.

I take that fingerprint back to my computer and verify that the key I
downloaded from the MIT keyserver has the same fingerprint. Then I sign
that key with my own signature, assigning it an appropriate level of trust.

Next time I download a postgres release, I then grab a copy of the
postgres release-signing public key, and verify that its private key was
used to sign the postgres release, and that it is signed by Bruce's key.

Now I have a direct chain of trust that I can evaluate:

1. Do I believe that the person I met was indeed Bruce Momjian?

2. Do I trust him to take care of his own key and be careful signing
other keys?

3. Do I trust his opinion that the postgres release-signing key that
he signed is indeed valid?

4. Do I trust the holder of the postgres release-signing key to have
taken care of the key and have been careful about signing releases
with it?

Even if you extend this chain by a couple of people, that's trust in a
lot fewer people than you're going to need if you want to trust an MD5
signature.

cjs
-- 
Curt Sampson  [EMAIL PROTECTED]   +81 90 7737 2974   http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light.  --XTC

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] regression failure on freebsd/alpha

2003-02-03 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes:
 Would you poke into it and see why?

 I can, but I'm not sure what you want me to do -

It shouldn't be that hard to find why you're getting zeroes instead of
expected results.  I'd look at those cases first.

regards, tom lane

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] PGP signing releases

2003-02-03 Thread Greg Copeland
On Mon, 2003-02-03 at 13:55, Kurt Roeckx wrote:
 On Mon, Feb 03, 2003 at 12:24:14PM -0600, Greg Copeland wrote:
  On Sun, 2003-02-02 at 20:23, Marc G. Fournier wrote:
  
   right, that is why we started to provide md5 checksums ...
  
  md5 checksums only validate that the intended package (trojaned or
  legit) has been properly received.  They offer nothing from a security
  perspective unless the checksums have been signed with a key which can
  be readily validated from multiple independent sources.
 
 If you can get the md5 sum of multiple independent sources,
 it's about the same thing.  It all depends on how much you trust
 those sources.
 
 I'm not saying md5 is as secure as pgp, not at all, but you can't
 trust those pgp keys to be the real one either.


No, that is not the same thing at all.  PKI specifically allows for web
of trust.  Nothing about md5 checksums allows for this.  As such,
chances are, if a set of md5 checksums have been forged, they will be
propagated and presented as being valid even though they are not.

I'll say this again.  Checksums alone offers zero security protection. 
It was never intended to address that purpose.  As such, it does not
address it.  If you need security, use a security product.  Checksums
ONLY purpose is to ensure copy propagation validation.  It does not
address certification of authenticity in any shape or form.

As for trusting the validity of the keys contained within a PKI, that's
where the whole concept of web of trust comes into being.  You can
ignore it and not benefit or you can embrace it, as people are
advocating, and leverage it.

Validation of keys can be as simple as snail-mail, phone calls, and
fingerprint validation.  It's that simple.  It's why fingerprints exist
in the first place.


Regards,

-- 
Greg Copeland [EMAIL PROTECTED]
Copeland Computer Consulting


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [HACKERS] PGP signing releases

2003-02-03 Thread Greg Copeland
On Mon, 2003-02-03 at 22:35, Curt Sampson wrote:
 On Mon, 3 Feb 2003, Kurt Roeckx wrote:
 
  I'm not saying md5 is as secure as pgp, not at all, but you can't
  trust those pgp keys to be the real one either.
 
 Sure you can. Just verify that they've been signed by someone you trust.
 
 For example, next time I happen to run into Bruce Momjian, I hope he'll
 have his PGP key fingerprint with him. I can a) verify that he's the
 same guy I who, under the name Bruce Momjian, was giving the seminar I
 went to last weekend, and b) check his passport ID to see that the U.S.
 government believes that someone who looks him is indeed Bruce Momjian
 and a U.S. citizen. That, for me, is enough to trust that he is who he
 says he is when he gives me the fingerprint.
 
 I take that fingerprint back to my computer and verify that the key I
 downloaded from the MIT keyserver has the same fingerprint. Then I sign
 that key with my own signature, assigning it an appropriate level of trust.
 
 Next time I download a postgres release, I then grab a copy of the
 postgres release-signing public key, and verify that its private key was
 used to sign the postgres release, and that it is signed by Bruce's key.
 
 Now I have a direct chain of trust that I can evaluate:
 
 1. Do I believe that the person I met was indeed Bruce Momjian?
 
 2. Do I trust him to take care of his own key and be careful signing
 other keys?
 
 3. Do I trust his opinion that the postgres release-signing key that
 he signed is indeed valid?
 
 4. Do I trust the holder of the postgres release-signing key to have
 taken care of the key and have been careful about signing releases
 with it?
 
 Even if you extend this chain by a couple of people, that's trust in a
 lot fewer people than you're going to need if you want to trust an MD5
 signature.
 
 cjs

And that's the beginning of the web of trust. ;) Worth noting that
snail-mail and phone calls can easily play a role in this process as
well.  I think if USPO can play a role in delivering master keys for pin
pads used by banks across America and the around the world, surely it's
good enough to help propagate key information for signing packages.


Regards,

-- 
Greg Copeland [EMAIL PROTECTED]
Copeland Computer Consulting


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] PGP signing releases

2003-02-03 Thread Curt Sampson
On Tue, 3 Feb 2003, Greg Copeland wrote:

 Surely there are a couple of key developers whom would be willing to
 sign each other's keys and have previously met before.  Surely this
 would be the basis for phone validation.  Then, of course, there is 'ol
 snail-mail route too.  Of course, nothing beats meeting in person having
 valid ID and fingerprints in hand.  ;)

I should mention, I'm not always so paranoid that I check ID and all of
that. It really depends on how well I know the person. I've met Bruce only
once, so I wouldn't do it over the phone at all, since we don't share much
non-public background and I'm not dead certain that I could tell his voice
from a similar one. The same is not true when it comes to doing this with
some of my close friends.

cjs
-- 
Curt Sampson  [EMAIL PROTECTED]   +81 90 7737 2974   http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light.  --XTC

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] PGP signing releases

2003-02-03 Thread Greg Copeland
On Mon, 2003-02-03 at 22:35, Curt Sampson wrote:
 2. Do I trust him to take care of his own key and be careful signing
 other keys?
 
 3. Do I trust his opinion that the postgres release-signing key that
 he signed is indeed valid?
 
 4. Do I trust the holder of the postgres release-signing key to have
 taken care of the key and have been careful about signing releases
 with it?
 

Sorry to respond again, however, I did want to point out, signing a key
does not have to imply an absolute level of trust of the signer.  There
are several trust levels.  For example, if we validated keys via phone
and mail, I would absolutely not absolutely trust the key I'm signing. 
However, if I had four people which mostly trusted the signed key and
one or two which absolutely trusted the signed key whom I absolutely
trust, then it's a fairly safe bet I too can trust the key.  Again, this
all comes back to building a healthy web of trust.

Surely there are a couple of key developers whom would be willing to
sign each other's keys and have previously met before.  Surely this
would be the basis for phone validation.  Then, of course, there is 'ol
snail-mail route too.  Of course, nothing beats meeting in person having
valid ID and fingerprints in hand.  ;)


Regards,

-- 
Greg Copeland [EMAIL PROTECTED]
Copeland Computer Consulting


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [HACKERS] Win32 Powerfail testing - results

2003-02-03 Thread Hannu Krosing
Dave Page kirjutas E, 03.02.2003 kell 18:51:
 Well the results are finally in. Hopefully we can concentrate on putting
 them right, rather than having a round of told you so's :-)
 
 I modified the test program slightly to improve the consistency checks.
 The updated version is attached.
 
 Regards, Dave.
 
 System
 ==
 
 Gigabyte GA-6VTXD Motherboard
 Dual 1GHz PIII Processors
 1Gb Non-ECC RAM
 Fujitsu MPG3240AH IDE Disk Drive
 
 Enhanced IDE Performance disabled in the BIOS.
 
 Test
 
 
 Test program run from a seperate machine.
 20 Tests per OS.
 Powerfail randomly applied.

Your hardware should also be able to run Postgres on BeOS

http://www.bebits.com/app/2752

Being the only non-unix port before/besides win32, it could be an
interesting excercise.

You should be able to get and installable BeOS itself from SourceForge

http://sourceforge.net/projects/crux/

 Windows 2000 Testing
 

Is this NTFS ?

Any possibility of trying the same tests with SCSI disks ?

 Write back cache on IDE disk disabled.
 Clean installation of Windows 2000 Server with Service Pack 3
 
 Run | Errors Detected
 =
  01 | None
  02 | None
  03 | None
  04 | None
  05 | None
  06 | None
  07 | COUNT CHECK - Duplicate or missing rows detected (10262)!!
  08 | None
  09 | DISTINCT CHECK - Duplicate or missing rows detected (9893)!!

I remember having problems with UNIQUE columns having duplicate values a
few versions back on Linux-ext2-IDE. Could this be the same problem or
must it be something completely different ?

 | COUNT CHECK - Duplicate or missing rows detected (9893)!!
  10 | None
  11 | None
  12 | None
  13 | None
  14 | COUNT CHECK - Duplicate or missing rows detected (10024)!!
  15 | None
  16 | None
  17 | None
  18 | None
  19 | None
  20 | None
 
 Linux Testing
 =
 
 Clean installation of Slackware Linux 8.1 on ext3
 Kernel 2.4.18
 
 Run | Errors Detected
 =
  01 | None
 ...
  20 | None

BTW, are the tests portable enough to run also on MSSQL, Oracle and DB2
?

I know that you can't publish exact results, but perhaps something like
the GreatBridge results - the one that runs only on Win32 did so-and-so,
the one that has 'i' at the end of version number this, and the one
whose name consists of two letters and a number did that ?

-- 
Hannu Krosing [EMAIL PROTECTED]

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] Win32 Powerfail testing - results

2003-02-03 Thread Dave Page


 -Original Message-
 From: Hannu Krosing [mailto:[EMAIL PROTECTED]] 
 Sent: 03 February 2003 22:30
 To: Dave Page
 Cc: PostgreSQL Hackers; Katie Ward
 Subject: Re: [HACKERS] Win32 Powerfail testing - results
 
 
 Your hardware should also be able to run Postgres on BeOS
 
 http://www.bebits.com/app/2752
 
 Being the only non-unix port before/besides win32, it could 
 be an interesting excercise.

One that will have to go untested I'm afraid. These tests take a fair
while and you know how many pies I've got my fingers in right now just
on this project, never mind my paying gig and Uni!!

  Windows 2000 Testing
  
 
 Is this NTFS ?

Yes.

 Any possibility of trying the same tests with SCSI disks ?

Depends on my time. I have a couple of 29160's and some Seagate Cheetah
X15's knocking about.

 
 I remember having problems with UNIQUE columns having 
 duplicate values a few versions back on Linux-ext2-IDE. Could 
 this be the same problem or must it be something completely 
 different ?

Pass. I don't know the details of your problem, or how Peerdirect have
handled the IO. If I'm honest, I'm probably not experienced enough in
that sort of thing to know what's going wrong anyway :-(

 
 BTW, are the tests portable enough to run also on MSSQL, 
 Oracle and DB2 ?

Well I posted the source. If you pull out the libpq stuff then I guess
so. I only have DB2 and MSSQL here though (and they both fall over at
will anyway). Again though, I can't really spend time testing them just
for interest's sake (not at present anyway).

Regards, Dave.

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Dave Page


 -Original Message-
 From: Andrew Dunstan [mailto:[EMAIL PROTECTED]] 
 Sent: 03 February 2003 22:47
 To: PostgreSQL Hackers
 Subject: Re: [HACKERS] Win32 and fsync()
 
 
 I'm having difficulty digging up the reference, but I think I 
 recall seeing something that said, roughly, on W32 there are 
 2 sets of buffers - those in the user level library and those 
 in the kernel level driver, and FlushFileBuffers drains the 
 first, while _commit drains both (it includes a call to 
 FlushFileBuffers).
 
 I'm also fairly sure I saw something like
 #define fsync _commit
 in the Berkeley DB sources the other day, which might be a clue.
 
 I'll be happy to be corrected, though.

I too have yet to look at the Win32 patces, but if they have used
FlushFileBuffers, perhaps that would explain my powerfail test
results...

Regards, Dave.

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] On file locking

2003-02-03 Thread Giles Lean

Tom Lane wrote:

 On HPUX 10.20, flock doesn't seem to exist (hasn't got a man page nor
 any mention in /usr/include).

Correct.  Still isn't there in later releases.

  lockf says
 
  All locks for a process are released upon
  the first close of the file, even if the process still has the file
  opened, and all locks held by a process are released when the process
  terminates.
 
 and
 
  When a file descriptor is closed, all locks on the file from the
  calling process are deleted, even if other file descriptors for that
  file (obtained through dup() or open(), for example) still exist.
 
 which seems to imply (but doesn't actually say) that HPUX keeps track of
 exactly which process took out the lock, even if the file is held open
 by multiple processes.

Having done some testing today, I now understand what the standards
are trying to say when they talk about locks being inherited. Or at
least I think I understand: standards are tricky, locking is subtle,
and I'm prepared to be corrected if I'm wrong!

All of these lock functions succeed when the same process asks for a
lock that it already has.  That is:

 fcntl(fd, ...);
 fcntl(fd, ...);  /* success -- no error returned */

For flock() only, the lock is inherited by a child process along
with the file descriptor so the child can re-issue the flock()
call and that will pass, too:

 flock(fd, ...);
 pid = fork();
 if (pid == 0)
 flock(fd, ...);  /* success -- no error returned */

For fcntl() and lockf() the locks are not inherited, and the
call in a child fails:

 fcntl(fd, ...);
 pid = fork();
 if (pid == 0)
 fcntl(fd, ...);  /* will fail and return -1 */

In no case does just closing the file descriptor in the child lose
the parent's lock.  I rationalise this as follows:

1. flock() is using a last close semantic, so closing the file
   descriptor is documented not to lose the lock

2. lockf() and fcntl() use a first close, but because the locks
   are not inherited by the child process the child can't unlock
   them

 This all doesn't look good for using file locks in the way I had in
 mind :-( ... but considering that all these man pages seem pretty vague,
 maybe some direct experimentation is called for.

I conjecture that Tom was looking for a facility to lock a file and
have it stay locked if the postmaster or any child process was still
running.  flock() fits the bill, but it's not portable everywhere.

One additional warning: this stuff *is* potentially filesystem
dependent, per the source code I looked at, which would call
filesystem specific routines.

I tested with HP-UX 11.00 (VxFS), NetBSD (FFS) and Linux (ext3).  I've
put the rough and ready test code up for FTP, if anyone wants to check
my working:

ftp://ftp.nemeton.com.au/pub/pgsql/

Limitations in the testing:

I only used whole file locking (no byte ranges) and didn't prove that
a lock taken by flock() is still held after a child calls close() as
it is documented to be.

Regards,

Giles

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[HACKERS] [Fwd: Backporting parts of databases from a 7.3 server to 7.2 : How?]

2003-02-03 Thread Emmanuel Charpentier
Posted about 2 weeks to the General and Questions lists. Got no answers 
and found no workaround (yet !).

Any ideas ?

	Emmanuel Charpentier

PS : If possible, Please Cc: to [EMAIL PROTECTED] : I'm reading 
the list through the news server, and nor very often ...

 Original Message 
Subject: Backporting parts of databases from a 7.3 server to 7.2 : How ?
Date: Mon, 20 Jan 2003 19:31:53 +0100
From: Emmanuel Charpentier [EMAIL PROTECTED]
Organization: Hub.Org Networking Services (http://www.hub.org)
Newsgroups: 
comp.databases.postgresql.general,comp.databases.postgresql.questions

Dear list(s),

I have a test machine, which I recently upgraded to PostgreSQL 7.3, and a
  production machine, which for now will stay at 7.2 (I have some issues
with ODBC access to 7.3 with the current driver).

I have no problem exporting databases (or parts of them) from the 7.2 to
the 7.3 machine. For example

production$ pg_dump -F c -f mybase.dump mybase
test$ pg_restore -c mybase.dump

or even

test$ pg_restore -l mybase.dump | grep VIEW  mybase.views
test$ pg_restore -L mybase.views mybase.dump

The latter one is not really useful. However, the reverse operation (i.e.
restoring on the production system a set of views created on the test
machine) is actually a useful one : it allows me to get from the production
database a snapshot of data, work on it on the test machine, creating
useful views in the process, and restoring them without cloberring
(possibly updated) data. The same could be said of function, indexes,
triggers, rules and so on ...

However, this does *not* work between a 7.3-generated dump and a 7.2
production server. The archiver complaints of an 'unknown archive format :
0' (I'm quoting this from the top of my head : my production server is
not reachable from the place I'm writing this).

The only workaround I could come up with so far was to (watch it !) !
1) create a -F c dump
2) pg_restore -l to get a list of the objects
3) looping through this list, pg_dump -F p -t each and every view,
appending the proceeds to a single SQL file, which can be played back to
the pproduction server.

Not fun, and hardly generalisable ...

Questions :

1) Is that a bug or a feature ?
2) Is there a workaround (e. g. by telling the 7.3 pg_dump to use a
7.2-recognized format ) ?
3) Do you have other suggestions (short of upgrading the production server
to 7.3, which I plan to do when my issues with ODBC access will be solved).

Sincerely,

	Emmanuel Charpentier

PS : Would you be so kind as to Cc: me your answers : I'm on the lists in a
no-mail mode and read it through the news interface.


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html


Re: [HACKERS] Interactive Documentation - how do you want it towork?

2003-02-03 Thread Dave Page

 -Original Message-
 From: Bruce Momjian [mailto:[EMAIL PROTECTED]] 
 Sent: 03 February 2003 11:40
 To: Dave Page
 Cc: Neil Conway; PostgreSQL Hackers
 Subject: Re: [HACKERS] Interactive Documentation - how do you 
 want it towork?
 
 
 
 I looked at that URL, and it is good example of what _not_ to 
 do with interactive docs, IMHO.  The manual page is _very_ 
 short, and shows no examples.  The comments have various 
 examples/cases, with corrections later to earlier postings.  
 I would think this is not what we want.  We want a longer 
 manual page, with _correct_ examples that show typical usage.
 
 I know folks like those comments, but isn't it showing cases 
 where the curt documentation just doesn't cut it?

OK point taken. What about the issue that the comments get merged into
later docs, which is often not helpful if someone is searching the older
docset (because they are using the older version)?

Perhaps we should then prune the garbage out of the old version, and
make the comments version specific so that we start afresh with the new
docs, but leave the useful comments against the older versions?

Regards, Dave.

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [PATCHES] [HACKERS] PostgreSQL libraries - PThread Support, but

2003-02-03 Thread Bruce Momjian

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---


Lee Kindness wrote:
Content-Description: message body text

 Patch attached, along with new libpq-reentrant.c and libpq-reentrant.h
 files for src/interfaces/libpq.
 
 Also at http://services.csl.co.uk/postgresql/
 
 Thanks, Lee.
 
 Lee Kindness writes:
   Ok guys, I propose that the new libpq diff and 2 source files which
   i'll soon send to pgsql-patches is applied to the source. This diff is
   a cleaned up version of the previous version with the wrapper
   functions moved out into their own file and more comments added. Also
   the use of crypt_r() has been removed (not worth the effort), the
   cpp defines have been renamed to be consistent with each other and
   Tom's concerns with loose #defines has been partly addressed.
   
   This diff does not include any configure changes. I plan to tackle
   this separately ASAP, and hopefully produce something more acceptable.
   
   I will add checks for appropriate compiler thread flags (for compiling
   libpq, and alow the removal of #defines in libpq-reentrant.h), and
   link flags  libs (for a planned threaded libpq test program and
   renentrant ecpg library). If a thread environment is found then check
   for the reentrant functions will be done.
   
   Looking at various open source projects configure.in files there seems
   to be little commonality in the thread test macros (telp gratefully
   accepted!), I currently think that something like the approach used by
   glib is most suitable (switch on OS).
   
   All sound acceptable?
   
   Thanks, Lee.
   
   Peter Eisentraut writes:
 Lee Kindness writes:
 
  Patches attached to make libpq thread-safe, now uses strerror_r(),
  gethostbyname_r(), getpwuid_r() and crypt_r() where available. Where
  strtok() was previously used strchr() is now used.
 
 AC_TRY_RUN tests are prohibited.  Also, try to factor out some of these
 huge tests into separate macros and put them into config/c-library.m4.
 And it would be nice if there was some documentation about what was
 checked for.  If you just want to check whether gethostbyname_r() has 5 or
 6 arguments you can do that in half the space.
 

[ Attachment, skipping... ]

[ Attachment, skipping... ]

[ Attachment, skipping... ]

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] psql and readline

2003-02-03 Thread Bruce Momjian

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---


Ross J. Reedstrom wrote:
 On Fri, Jan 10, 2003 at 11:02:55PM +0100, Peter Eisentraut wrote:
  Ross J. Reedstrom writes:
  
   I already posted a one-line patch to implement this, but it doesn't
   seem to hve come through to the list. Here it is inline, instead of as
   an attachment:
  
  We need this to work without readline as well.  (Of course there won't be
  any history, but it needs to compile.)
 
 blush Even after slogging my way through the nesting #ifdefs for readline
 and win32, I forgot! Let's make that a three line patch, then.
 
 
 Index: src/bin/psql/command.c
 ===
 RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/command.c,v
 retrieving revision 1.84
 diff -u -r1.84 command.c
 --- src/bin/psql/command.c2002/10/23 19:23:56 1.84
 +++ src/bin/psql/command.c2003/01/10 22:06:07
 @@ -1639,6 +1639,9 @@
   error = true;
   }
  
 +#ifdef USE_READLINE
 + replace_history_entry(where_history(),query_buf-data,NULL);
 +#endif
   fclose(stream);
   }
  
 Ross
 
 ---(end of broadcast)---
 TIP 2: you can get off all lists at once with the unregister command
 (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] Interactive Documentation - how do you want it towork?

2003-02-03 Thread Bruce Momjian
Dave Page wrote:
  I looked at that URL, and it is good example of what _not_ to 
  do with interactive docs, IMHO.  The manual page is _very_ 
  short, and shows no examples.  The comments have various 
  examples/cases, with corrections later to earlier postings.  
  I would think this is not what we want.  We want a longer 
  manual page, with _correct_ examples that show typical usage.
  
  I know folks like those comments, but isn't it showing cases 
  where the curt documentation just doesn't cut it?
 
 OK point taken. What about the issue that the comments get merged into
 later docs, which is often not helpful if someone is searching the older
 docset (because they are using the older version)?
 
 Perhaps we should then prune the garbage out of the old version, and
 make the comments version specific so that we start afresh with the new
 docs, but leave the useful comments against the older versions?

Yes, I can see keeping the old comments on old releases, but frankly, if
it requires any special effort, it isn't worth the trouble.  We are
improving this thing so fast I can barely keep up.


-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Interactive Documentation - how do you want it towork?

2003-02-03 Thread Bruce Momjian
Dave Page wrote:
 
  -Original Message-
  From: Bruce Momjian [mailto:[EMAIL PROTECTED]] 
  Sent: 03 February 2003 11:40
  To: Dave Page
  Cc: Neil Conway; PostgreSQL Hackers
  Subject: Re: [HACKERS] Interactive Documentation - how do you 
  want it towork?
  
  
  
  I looked at that URL, and it is good example of what _not_ to 
  do with interactive docs, IMHO.  The manual page is _very_ 
  short, and shows no examples.  The comments have various 
  examples/cases, with corrections later to earlier postings.  
  I would think this is not what we want.  We want a longer 
  manual page, with _correct_ examples that show typical usage.
  
  I know folks like those comments, but isn't it showing cases 
  where the curt documentation just doesn't cut it?
 
 OK point taken. What about the issue that the comments get merged into
 later docs, which is often not helpful if someone is searching the older
 docset (because they are using the older version)?
 
 Perhaps we should then prune the garbage out of the old version, and
 make the comments version specific so that we start afresh with the new
 docs, but leave the useful comments against the older versions?
 
 Regards, Dave.
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [HACKERS] Interactive Documentation - how do you want it towork?

2003-02-03 Thread Dave Page


 -Original Message-
 From: Bruce Momjian [mailto:[EMAIL PROTECTED]] 
 Sent: 03 February 2003 13:04
 To: Dave Page
 Cc: Neil Conway; PostgreSQL Hackers
 Subject: Re: [HACKERS] Interactive Documentation - how do you 
 want it towork?
 
  Perhaps we should then prune the garbage out of the old 
 version, and 
  make the comments version specific so that we start afresh with the 
  new docs, but leave the useful comments against the older versions?
 
 Yes, I can see keeping the old comments on old releases, but 
 frankly, if it requires any special effort, it isn't worth 
 the trouble.  We are improving this thing so fast I can 
 barely keep up.

The only effort required would be to note and delete the 'junk' comments
which is minimal work, especially if going through them anyway. There is
no web interface for deletion (yet) but it will identify the comment IDs
for you. I'm happy to accept lists of items to delete.

Regards, Dave.

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] Interactive Documentation - how do you want it

2003-02-03 Thread Rod Taylor
 The only effort required would be to note and delete the 'junk' comments
 which is minimal work, especially if going through them anyway. There is
 no web interface for deletion (yet) but it will identify the comment IDs
 for you. I'm happy to accept lists of items to delete.

Toss an 'Send note to moderator' ability into the comments area about a
specific comment and that may become a bit easier.

-- 
Rod Taylor [EMAIL PROTECTED]

PGP Key: http://www.rbt.ca/rbtpub.asc



signature.asc
Description: This is a digitally signed message part


Re: [HACKERS] MOVE LAST: why?

2003-02-03 Thread Bruce Momjian

The following patch removes FETCH LAST and instead supports FETCH ALL. 
It also clarifies the docs to mention it sits on the last row, not after
the last row.

Applied.

---

Tom Lane wrote:
 Bruce Momjian [EMAIL PROTECTED] writes:
  Hiroshi Inoue wrote:
  Are you suggesting removing FETCH LAST _and_ MOVE LAST?. 
  
  Yes. Should cursors be positioned on the last row
  or EOF by MOVE LAST ? Anyway I see no necessity to use
  the standard keyword LAST currently.
  
  I think MOVE LAST works well.
 
  OK, so we will switch it to MOVE END.  That seems OK.
 
 What is good about that???  We already have a nonstandard keyword
 for this functionality: MOVE ALL.  There is no reason to invent another
 one.
 
 I tend to agree with Hiroshi that it's a bad idea to add a standard
 keyword to represent not-quite-standard behavior.  MOVE ALL is our
 historical spelling for this functionality, and adding MOVE LAST is
 not really bringing anything to the party.
 
   regards, tom lane
 
 ---(end of broadcast)---
 TIP 5: Have you checked our extensive FAQ?
 
 http://www.postgresql.org/users-lounge/docs/faq.html
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

Index: doc/src/sgml/ref/fetch.sgml
===
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/fetch.sgml,v
retrieving revision 1.23
diff -c -c -r1.23 fetch.sgml
*** doc/src/sgml/ref/fetch.sgml 8 Jan 2003 00:22:26 -   1.23
--- doc/src/sgml/ref/fetch.sgml 3 Feb 2003 14:00:38 -
***
*** 22,28 
/refsynopsisdivinfo
synopsis
  FETCH [ replaceable class=PARAMETERdirection/replaceable ] [ replaceable 
class=PARAMETERcount/replaceable ] { IN | FROM } replaceable 
class=PARAMETERcursor/replaceable
! FETCH [ FORWARD | BACKWARD | RELATIVE ] [ replaceable 
class=PARAMETER#/replaceable | ALL | LAST | NEXT | PRIOR ]
  { IN | FROM } replaceable class=PARAMETERcursor/replaceable
/synopsis
  
--- 22,28 
/refsynopsisdivinfo
synopsis
  FETCH [ replaceable class=PARAMETERdirection/replaceable ] [ replaceable 
class=PARAMETERcount/replaceable ] { IN | FROM } replaceable 
class=PARAMETERcursor/replaceable
! FETCH [ FORWARD | BACKWARD | RELATIVE ] [ replaceable 
class=PARAMETER#/replaceable | ALL | NEXT | PRIOR ]
  { IN | FROM } replaceable class=PARAMETERcursor/replaceable
/synopsis
  
***
*** 107,123 
  
 varlistentry
  term
-  LAST
- /term
- listitem
-  para
-   Same as literalALL/, but conforms to SQL92 syntax.
-  /para
- /listitem
-/varlistentry
- 
-varlistentry
- term
   NEXT
  /term
  listitem
--- 107,112 
***
*** 212,218 
 If the number of rows remaining in the cursor is less
 than replaceable class=PARAMETER#/replaceable,
 then only those available are fetched.
!Substituting the keyword ALL or LAST in place of a number will
 cause all remaining rows in the cursor to be retrieved.
 Rows may be fetched in both FORWARD and BACKWARD
 directions. The default direction is FORWARD.
--- 201,207 
 If the number of rows remaining in the cursor is less
 than replaceable class=PARAMETER#/replaceable,
 then only those available are fetched.
!Substituting the keyword ALL in place of a number will
 cause all remaining rows in the cursor to be retrieved.
 Rows may be fetched in both FORWARD and BACKWARD
 directions. The default direction is FORWARD.
***
*** 220,232 
  
para
 The cursor position can be before the first row of the query result, or on
!any particular row of the result, or after the last row of the result.
 When created, a cursor is positioned before the first row.  After fetching
 some rows, the cursor is positioned on the last row retrieved.  A new
 commandFETCH/command always steps one row in the specified direction
 (if possible) before beginning to return rows.  If the
 commandFETCH/command requests more rows than available, the cursor is
!left positioned after the last row of the query result (or before the first
 row, in the case of a backward fetch).  This will always be the case after
 commandFETCH ALL/.
/para
--- 209,221 
  
para
 The cursor position can be before the first row of the query result, or on
!any particular row of the result.
 When created, a cursor is positioned before the first row.  After fetching
 some rows, the cursor is positioned on the last row retrieved.  A new
 commandFETCH/command 

Re: [HACKERS] Interactive Documentation - how do you want it towork?

2003-02-03 Thread Tom Lane
Dave Page [EMAIL PROTECTED] writes:
 Perhaps we should then prune the garbage out of the old version, and
 make the comments version specific so that we start afresh with the new
 docs, but leave the useful comments against the older versions?

It seems clear to me that the comments *should* be version specific,
if that's at all feasible.  When we make a new release then we can
start with zero comments if that seems appropriate --- but as long as
an older set of docs remains on-line, it should have the comments that
were made for it.

regards, tom lane

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Interactive Documentation - how do you want it towork?

2003-02-03 Thread Dave Page


 -Original Message-
 From: Tom Lane [mailto:[EMAIL PROTECTED]] 
 Sent: 03 February 2003 14:39
 To: Dave Page
 Cc: Bruce Momjian; Neil Conway; PostgreSQL Hackers
 Subject: Re: [HACKERS] Interactive Documentation - how do you 
 want it towork? 
 
 
 Dave Page [EMAIL PROTECTED] writes:
  Perhaps we should then prune the garbage out of the old 
 version, and 
  make the comments version specific so that we start afresh with the 
  new docs, but leave the useful comments against the older versions?
 
 It seems clear to me that the comments *should* be version 
 specific, if that's at all feasible.  When we make a new 
 release then we can start with zero comments if that seems 
 appropriate --- but as long as an older set of docs remains 
 on-line, it should have the comments that were made for it.

Yes, from the various discussions here and elsewhere I think this is
going to be the way to go. I will make the appropriate change now.

Regards, Dave.

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] constraint defaults still print

2003-02-03 Thread Bruce Momjian

OK, NO ACTION (the default) no longer prints for foreign key constraints:


regression= \d clstr_tst
  Table public.clstr_tst
 Column |  Type   |Modifiers
+-+--
 a  | integer | not null default nextval('public.clstr_tst_a_seq'::text)
 b  | integer |
 c  | text|
 d  | text|
Indexes: clstr_tst_pkey primary key btree (a),
 clstr_tst_b btree (b),
 clstr_tst_b_c btree (b, c),
 clstr_tst_c btree (c),
 clstr_tst_c_b btree (c, b)
Foreign Key constraints: clstr_tst_con FOREIGN KEY (b) REFERENCES 
clstr_tst_s(rf_a)



---

Christopher Kings-Lynne wrote:
 I vote for not showing 'NO ACTION', so long as it's the SQL standard
 default...
 
 Chris
 
 On Sat, 18 Jan 2003, Bruce Momjian wrote:
 
  Remember how we made DEFERRABLE/DEFERRED not print if the constraint was
  the default.  Shouldn't we do the same for MATCH and ON UPDATE/ON DELETE
  sections of the constraint in pg_get_constraintdef()?
 
  Doing \d I see:
 
  test= \d sales
Table public.sales
Column   |  Type   | Modifiers
  ---+-+---
   product_id| integer | not null
   store_id  | integer | not null
   quantity_sold | integer | not null
   date_time_of_sale | date| not null
  Foreign Key constraints: $1 FOREIGN KEY (product_id) REFERENCES
  products(product_id) ON UPDATE NO ACTION ON DELETE NO ACTION,
   $2 FOREIGN KEY (store_id) REFERENCES
  stores(store_id) ON UPDATE NO ACTION ON DELETE NO ACTION
 
  If NO ACTION is the default, is there a need to print them?  This would
  also shorten pg_dump output.
 
  --
Bruce Momjian|  http://candle.pha.pa.us
[EMAIL PROTECTED]   |  (610) 359-1001
+  If your life is a hard drive, |  13 Roberts Road
+  Christ can be your backup.|  Newtown Square, Pennsylvania 19073
 
  ---(end of broadcast)---
  TIP 2: you can get off all lists at once with the unregister command
  (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
 
 
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

Index: src/backend/utils/adt/ruleutils.c
===
RCS file: /cvsroot/pgsql-server/src/backend/utils/adt/ruleutils.c,v
retrieving revision 1.132
diff -c -c -r1.132 ruleutils.c
*** src/backend/utils/adt/ruleutils.c   10 Jan 2003 21:08:15 -  1.132
--- src/backend/utils/adt/ruleutils.c   3 Feb 2003 14:57:33 -
***
*** 642,648 
switch (conForm-confupdtype)
{
case FKCONSTR_ACTION_NOACTION:
!   string = NO ACTION;
break;
case FKCONSTR_ACTION_RESTRICT:
string = RESTRICT;
--- 642,648 
switch (conForm-confupdtype)
{
case FKCONSTR_ACTION_NOACTION:
!   string = ;
break;
case FKCONSTR_ACTION_RESTRICT:
string = RESTRICT;
***
*** 662,673 
string = ;/* keep compiler quiet 
*/
break;
}
!   appendStringInfo(buf,  ON UPDATE %s, string);
  
switch (conForm-confdeltype)
{
case FKCONSTR_ACTION_NOACTION:
!   string = NO ACTION;
break;
case FKCONSTR_ACTION_RESTRICT:
string = RESTRICT;
--- 662,674 
string = ;/* keep compiler quiet 
*/
break;
}
!   if (strlen(string) != 0)
!   

Re: [HACKERS] Interactive Documentation - how do you want ittowork?

2003-02-03 Thread Dave Page


 -Original Message-
 From: Rod Taylor [mailto:[EMAIL PROTECTED]] 
 Sent: 03 February 2003 13:18
 To: Dave Page
 Cc: Bruce Momjian; Neil Conway; PostgreSQL Hackers
 Subject: Re: [HACKERS] Interactive Documentation - how do you 
 want ittowork?
 
 
  The only effort required would be to note and delete the 'junk' 
  comments which is minimal work, especially if going through them 
  anyway. There is no web interface for deletion (yet) but it will 
  identify the comment IDs for you. I'm happy to accept lists 
 of items 
  to delete.
 
 Toss an 'Send note to moderator' ability into the comments 
 area about a specific comment and that may become a bit easier.

That's a good idea. I'll look into that.

Regards, Dave.

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] Win32 Powerfail testing - results

2003-02-03 Thread Vince Vielhaber
On Mon, 3 Feb 2003, Dave Page wrote:

 Well the results are finally in. Hopefully we can concentrate on putting
 them right, rather than having a round of told you so's :-)

 I modified the test program slightly to improve the consistency checks.
 The updated version is attached.

[...]


 Run | Errors Detected
 =
  07 | COUNT CHECK - Duplicate or missing rows detected (10262)!!
  09 | DISTINCT CHECK - Duplicate or missing rows detected (9893)!!
 | COUNT CHECK - Duplicate or missing rows detected (9893)!!
  14 | COUNT CHECK - Duplicate or missing rows detected (10024)!!

Out of curiousity, what was required to return things to normal
again?

Vince.
-- 
 Fast, inexpensive internet service 56k and beyond!  http://www.pop4.net/
   http://www.meanstreamradio.com   http://www.unknown-artists.com
 Internet radio: It's not file sharing, it's just radio.


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] Win32 Powerfail testing - results

2003-02-03 Thread Rod Taylor
 I modified the test program slightly to improve the consistency checks.
 The updated version is attached.

For curiosity sake, I've compiled it and am running it on FreeBSD with
soft-updates enabled.

A few variable declarations needed to be bumped up to the top of their
respective function.

Any change of tossing in a periodic VACUUM or would that throw off the
results?


-- 
Rod Taylor [EMAIL PROTECTED]

PGP Key: http://www.rbt.ca/rbtpub.asc



signature.asc
Description: This is a digitally signed message part


Re: [HACKERS] Win32 Powerfail testing - results

2003-02-03 Thread Dave Page
 Rod Taylor allegedly said:
 I modified the test program slightly to improve the consistency
 checks. The updated version is attached.

 For curiosity sake, I've compiled it and am running it on FreeBSD with
 soft-updates enabled.

 A few variable declarations needed to be bumped up to the top of their
 respective function.

I've been doing a fair bit of C++ recently...

 Any change of tossing in a periodic VACUUM or would that throw off the
 results?

Dunno, Tom could best answer that, but a *complete guess* based on piecing
together tidbits of how it all works from various threads here, would be
that it would merely increase the time period during which a powerfail
would be unlikely to cause duplicate rows. Reasoning for this is that
vacuum would be messing with tuples that are already dead.
Please correct me if I'm wrong :-)

Regards, Dave.



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Win32 Powerfail testing - results

2003-02-03 Thread Tom Lane
Dave Page [EMAIL PROTECTED] writes:
  Rod Taylor allegedly said:
 Any change of tossing in a periodic VACUUM or would that throw off the
 results?

 Dunno, Tom could best answer that, but a *complete guess* based on piecing
 together tidbits of how it all works from various threads here, would be
 that it would merely increase the time period during which a powerfail
 would be unlikely to cause duplicate rows. Reasoning for this is that
 vacuum would be messing with tuples that are already dead.

I think it'd be interesting to try it both ways.  VACUUM might throw in
new failure modes.  I'm not sure if it could mask the failure mode you
already found.

regards, tom lane

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] Windows Build System - My final thoughts

2003-02-03 Thread Jan Wieck
Lamar Owen wrote:
 
 On Friday 31 January 2003 03:21, Bruce Momjian wrote:
  Man, I go away for one day, and look what you guys get into.  :-)
 
 No duh.  Whew.
 
  Lastly, SRA just released _today_ their first Win32 port of PostgreSQL,
  and it is _threaded_:
 
http://osb.sra.co.jp/PowerGres/
 
 Is there an English translation of the site so one who doesn't speak or write
 Japanese can try it out?

Bruce, better be careful!

If SRA hasn't done exzessive power-off and other crash testing, beware
of the dogs :-)


Jan

-- 
#==#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.  #
#== [EMAIL PROTECTED] #

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] MOVE LAST: why?

2003-02-03 Thread Hiroshi Inoue
Bruce Momjian wrote:
(B 
(B It also clarifies the docs to mention it sits on the last row, not after
(B the last row.
(B
(BIs it true ? 
(B
(Bregards,
(BHiroshi Inoue
(Bhttp://www.geocities.jp/inocchichichi/psqlodbc/
(B
(B---(end of broadcast)---
(BTIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] Interactive Documentation - how do you want it towork?

2003-02-03 Thread Ronald Chmara
On Monday, February 3, 2003, at 04:39  AM, Bruce Momjian wrote:

I looked at that URL, and it is good example of what _not_ to do with
interactive docs, IMHO.  The manual page is _very_ short, and shows no
examples.  The comments have various examples/cases, with corrections
later to earlier postings.  I would think this is not what we want.  We
want a longer manual page, with _correct_ examples that show typical
usage.

I know folks like those comments, but isn't it showing cases where the
curt documentation just doesn't cut it?


Well, I happen to have some erm... experience with the PHP system. I 
can offer a bit of history in this conversation about what seems to 
have worked, and what doesn't work.

What is *supposed* to happen with the pages and notes works like this:
1. Manual page goes online. Almost all manual pages begin with a bare 
skeleton, derived from the raw code itself. Some developers are nice 
enough to, oh, explain what it means. :-)
2. Comments, corrections, and additional examples are submitted.
3. Notes and doc editors go through all the notes, roll all of the best 
ones *into* the docs, delete redundancies (2 similar examples is 
silly), fix errors in the page *and* other notes, and do other garbage 
cleanup.
4. Notes are removed when they are no longer relevant. A note that 
duplicates current documentation would not be relevant. A note that 
pertains to a version or behavior that is no longer supported is not 
relevant.
5. If a page has a lot of notes, that means it should be re-documented. 
There have been days when I've cleared hundreds of notes with ten 
lines of text, and a four line code example.

After working with it (php's notes system) off and on for about 2 (3?) 
years, here are some of the major *problems* in the PHP system:
1. Silly slashdot mentality, were every opinion and tip imaginable 
gets submitted into the notes. (If running PHP on a TRS-80 tweaked out 
as a hobby project, don't forget to make sure your error logs are 
written to a faster device than cassette!!.)
2. People are using the doc notes to submit bug reports. Constantly. 
Annoyingly. So frequently that we automated their rejection.
3. People are using the doc notes to submit coding questions. 
Constantly. Annoyingly. So frequently that we automated their rejection.
4. Keeping up with the submissions. PHP can get hundreds a day, of 
which 98% or so are useless. There are people who read a php-notes 
mailing list all day long, and at the bottom of each email is a set of 
one-click URLs to take action... reject, edit, and delete (the 
automation mentioned above). And yet, bad notes still get published, 
because there's only so many a person can read...
5. Keeping notes editors motivated. Talk about a thankless job. :-)
6. Editing the manual page code is _much_ more complex than editing the 
notes. As a result, rather than updating the manual, the notes often 
get updated instead, or are never rolled into the manual. To master the 
notes, you need to drive a browser. To master the docs, there's 
docbook, XML, cvs, the doc structure, etc. etc. Helpful contributors 
have an easier time with the notes.

In regards to terse vs. verbose documentation, this comes up with PHP 
every so often. There are a few different angles to the issue:
1. Terse proponents who want the palm-pilot version or the windows 
helpfile (CHM) of the PHP manual seem to want the tiniest amount of 
text. Function prototypes and a description is about it, just as a 
memory jogger.
2. Slow-link, and offline browser, users are the same way, though they 
may appreciate *a single* example more.
3. The verbose proponents want user examples available in as many 
formats as possible, as many tips as possible, so solving a problem 
only requires *one* page.

Well, those are the challenges I've seen.

HTH with PostgreSQL.

-Bop


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org