Skip to content

Commit

Permalink
Sync doco to current code state
Browse files Browse the repository at this point in the history
  • Loading branch information
pramsey committed Jul 26, 2023
1 parent a30265f commit 03b94dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ SELECT status, content::json->'form' AS form
jsonb_build_object('myvar','myval','foo','bar'));
```

To access binary content, you must coerce the content from the default `varchar` representation to a `bytea` representation using the `textsend` function. Using the default `varchar::bytea` cast will not work, as the cast will stop the first time it hits a zero-valued byte (common in binary data).
To access binary content, you must coerce the content from the default `varchar` representation to a `bytea` representation using the `text_to_bytea` function. Using the default `varchar::bytea` cast will **not work**, as the cast will stop the first time it hits a zero-valued byte (common in binary data).

```sql
WITH
Expand All @@ -174,6 +174,8 @@ WHERE field ilike 'Content-Type';
--------------+---------------
image/png | 8090
```
Similarly, when using POST to send `bytea` binary content to a service, use the `bytea_to_text` function to prepare the content.

To access only the headers you can do a HEAD-Request. This will not follow redirections.

```sql
Expand Down

0 comments on commit 03b94dd

Please sign in to comment.