From: Marc Teitelbaum <[email-masked]>
Date: Fri, 25 Mar 1994 12:54:11 -0800

------- Forwarded Message

Date: Wed, 23 Mar 1994 17:14:51 --100
From: [email-masked] (Tom Vijlbrief)
To: [email-masked]
Subject: postgres fixes
Cc: [email-masked]
Content-Length: 2250

Hi Marc,

I found a number of problems in your beta release.

Copy from stdin does not work correctly when reading from a file.

This is the fix (add 6 lines to monitor.c):

        while (!linedone) {             /* for each buffer ... */
            s = copybuf;
            buflen = COPYBUFSIZ;
            for (; buflen > 1 &&
                 !(linedone = ((c = getc(stdin)) == '\n' || c == EOF));
                 --buflen) {
                *s++ = c;
            }
 
            /* Bug fix for reading from stdin, [email-masked] */
            if (c == EOF) {
              PQputline(".");
              copydone = true;
              break;
            }
 
            *s = '\0';
            PQputline(copybuf);
            if (firstload) {

Also ipcclean.sh could not be found when installing.

I also suggest setting umask to 022 in backend/commands/copy.c:

    else
    {
#if 1
        mode_t oldum= umask(022);
#endif
        if (pipe && IsUnderPostmaster) SendCopyBegin();
        if (IsUnderPostmaster)
        {
            fp = pipe ? Pfout : fopen(filename, "w");
        }
        else
        {
            fp = pipe ? stdout : fopen(filename, "w");
        }
#if 1
        umask(oldum);
#endif
        if (fp == NULL)
        {

Also the test in createuser could be:

if [ $ADDUSER"" != "t" ]

so that the script does not fail when the user is not yet in the
pg_user table (I noticed this when su-ed as postgres I tried
to add myself but the USER env variable was not set at postgres)

As a last point, I get these messages:

NOTICE:Mar 23 16:31:57:[54] (freeNext=34, freePrev=63, relname=pg_classnameind, blockNum=1, flags=0x14, refcount=0 0)
NOTICE:Mar 23 16:31:57:[55] (freeNext=52, freePrev=35, relname=pg_procidind, blockNum=2, flags=0x14, refcount=0 0)
NOTICE:Mar 23 16:31:57:[56] (freeNext=15, freePrev=37, relname=pg_procidind, blockNum=3, flags=0x14, refcount=0 0)

These are generated when adding operators

define operator <<  (arg1 = BOX2, arg2 = BOX2, procedure = Overleft2BoxBox,
   negator = !<<, restrict = intltsel, join = intltjoinsel)
\g

Could you please notify me of any additional changes you make
because I made a solaris port....

Thanks for the final postgres release, it works quite well....

Tom

------- End of Forwarded Message