Thanks to the Postgres Weekly issue #89 and a post to Hacker News front page (see Pgloader: A High-speed PostgreSQL Swiss Army Knife, Written in Lisp it well seems that I just had my first Slashdot effect…
PostgreSQL comes with an awesome bulk copy protocol and tooling best known
as the
COPY and
\copy
commands. Being a transactional system, PostgreSQL
COPY implementation will
ROLLBACK
any work done if a single error is found
in the data set you’re importing. That’s the reason why
pgloader got
started: it provides with error handling for the
COPY protocol.
Earlier this year we did compare compare Aggregating NBA data, PostgreSQL vs MongoDB then talked about PostgreSQL, Aggregates and histograms where we even produced a nice Histogram chart directly within the awesome psql console. Today, let’s get that same idea to the next level, with pgcharts:
*The new [pgcharts](https://github.com/dimitri/pgcharts) application* The application’s specifications are quite simple: edit an SQL query, set your categories and your data series, add in some legends, and get a nice chart.
Last week came with two bank holidays in a row, and I took the opportunity to design a command language for pgloader. While doing that, I unexpectedly stumbled accross a very nice AHAH! moment, and I now want to share it with you, dear reader.
Thanks to Mickael on twitter I got to read an article about loosing scope with some common programming languages. As the blog article Lost in scope references functional programming languages and plays with both Javascript and Erlang, I though I had to try it out with Common Lisp too.
So, here we go with a simple Common Lisp attempt. The Lost in scope article begins with defining a very simple function returning a boolean value, only true when it’s not monday.