pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: George Koras <gkoras@cres.gr>
To: Gunnar Rønning <gunnar@polygnosis.com>
Cc: Barry Lind <barry@xythos.com>
Cc: Arsalan Zaidi <azaidi@directi.com>
Cc: PostgreSQL jdbc list <pgsql-jdbc@postgresql.org>
Subject: Re: Re: [INTERFACES] New code for JDBC driver
Date: Thu, 5 Jul 2001 13:20:40 +0300
Message-ID: <010d01c1053c$24f5cdf0$1a49e98f@cres.gr> (raw)
References: <200106301642.f5UGgkj14915@candle.pha.pa.us>
	<3B3E7A94.209@xythos.com>
	<00b801c102c4$fdd49ea0$4301a8c0@directi.com>
	<3B409F8F.7050408@xythos.com>
	<00b501c10386$00ab1e80$4301a8c0@directi.com>
	<3B41E22B.5000901@xythos.com>
	<005101c1052d$0a519330$1a49e98f@cres.gr>
	<m2elrvu1ji.fsf@smaug.polygnosis.com>

Yes, I agree that it certainly has to be done before SQL is sent to the
driver, i.e. in the middle tier!
Is it a performance bottleneck? Would PreparedStatement be more efficient?


----- Original Message -----
From: Gunnar Rønning <gunnar@polygnosis.com>
To: George Koras <gkoras@cres.gr>
Cc: Barry Lind <barry@xythos.com>; Arsalan Zaidi <azaidi@directi.com>;
PostgreSQL jdbc list <pgsql-jdbc@postgresql.org>
Sent: Thursday, July 05, 2001 1:13 PM
Subject: Re: [JDBC] Re: [INTERFACES] New code for JDBC driver


> * "George Koras" <gkoras@cres.gr> wrote:
>
> | So I guess a solution would be to escape *quotes* and not *semicolons
out of
> | quotes*, which is the solution I use in my programs and on which
comments
> | are invited . This also prevents the malicious use Arsanal is talking
about,
> | doesn't it?
> |
> | However the PreparedStatement solution (which I haven't tried) seems to
be
> | more elegant.
> |
>
> PreparedStatement is the right solution for this. If you don't trust
> your input SQL either use that or do custom escaping on before sending
> the SQL to the driver.
>
> I wouldn't like to add another performance bottleneck, especially when it
is
> not mandated by the spec. The JDBC driver for Sybase works the same way.
>
> regards,
>
>         Gunnar
> --
> Gunnar Rønning - gunnar@polygnosis.com
> Senior Consultant, Polygnosis AS, http://www.polygnosis.com/
>




view thread (17+ messages)  latest in thread

Message-ID: <010d01c1053c$24f5cdf0$1a49e98f@cres.gr>
Permalink:  ../010d01c1053c$24f5cdf0$1a49e98f@cres.gr/
Also on:    postgresql.org/message-id/010d01c1053c$24f5cdf0$1a49e98f@cres.gr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: gkoras@cres.gr, gunnar@polygnosis.com, barry@xythos.com, azaidi@directi.com, pgsql-jdbc@postgresql.org
  Subject: Re: Re: [INTERFACES] New code for JDBC driver
  In-Reply-To: <010d01c1053c$24f5cdf0$1a49e98f@cres.gr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox