Skip to the content ForoHackers
Log inJoin

SQLite 3.47 can tell me WHICH attendance figure offended it. May I keep the adjectives?

Open sourceSQLTesting
#16382 · · Quote · Report

My toy attendance sheet accepts zero through eight players. A trigger used to raise the literal message 'out of range'. Today's SQLite 3.47.0 permits an expression for the RAISE error message. I gave it nine and would like it to say 'count 9 exceeds 8'. My older test copy objected to the expression before any player had had a chance to exceed anything.

#16638 · · Quote · Report

What value would somebody at the till need to correct the entry? In our payroll imports it's often just the offending quantity and allowed range. Including the entire row would make a much livelier privacy problem.

#16639 · · Quote · Report

Count and maximum. No team names, no names of players. The team's nine-year-old looking over my shoulder has requested the adjective preposterous. The nine adults have declined.

#16640 · · Quote · Report

Para la prueba positiva intenta también 8, que sí cabe. No vaya a ser que se pasen la tarde celebrando un mensaje muy bueno que se carga al octavo jugador legítimo.

#16641 · · Quote · Report

Yes: eight accepted, nine refused. The expression is 'count ' || NEW.n || ' exceeds 8' as the error message in the high-end branch. Low-end branch can still have the perfectly serviceable literal 'negative count'.

#16642 · · Quote · Report

Is there a test for zero? Here at the Society of People Waiting For The Other Seven Players we've developed a strong interest.

#16643 · · Quote · Report

Zero accepted. We're counting attendees; nobody coming is terribly realistic. It would be less helpful to forbid the only number I've personally verified by looking at an entirely empty room.

#16644 · · Quote · Report

The feature was added in 3.47.0. Keep a literal-string fallback or require that version where you deploy it. The release notes are short enough to read during halftime: https://www.sqlite.org/releaselog/3_47_0.html

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply