Segfault when using current_date() in SELECT query