Mammoth
  • |
  • Contact
  • |
CMD | Command Prompt, Inc. - PostgreSQL Solutions, Support & Hosting
  • |
  • |
  • |
  • |
  • |
My turn on Oracle purchasing Sun.
Posted Friday Apr 24th, 2009 08:44am
by Joshua Drake
| Permalink

Follow cmdpromptinc on Twitter


I feel like I am coming late to this topic. All the pundits have already had there say and the blogosphere has been rampant. I have been talking with a lot of MySQL folks lately, encouraging them to at least test PostgreSQL as an alternative. MySQL folks are nervous. They don't like the opportunity Oracle brings to the table. This morning I was asked quite bluntly, "From your perspective what is the future of MySQL?". Read more...

Categories: PostgreSQL, OpenSource, Business

blog comments powered by Disqus
The great netbook giveaway
Posted Friday Apr 17th, 2009 03:39pm
by Joshua Drake
| Permalink

Follow cmdpromptinc on Twitter


At PostgreSQL Conference East, Platinum Sponsor EnterpriseDB raffled two Netbooks. This is the video of the raffle (only 5 minutes). Of particular interest is a certain Major Contributors response. Read more...

Categories: PostgreSQL, OpenSource

blog comments powered by Disqus
Escaping data madness
Posted Tuesday Apr 14th, 2009 02:16pm
by Joshua Drake
| Permalink

Follow cmdpromptinc on Twitter


We had an interesting issue crop up this past week. The question was, "How do we properly escape the following string...?". The string was:
You can't have it that way can you?
That seems like a pretty simple string right? On insert you would do one of the following:
   (E'You can\'t have it that way can you?');
   ($$You can't have it that way can you?$$);
   ('You can''t have it that way can you?');
You would think that would be the end of it. However, If you are using ODBC with a pass through query you will receive the error, "The # of binded parameters is < than the # of parameter markers." Yes, that's right. ODBC will parse the ? and interpret it as a parameter. This affects psqlodbc and ODBCng. Apparently it is actually not a bug [1]. I am not sure I agree with that, regardless of what Microsoft says. What is particularly interesting here is that it is specifically the ? that is the problem. Not the single quote. To work around this problem you can execute the query like this:
INSERT INTO foo VALUES ($$You can't have it that way can you?$$);
INSERT INTO foo VALUES ('You can''t have it that way can you?');
Of course neither of those are actually standard (the E'\'' is standard). 1. MSDN Data Platform developer center

Categories: PostgreSQL, OpenSource

blog comments powered by Disqus

Copyright © 2000-2013 Command Prompt, Inc. All Rights Reserved. All trademarks property of their respective owners.