[Nitro] invalid format for pg sequence query - SELECTnextval('"ogsimpletest"_oid_seq')

Reid Thompson reid.thompson at ateb.com
Mon Dec 17 20:58:44 EST 2007

Bill Kelly wrote:
>     seq = "#{klass::OGTABLE}_#{pk}_seq"
>     seq.tr!('"', '')  # %%BWK 070827 -- added this kludge to strip quotes from table name

> ^^^^ I just strip the quotes wholesale.

i now remember seeing the original post --

It looks like the code may have been written to account for
(from the the PostgreSQL docs )
  '...Quoting an identifier also makes it case-sensitive, whereas unquoted names 
are always folded to lower case. For example, the identifiers FOO, foo, and 
"foo" are considered the same by PostgreSQL, but "Foo" and "FOO" are different 
from these three and each other. (The folding of unquoted names to lower case in 
PostgreSQL is incompatible with the SQL standard, which says that unquoted names 
should be folded to upper case. Thus, foo should be equivalent to "FOO" not 
"foo" according to the standard. If you want to write portable applications you 
are advised to always quote a particular name or never quote it.)...'

( I'm thinking specifically the last line ).
In general, PostgreSQL forces the user to remember/manage this.

More information about the Nitro-general mailing list