# How do I make Racket notice a SQLite update?

**URL:** <https://racket.discourse.group/t/how-do-i-make-racket-notice-a-sqlite-update/1201>\
**Category:** Questions & Answers\
**Created:** [August 5, 2022, 2:43am UTC](https://racket.discourse.group/t/how-do-i-make-racket-notice-a-sqlite-update/1201 "2022-08-05T02:43:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dstorrs](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@dstorrs](https://racket.discourse.group/u/dstorrs)\
**Post date:** [August 5, 2022, 2:43am UTC](https://racket.discourse.group/t/how-do-i-make-racket-notice-a-sqlite-update/1201/1 "2022-08-05T02:43:58Z")

</div>

macOS Catalina comes with sqlite3 version 3.28. This version does not include the 'table\_list' pragma, so I upgraded to version 3.39.2 (the latest). I have checked the version number on the new version and verified that "select \* from pragma\_table\_list('table-name')" works when run from the sqlite3 CLI.

Unfortunately, Racket does not seem to notice the change and is still claiming that there is no such thing as the 'pragma\_table\_list' table. I've tried un/reinstalling both Racket 8.5 and the db module itself, to no avail.

Can anyone offer a suggestion, or a pointer to the correct FM?

EDIT: I should mention that I did the upgrade as follows:

```scheme
$ brew install sqlite # this installs to /usr/local/opt/sqlite
$ sudo bash
# cd /usr/local/bin/
# mv sqlite3 sqlite3.3.28 # save the old version aside
# cp /usr/local/opt/sqlite/bin/sqlite3 sqlite3.3.39 # copy over the new one
# ln -s sqlite3.3.39 sqlite3 # symlink

```

---

<div class="post-metadata">

**Author:** ![mflatt](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/mflatt/32/6_2.png) [@mflatt](https://racket.discourse.group/u/mflatt)\
**Post date:** [August 5, 2022, 3:02am UTC](https://racket.discourse.group/t/how-do-i-make-racket-notice-a-sqlite-update/1201/2 "2022-08-05T03:02:18Z")

</div>

The Racket `db` module uses the `libsqlite3.dylib` shared library, not the `sqlite3` executable.

You probably can't replace `/usr/lib/libsqlite3.dylib` in the same way as `/usr/bin/sqlite3`, because macOS keeps the `.dylib` in a read-only space and makes it appear to be in `/usr/lib/libsqlite3.dylib` only when loading. But putting the link in the `lib` directory of your Racket installation should work, since Racket looks there first.

---

<div class="post-metadata">

**Author:** ![dstorrs](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@dstorrs](https://racket.discourse.group/u/dstorrs)\
**Post date:** [August 5, 2022, 3:31pm UTC](https://racket.discourse.group/t/how-do-i-make-racket-notice-a-sqlite-update/1201/3 "2022-08-05T15:31:40Z")

</div>

_facepalm_ Of course. I figured that the reinstall would update the library as well but I completely braincramped on the fact that it was the library I needed to move, not the executable. Thanks.

EDIT:

For anyone trying to do this, the sequence went as follows:

```scheme
$ brew install sqlite # this installs sqlite 3.39.2 into /usr/local/Cellar/sqlite/3.39.2
$ cd /Applications/Racket\ v8.5/lib
$ ln -s /usr/local/Cellar/sqlite/3.39.2/lib/libsqlite3.dylib libsqlite3.0.dylib

```

Sidebar: I dislike paths with spaces in them, so I always rename the Racket installs to, e.g. "Racket\_v8.5". It saves a bunch of backwhacking or quoting.

---

<div class="post-metadata">

**Author:** ![joeld](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joeld/32/38_2.png) [@joeld](https://racket.discourse.group/u/joeld)\
**Post date:** [August 5, 2022, 5:53pm UTC](https://racket.discourse.group/t/how-do-i-make-racket-notice-a-sqlite-update/1201/4 "2022-08-05T17:53:34Z")

</div>

I wonder if there is a way to do this that doesn’t break every time you upgrade either Racket or SQLite.
