Skip to content
Back to formatted view

Raw Message

Message-ID: <CABdHhvEcqpNo4_OzY+pp2_K1mX2srQkAe5Ng18vr2fknUo9JmQ@mail.gmail.com>
Date: 2013-10-18T19:04:50Z
From: Hadley Wickham
Subject: SQL escaping/quoting proposal
In-Reply-To: <52616F32.2050909@gmail.com>

> Regarding (b), my reasoning is that when working with Postgres, I would want
> to allow Postgres to do its normal lower casing of unquoted identifiers.
> That is, `thisField` is a valid identifier, but passed in quoted case will
> be preserved, which means always having to quote the identifier in the
> future. Passed in quoted, Postgres will force it to `thisfield`, and if a
> client requests `thisField` unquoted, the correct field will be returned.

It might be reasonable to opt in to this behaviour, but it's dangerous
by default because R is case-sensitive. What happens if you're using
dbWriteTable with this data.frame?

df <- data.frame(a = 1, A = 2)

Hadley

-- 
Chief Scientist, RStudio
http://had.co.nz/