eml icon indicating copy to clipboard operation
eml copied to clipboard

Single quote characters from data are not escaped when performing inserts

Open mbjones opened this issue 8 years ago • 2 comments


Author Name: Chad Burt (Chad Burt) Original Redmine Issue: 2756, https://projects.ecoinformatics.org/ecoinfo/issues/2756 Original Date: 2007-02-01 Original Assignee: Jing Tao


recieved this error: DatabaseLoader.run(): Error message: ERROR: syntax error at or near "only" regarding this line: INSERT into ... calm','"adrift; CTD dropped to 100' only; slight breeze"'

It seems that if a single quote is present within the data being entered it is not escaped. On this line "only" is seen as a postgres command since "100'" came before it.

mbjones avatar Mar 12 '17 03:03 mbjones

We need to discuss two aspects of this:

  1. Supporting custom units in the EMLNumericDomain model and the EMLAttributeView in the editor

  2. Support for storing and reusing custom units that have already been created, either on a per-user basis or as a unit registry (this can be informed by the LTER units registry (units.lternet.edu)

csjx avatar Aug 16 '17 18:08 csjx

Many units we receive are custom. This is potentially a big time consumer for us as we anticipate submitters will write in to say that their unit is not in the list and ask what they should do. We can tell them to pick the closest one, but often they will say that none are close. We can tell them just to pick something, and then we'd have to go back and change them to custom units that they define in an email to us or in an attached doc.

Also, dimensionless is used often and should maybe stand out separately , rather than being buried in an alphabetical listing. Some contributors look for unitless and may not find dimensionless. It would also benefit from examples: "such as for percent or ppm".

jagoldstein avatar Jan 22 '18 18:01 jagoldstein

This issue arose again in the Arctic Data training, with a strong vote for the need to be able to create custom units for new data sets.

mbjones avatar Jan 14 '19 22:01 mbjones