Hello,

I have the following problem: whenever an error is raised due to an invalid 
SQL query, e.g:

  DB[:table].select(:col1).order(:col2).group(:col3).where(col4: :col5).all

the error message only shows part of the SQL query (I'm guessing it's 
truncated at the Postgres server/client level):

  PG::UndefinedTable: ERROR:  relation "table" does not exist 
(Sequel::DatabaseError)
  LINE 1: SELECT "col1" FROM "table" WHERE ("col4" = "col5") GROUP BY ...

Is there possibly some extension/setting which would automatically include 
the full SQL query in the error message? I've noticed the error_sql 
<https://sequel.jeremyevans.net/rdoc-plugins/files/lib/sequel/extensions/error_sql_rb.html>
 extension, 
but I would like if the SQL query is already included in the message.

The main use case is in our test suite, where it's useful to have all the 
information in the test failure.

Kind regards,
Janko

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to