From: Vivek Khera <vivek@khera.org>
To: pgsql-sql@postgresql.org
Subject: Re: question
Date: Tue, 30 Aug 2005 10:59:01 -0400
Message-ID: <9158F005-5B73-405A-8CD6-97D6B4621F62@khera.org> (raw)
In-Reply-To: <20050824050501.43778.qmail@web35204.mail.mud.yahoo.com>
References: <20050824050501.43778.qmail@web35204.mail.mud.yahoo.com>
On Aug 24, 2005, at 1:05 AM, Matt A. wrote:
> We used nullif('$value','') on inserts in mssql. We
> moved to postgres and love it but the nullif() doesn't
> match empty strings to each other to return null other
> than a text type, causing an error. This is a major
> part of our application.
I *certainly* hope you're not passing $value in straight from your
web form directly into the SQL. You're opening yourself up for SQL
injection attacks.
Why not just have your app that reads the form generate the proper
value to insert? That is the safe route.
Vivek Khera, Ph.D.
+1-301-869-4449 x806
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-sql@postgresql.org
Cc: vivek@khera.org
Subject: Re: question
In-Reply-To: <9158F005-5B73-405A-8CD6-97D6B4621F62@khera.org>
* 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