Issue 72 in rpostgresql: postgresqlQuoteId should not quote *

2 views
Skip to first unread message

rpost...@googlecode.com

unread,
Dec 9, 2014, 5:14:51 AM12/9/14
to rpostgr...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 72 by richiero...@gmail.com: postgresqlQuoteId should not quote *
https://code.google.com/p/rpostgresql/issues/detail?id=72

postgresqlQuoteId wraps identifiers such as column names in double quotes.

It would be useful if an exception was made for an input of *, since this
should not be quoted. Currently, it is necessary to write code like:

ifelse(identifiers == "*", identifiers, postgresqlQuoteId(identifiers))

Current implementation:

postgresqlQuoteId <- function(identifiers)
{
ret <- paste("\"", gsub("\"", "\"\"", identifiers), "\"",
sep = "")
ret
}

Suggested new implementation:

postgresqlQuoteId <- function(identifiers)
{
ifelse(
identifiers == "*",
identifiers,
paste0('"', gsub('"', '""', identifiers), '"')
)
}


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages