On Tue, Jun 06/25/13, 2013 at 02:47:18PM -0400, Michael Bayer wrote: > > On Jun 25, 2013, at 2:13 PM, Ryan Kelly <[email protected]> wrote: > > > There are also some other parsing problems that I consider to be corner > > cases and broken as implemented in PostgreSQL, such as: > > > > (postgres@[local]:5432 14:05:43) [dev]> select 'a=>,b=>'::hstore; > > (postgres@[local]:5432 14:05:47) [dev]> select 'a=>, b=>'::hstore; > > (postgres@[local]:5432 14:06:45) [dev]> select 'a=> , b=>'::hstore; > > (postgres@[local]:5432 14:06:48) [dev]> select 'a=> ,b=>'::hstore; > > (postgres@[local]:5432 14:06:50) [dev]> select 'a=>,'::hstore; > > (postgres@[local]:5432 14:10:12) [dev]> select ',=>,'::hstore; > > > > None of which are parsed by SQLAlchemy but some of which are parsed by > > PostgreSQL. > > Posgresql or psycopg2 ? isn't the serialization here normally done > "natively" if you're on a more recent psycopg2?
Well these are really de-serialization. But yes, serialization and de-serialization are handled natively by psycopg2. In some circumstances we actually need to parse/write the values directly ourselves (usually when reading/writing files in the COPY format). Unfortunately, psycopg2's parser is much stricter than the documented format as it requires quoted keys (which in some ways make sense, as the server will never return anything unquoted) so none of the above examples work. -Ryan P. Kelly -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/groups/opt_out.
