On 2011-10-07 05:59, Mark Kerzner wrote: > Sjoerd, > > I have a limited task at hand: I need to binary-load fixed-length > strings, or byte arrays, or anything that is not a number. Is there > workaround?
I'm afraid I can't think of anything. You'll just have to use COPY INTO from a CSV file (fastest) or INSERT. The way strings are stored internally is quite complex so therefore there is no quick-and-dirty way to get them into the server (like there is with integers). If the strings are all 4 or 8 bytes long, you could of course treat them as integers, but then you can't do string-like operations on them, and converting them to strings within the server will be hard. > Thank you, > Mark > > On Wed, Oct 5, 2011 at 2:14 PM, Sjoerd Mullender <sjo...@acm.org > <mailto:sjo...@acm.org>> wrote: > > On 2011-10-05 20:21, Mark Kerzner wrote: > > Hi, > > > > I've tried quite a few things (creating the files/strings with 0 > at the > > end, with 0 and \n at the end, fixed length, etc.) but I still get > an error > > > > sql>copy into sku from ('/home/mark/MonetDbData/myfile); > > SQLException:sql:failed to attach file /home/mark/MonetDbData/myfile > > > > I know that I can load integer values, because that works, so the > > problem must be in how I am formatting strings for MonetDB binary > load. > > Are there any examples or any dumps to look at? > > Attaching strings is not supported. In other words, there is no way you > can do this with strings. > > The reason that it is not supported is that the layout of strings is > much more complex. > > -- > Sjoerd Mullender > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > Monetdb-developers mailing list > Monetdb-developers@lists.sourceforge.net > <mailto:Monetdb-developers@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/monetdb-developers > > -- Sjoerd Mullender
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers