[R-sig-DB] dbWriteTable() is renaming the 'end' column

Prof Brian Ripley r|p|ey @end|ng |rom @t@t@@ox@@c@uk
Wed Sep 30 19:46:49 CEST 2009


Why not simply use quoting?: RODBC manages to make it work cross-DBMS, 
so it cannot be too hard for just one.  (As I wrote, it would be 
harder to do in DBI without the support ODBC gives.)

On Wed, 30 Sep 2009, Seth Falcon wrote:

> Hi Hervé,
>
> 2009/9/29 Hervé Pagès <hpages using fhcrc.org>:
>> You are right that in the ANSI SQL standard, an SQL delimited identifier
>> is delimited by double quotes, not backquotes, sorry.
>> Anyway my point is that, among other possibilities, dbWriteTable() could
>> send a CREATE statement with delimited identifiers, so SQL keywords are
>> not an issue anymore. This is only one possibility. There are others,
>> like just returning an error if the column name is a keyword, or
>> allowing the user disable the mangling, etc. Anything
>> sounds better than silently mangling the column names.
>
> I agree that the silent name mangling is not so helpful, nor is the
> inconsistency in behavior when SQL keywords are used in different
> RSQLite functions.
>
> The question to decide is what change should be made?  Such requests
> could become errors with a message telling the user how to quote
> problem strings.  Or the mangling could be changed to use the quoted
> form and a warning issued.
>
> I would be interested to hear any opinions from users of RSQLite.
>
> + seth
>
>
> -- 
> Seth Falcon | @sfalcon | http://userprimary.net/user
>
> _______________________________________________
> R-sig-DB mailing list -- R Special Interest Group
> R-sig-DB using stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-db
>

-- 
Brian D. Ripley,                  ripley using stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


More information about the R-sig-DB mailing list