12:53:09XachHmm, is this ok? (defun starts-with (subseq seq test) (and (<= (length subseq) (length seq)) (every test subseq seq))?
12:53:41XachI've done endless variations of a starts-with thing and I don't remember using this. (e.g. mismatch, :start and :end with string= and stuff, etc)
16:29:22dimyou need to parse the file down to single statements
16:30:11dimyou can use my code for that from pgloader at https://github.com/dimitri/pgloader/blob/master/src/utils/read-sql-files.lisp
16:30:46dimphoe: the reason why it fails is that Postmodern is using the PostgreSQL extended query protocol which works with a query at a time, with out-of-line parameters (good to avoid SQL injections)
16:31:03dimthe trade-off is that you then need to make sure in the app that you're sending one query at a time using that protocol
16:32:05dimhttps://github.com/dimitri/pgloader/blob/master/src/utils/read-sql-files.lisp implements a simple hand-written parser for SQL queries delited with a semi-colon (;)... not that simple, it knows about dollar-quoting and other forms of escaping
16:32:58dimselect E'\';' as ";"; is an example of a corner-case when parsing SQL queries from a file
16:33:17dimthe result is a single value '; in a column named ;
16:42:58jackdanieldim: did you see my yesterday's comment?
16:49:24jackdanielsure, let me know if that helped
17:00:46dimThere is no package with the name PGLOADER
17:00:54dimok I'm not sure what gets into the binary I'm preparing
17:02:14dimjackdaniel: http://paste.debian.net/1074118/ if you want to have a look, but don't allocate time for that, I was just curious about building pgloader with ECL that's all
17:02:27jmercouriswhy does (string-downcase nil) return "nil", is there a more sensible function that will actually return nil?
17:03:19dlowestrings designators (which include symbols) are converted to strings if they are not strings
17:03:21beachjmercouris: What is wrong with what it does?
17:50:24shka_declaim inline here and there, replaced few defmethod with defun, replaced one class with struct, changed few internal functions
17:50:46shka_most of it is no big deal, but it is more rigid now
17:51:20shka_so it may interfere with overall design
17:51:48shka_and not many people here seems to have some jumbo csv files
18:08:32phoedim: does it mean that I likely won't get a (postmodern:execute-file #p"/home/phoe/foo.sql")?
18:09:18phoeit doesn't make much sense to me - in order to execute a SQL file, I need to either parse and digest it, or drop all the way down to bash to execute "psql < foo.sql"
18:10:21phoejmercouris: (check-type x string) (string-downcase x)