@@ -77,8 +77,8 @@ SELECT tp_bar(85,
7777│ 🟨🟨🟨🟨🟨🟨🟨🟨🟨⬜ │
7878└──────────────────────┘
7979
80- -- Custom characters
81- SELECT tp_bar(0 .7 , on := ' █' , off := ' ░' , width := 15 ) as bar;
80+ -- Custom characters (note: "on" and "off" are reserved keywords, so they must be quoted)
81+ SELECT tp_bar(0 .7 , " on " := ' █' , " off" := ' ░' , width := 15 ) as bar;
8282┌─────────────────┐
8383│ bar │
8484│ varchar │
@@ -158,7 +158,7 @@ FROM (select random() as n from generate_series(10));
158158- ` width ` : Bar width in characters (default: 10)
159159- ` shape ` : 'square', 'circle', or 'heart' (default: 'square')
160160- ` on_color ` /` off_color ` : Color names (red, green, blue, yellow, etc.)
161- - ` on ` /` off ` : Custom characters for filled/empty portions
161+ - ` "on" ` /` " off" ` : Custom characters for filled/empty portions (must be quoted - reserved keywords)
162162- ` filled ` : Boolean, fill all blocks or just the endpoint (default: true)
163163- ` thresholds ` : List of threshold objects for conditional coloring
164164
@@ -400,8 +400,8 @@ select tp_qr('hello world', ecc := 'high');
400400
401401** Advanced Options:**
402402``` sql
403- -- Custom colors and shapes
404- SELECT tp_qr(' https://query.farm' , ecc := ' high' , " on" := ' 🟡' , off := ' ⚫' );
403+ -- Custom colors and shapes (note: "on" and "off" are reserved keywords, so they must be quoted)
404+ SELECT tp_qr(' https://query.farm' , ecc := ' high' , " on" := ' 🟡' , " off" := ' ⚫' );
405405🟡🟡🟡🟡🟡🟡🟡⚫🟡⚫🟡⚫🟡⚫🟡⚫⚫⚫🟡⚫🟡⚫🟡🟡🟡🟡🟡🟡🟡
406406🟡⚫⚫⚫⚫⚫🟡⚫🟡⚫⚫⚫🟡⚫🟡⚫🟡⚫⚫🟡⚫⚫🟡⚫⚫⚫⚫⚫🟡
407407🟡⚫🟡🟡🟡⚫🟡⚫🟡🟡🟡🟡🟡🟡⚫🟡🟡⚫⚫🟡🟡⚫🟡⚫🟡🟡🟡⚫🟡
@@ -437,8 +437,8 @@ SELECT tp_qr('https://query.farm', ecc := 'high', "on" := '🟡', off := '⚫');
437437** Parameters:**
438438- ` value ` : String value to encode in the QR code.
439439- ` ecc ` : Error correction level ('low', 'medium', 'quartile', 'high', default: 'low')
440- - ` on ` : Character for filled modules (default: '⬛')
441- - ` off ` : Character for empty modules (default: '⬜')
440+ - ` "on" ` : Character for filled modules (default: '⬛') - must be quoted (reserved keyword )
441+ - ` " off" ` : Character for empty modules (default: '⬜') - must be quoted (reserved keyword )
442442
443443
444444## Tips and Best Practices
0 commit comments