Re: Tsearch2 update for Win32.

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <mha(at)sollentuna(dot)net>, Dave Page <dpage(at)vale-housing(dot)co(dot)uk>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Tsearch2 update for Win32.
Date: 2004-09-08 16:17:24
Message-ID: 413F3094.8020800@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane wrote:

>"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
>
>
>>>Oh. Hmm ... wouldn't it be easier and safer to launch "psql <script"
>>>as a subprocess?
>>>
>>>
>
>
>
>>I'd say no. Executing processes from the installer environment can be a
>>headache (we've had enough problems with initdb already..). And you have
>>to go through all the weirdness with the commandline quoting etc on
>>win32... It's a lot easier to execute a SQL script line-by-line. Which
>>also lets us trap the errors easier etc.
>>
>>
>
>I was about to mention trapping errors as being a likely weak spot of
>custom-script-execution code. And have you duplicated psql's rather
>extensive logic for determining where SQL commands end? I'll get a bit
>annoyed if you come back later and tell us not to use dollar quoting
>in contrib scripts, or something like that.
>
>However, the COPY->INSERT change alone is below my threshold of pain,
>so I won't complain too hard. I just wanted to be sure you'd really
>thought about the implications of rolling your own script executor.
>
>
>
>

Not to mention someone putting a \ command in the install script. I
understand the difficulties, but ISTM that getting "psql -f scriptfile"
working could be a Good Thing (tm). OTOH, should the installer be
running the contrib install scripts, or should this be left as a job for
the administrator? Maybe we're trying to do too much.

cheers

andrew

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Dave Page 2004-09-08 16:24:39 Re: Tsearch2 update for Win32.
Previous Message Dave Page 2004-09-08 15:14:39 Re: Tsearch2 update for Win32.