From: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
---|---|
To: | Henrik Steffen <steffen(at)city-map(dot)de> |
Cc: | pgsql <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: update phenomenom |
Date: | 2003-06-07 20:03:53 |
Message-ID: | 3EE24529.9020905@Yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Henrik Steffen wrote:
> hi,
>
> I tried both:
>
> $command="UPDATE table SET miano='12345'; commit; ' WHERE ... ;";
>
>
> and
>
> $command="UPDATE table SET miano='12345'; -- ' WHERE ... ;";
>
>
> neither worked.
What do you mean "neither worked"?
the second form works just like a charm. I checked it with PG 7.3.3, DBI
1.14 and DBD::Pg 0.95.
>
> it just gives an error and dies.
> no update done.
What error and where is that coming from? If I use the comment hack it
doesn't show any message in the postmaster log. It is totally happy with
it and shows exactly the symptom you described.
> I looked at man DBI, but couldn't find any restriction
> for $dbh->prepare() .... I am not sure, if it's possible
> to pass multiple statements to the prepare-method.
I'm not too familiar with Perl, but if DBD blindly forwards the query
given in the string argument of prepare() into libpq's pg_exec() ... and
it is supposed to do it that way ... then it is possible to pass
multiple statements. This is a long standing functionality of the
frontend/backend protocol.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #
From | Date | Subject | |
---|---|---|---|
Next Message | Henrik Steffen | 2003-06-07 20:13:16 | Re: update phenomenom |
Previous Message | Ian Barwick | 2003-06-07 19:16:13 | Re: update phenomenom |