[wp-hackers] PostgreSQL port status?
peter.westwood at ftwr.co.uk
Thu Oct 4 07:59:42 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
usleepless at gmail.com wrote:
> On 10/4/07, Peter Westwood <peter.westwood at ftwr.co.uk> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> Tom Barta wrote:
>>> On 10/2/07, Leonid Mamchenkov <leonid at mamchenkov.net> wrote:
>>>> On 10/2/07, usleepless at gmail.com <usleepless at gmail.com> wrote:
>>>>> But as Tom pointed out, (reserverd) keywords are ... well ... kind of
>>>>> reserved. Don't use them as identifiers.
>>>> I guess there is an added benefit of forward compatibility in escaping
>>>> fields and table names. Words which are not reserved now can become
>>>> so in the future.
>>> Ok, so there's at least two options:
>>> 1) Use backticks to escape tables and fields. This future-proofs
>>> against MySQL reserved keyword changes (how frequently does that
>>> happen?). It also makes it harder to use /any other database/ with
>> Why does it make it harder.
>> Replacing all the backticks in a mysql statement passed to
>> $wpdb->prepare is surely just a simple search and replace.
> except for the fact you can't use backticks in posts anymore. they
> will be replaced into oblivion.
Yes you can, you can replace the backticks in the SQL statement passed
to wpdb->prepare _before_ you sprintf in the post content.
As we are switching to wpdb->prepare for as many as possible, if not
all, the queries for v2.4 this will be simple for a drop in wp-db.php to
do to enable support for other db's
> you might as well write
> (x + (2*y)) instead of x+2*y
> because... well... you know... perhaps the precedence of * over +
> might change. better be safe than sorry! you never know!
Actually, it is good programming practice to include the parenthesis -
It makes it easier to read and understand the true outcome of the equation.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the wp-hackers