[wp-hackers] PostgreSQL port status?

Peter Westwood peter.westwood at ftwr.co.uk
Thu Oct 4 07:08:03 GMT 2007

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
> Wordpress.

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.

>  2) Use non-reserved tables and fields.  If a new version of MySQL
> comes out that adds an inconvenient reserved word, then the first
> version of WP needs to add backticks or provide a DB upgrade path with
> a field rename.

Thats all well and good but we state that we work with at leat MySQL
vx.x and so we should still work when MySQL y.y comes out and adds the
"autoload" keyword (for example) we still work.

- --
Peter Westwood
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the wp-hackers mailing list