<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 <title>kōtiri</title>
 <link href="https://kotiri.com/atom.xml" rel="self"/>
 <link href="https://kotiri.com/"/>
 <updated>2026-03-02T21:20:26+13:00</updated>
 <id>https://kotiri.com/</id>
 <author>
   <name>Steve Hoeksema</name>
   <email>steve@kotiri.com</email>
 </author>
 
 <entry>
   <title>Scaleconf 2018 notes</title>
   <link href="https://kotiri.com/2018/08/07/scaleconf-2018-notes.html"/>
   <updated>2018-08-07T00:00:00+12:00</updated>
   <id>https://kotiri.com/2018/08/07/scaleconf-2018-notes</id>
   <content type="html">&lt;h2 id=&quot;progressive-web-apps-workshop&quot;&gt;Progressive Web Apps workshop&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Fairly broad support as of iOS 11.3&lt;/li&gt;
  &lt;li&gt;No support for native push notifications&lt;/li&gt;
  &lt;li&gt;Still tricky to install, particularly on iOS&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.google.com/document/d/1-L-F_i6XtK0RsGdJFK01E63-LbvnUvGHzGKoJkCGpXk/edit&quot;&gt;Course material&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;kubernetes-workshop&quot;&gt;Kubernetes workshop&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Worth considering if we want to be independent of the AWS ecosystem&lt;/li&gt;
  &lt;li&gt;Strong support on multiple providers (AWS, GCP, Azure, &lt;a href=&quot;https://catalystcloud.nz/services/paas/catalyst-kubernetes-platform/&quot;&gt;Catalyst&lt;/a&gt;)&lt;/li&gt;
  &lt;li&gt;Need to consider other related services along with compute/block/object, e.g. functions, managed SQL, NoSQL, queues&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/heytrav/scaleconf-2018-kubernetes&quot;&gt;Course material&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;scaling-the-clouds---a-design-approach&quot;&gt;Scaling the clouds - a design approach&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.stratamap.io/&quot;&gt;stratamap.io&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Companies have 72 hours to notify affected users of a breach under GDPR. Is your tooling good enough to find affected users and what was exposed?&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/ArchiMate&quot;&gt;Archimate&lt;/a&gt; - an open successor of UML and BPMN&lt;/li&gt;
  &lt;li&gt;Useful for all kinds of mapping at multiple levels of detail - cloud infrastructure, customer journeys&lt;/li&gt;
  &lt;li&gt;Mandated by EU, NZ govt, etc&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.archimatetool.com/&quot;&gt;Archi tool&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;the-blockchain-a-beginners-guide-to-all-the-important-bits&quot;&gt;The Blockchain, a beginners guide to all the important bits&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;An introduction to blockchain, bitcoin, ethereum, etc&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;a-token-walks-into-a-spa&quot;&gt;A token walks into a SPA&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;“Auth0 ambassador”&lt;/li&gt;
  &lt;li&gt;An explanation of JWTs and how they are useful&lt;/li&gt;
  &lt;li&gt;An analogy of JWTs as driver licenses&lt;/li&gt;
  &lt;li&gt;JWT payload does not have to be JSON - could be xml, protobuf&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://auth0.com/blog/json-web-token-signing-algorithms-overview/&quot;&gt;JWT algorithm overview&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://auth0.com/resources/ebooks/jwt-handbook&quot;&gt;JWT handbook&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;How do you rotate private keys?&lt;/li&gt;
  &lt;li&gt;Token expiry should be measured in minutes&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;my-service-runs-at-99999-tweets-about-outages-are-fake-its-our-competition-trying-to-malign-us&quot;&gt;My service runs at 99.999%, tweets about outages are fake: it’s our competition trying to malign us!&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Detect anomalous changes in traffic volumes&lt;/li&gt;
  &lt;li&gt;Your service may be fine during an outage if the problem is at an ISP or CDN - will you know? Users don’t care where the problem lies&lt;/li&gt;
  &lt;li&gt;Measured metrics can be gamed. Post-load time should be included in performance measurements.&lt;/li&gt;
  &lt;li&gt;Metrics drive behaviour and may have perverse incentives&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.atlasobscura.com/articles/hanoi-rat-massacre-1902&quot;&gt;Hanoi rat massacre of 1902&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Your metrics may miss the point - you might have great uptime but with incorrect results. The fastest page on Bing is an error message&lt;/li&gt;
  &lt;li&gt;Another Bing example: a results page that was entirely ads: great click rate, great revenue, wrong data&lt;/li&gt;
  &lt;li&gt;Another Bing example measuring click rate: if they can answer a question inline on the page (e.g. population of Wellington), no need for a click&lt;/li&gt;
  &lt;li&gt;Metrics should be high quality, regularly reviewed&lt;/li&gt;
  &lt;li&gt;Consider “dialtone availability” - you should always pick up a phone and get a dialtone. You should always be able to get to Bing home page and do a search. Other features can have lower SLAs&lt;/li&gt;
  &lt;li&gt;Combine outside-in (outside your network) metrics with anomaly detection&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;lessons-learnt-building-heptio-contour&quot;&gt;Lessons learnt building Heptio Contour&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/heptio/contour&quot;&gt;Contour&lt;/a&gt; which maps Kubernetes to &lt;a href=&quot;https://www.envoyproxy.io/&quot;&gt;Envoy&lt;/a&gt; sidecar proxy&lt;/li&gt;
  &lt;li&gt;Ingress controller benefits:
    &lt;ul&gt;
      &lt;li&gt;traffic consolidation: combining multiple LBs into one&lt;/li&gt;
      &lt;li&gt;TLS management&lt;/li&gt;
      &lt;li&gt;configuration abstraction (over haproxy/nginx/apache etc)&lt;/li&gt;
      &lt;li&gt;path-based routing&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;overview of golang dependency awfulness and their workarounds&lt;/li&gt;
  &lt;li&gt;Keep docker build/push out of dev lifecycle&lt;/li&gt;
  &lt;li&gt;Try and keep integration tests to a minimum&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;architecting-for-performance-in-the-cloud&quot;&gt;Architecting for performance in the cloud&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Uh, don’t do table scans?&lt;/li&gt;
  &lt;li&gt;Consider whole stack - code, network, infra, DB&lt;/li&gt;
  &lt;li&gt;track mean time to detection and mean time to recovery&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.cnbc.com/2018/07/19/amazon-internal-documents-what-caused-prime-day-crash-company-scramble.html&quot;&gt;Even Amazon doesn’t always get it right&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Have a recovery plan&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;high-availability-microservices-load-balancing-in-the-world-of-ingress-and-service-mesh&quot;&gt;High Availability Microservices: Load Balancing in the World of Ingress and Service Mesh&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;A promo for Nginx Plus - can consolidate some functions&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/cncf/landscape&quot;&gt;Cloud Native Landscape&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://istio.io/&quot;&gt;Istio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;making-test-automation-observable&quot;&gt;Making test automation observable&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Applying the &lt;a href=&quot;https://en.wikipedia.org/wiki/Five_Ws&quot;&gt;five W’s&lt;/a&gt; to testing
    &lt;ul&gt;
      &lt;li&gt;What are we testing?&lt;/li&gt;
      &lt;li&gt;When would be find out about an issue?&lt;/li&gt;
      &lt;li&gt;Where are our tests running?&lt;/li&gt;
      &lt;li&gt;Why did something go wrong?&lt;/li&gt;
      &lt;li&gt;Who should know about these tests?&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Seemed not to be directly relevant to a CI-on-PR workflow, where the answers to all five are right there?&lt;/li&gt;
  &lt;li&gt;Built up a integration test coverage map by tracking User-Agent on web server logs against API paths&lt;/li&gt;
  &lt;li&gt;Try and reduce noise in your test failures - retries, cleaning up and consolidating errors&lt;/li&gt;
  &lt;li&gt;Apply the same test for your users. Their test coverage was much different from user behaviour
    &lt;ul&gt;
      &lt;li&gt;What are our users doing?&lt;/li&gt;
      &lt;li&gt;When would be find out if they have a problem&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;when-two-platforms-become-one-the-complexities-of-merging-6-years-of-data&quot;&gt;When two platforms become one: the complexities of merging 6 years of data&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Focus on customers&lt;/li&gt;
  &lt;li&gt;Small, iterative changes&lt;/li&gt;
  &lt;li&gt;Having two brands travis-ci.{com,org} hurt acquisition, diluted&lt;/li&gt;
  &lt;li&gt;Tested new features on .org; paid customers felt left out they had to wait&lt;/li&gt;
  &lt;li&gt;Make changes user-facing ASAP&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;devops-vs-sre---get-off-my-lawn&quot;&gt;DevOps vs SRE - Get off my lawn&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Fundamental conflict between agility and stability, traditional dev vs ops/sysadmin&lt;/li&gt;
  &lt;li&gt;Devs typically “won” as they were closest to business needs&lt;/li&gt;
  &lt;li&gt;c.a. 2009, resolved by putting dev+ops in the same room, talking&lt;/li&gt;
  &lt;li&gt;c.a. 2018, also means breaking down barriers in security, marketing, etc&lt;/li&gt;
  &lt;li&gt;Accept partial failure as normal, necessary for rapid progress&lt;/li&gt;
  &lt;li&gt;Use outages as opportunity for leaning (&lt;a href=&quot;https://landing.google.com/sre/book/chapters/postmortem-culture.html&quot;&gt;blameless postmortems&lt;/a&gt;)&lt;/li&gt;
  &lt;li&gt;Eliminate &lt;a href=&quot;https://landing.google.com/sre/book/chapters/eliminating-toil.html&quot;&gt;toil&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Measure everything - MTTR, deploy times, deploy frequency, toil&lt;/li&gt;
  &lt;li&gt;Paying attention to your measurements is another story&lt;/li&gt;
  &lt;li&gt;“&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;class SRE implements DevOps&lt;/code&gt;”&lt;/li&gt;
  &lt;li&gt;Reduce cost of failure (blue/green deployments and rollbacks)&lt;/li&gt;
  &lt;li&gt;“Automate this year’s job”&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://landing.google.com/sre/book.html&quot;&gt;Books&lt;/a&gt; free until August 23&lt;/li&gt;
  &lt;li&gt;Avoid “superheroes” - might be useful early in a small company, bad as it scales&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;hacking-web-performance&quot;&gt;Hacking Web Performance&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;“CSS as appetizer, JavaScript as dessert” - slows load times&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.pbtech.co.nz/product/MPHNOK70100/Nokia-1-8GB-Smartphone---Dark-Blue---Step-up-to-Sm&quot;&gt;Nokia 1&lt;/a&gt;, brand new, $140 smartphone than runs Android 9, good example of a low-end phone&lt;/li&gt;
  &lt;li&gt;Try and fit your first load in &lt;a href=&quot;https://books.google.co.nz/books?id=FOYPDQAAQBAJ&amp;amp;pg=PT297&amp;amp;lpg=PT297&amp;amp;dq=tcp+slow+start+14.6+kb&amp;amp;source=bl&amp;amp;ots=KABIz-NrzK&amp;amp;sig=X83mSdH5yUEq-kAQXdB3L14Qwig&amp;amp;hl=en&amp;amp;sa=X&amp;amp;ved=2ahUKEwj_79ypvNrcAhWCgLwKHcwpDiEQ6AEwEXoECAAQAQ#v=onepage&amp;amp;q=tcp%20slow%20start%2014.6%20kb&amp;amp;f=false&quot;&gt;14.6KiB&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Can fit more in that 14K with gzip&lt;/li&gt;
  &lt;li&gt;Can fit even more with zopfli, brotli&lt;/li&gt;
  &lt;li&gt;Embed as much as possible (styles, js, data urls)&lt;/li&gt;
  &lt;li&gt;Speed up HTTPS first load with HSTS&lt;/li&gt;
  &lt;li&gt;Consider &lt;a href=&quot;https://hstspreload.org/&quot;&gt;HSTS preload&lt;/a&gt; too&lt;/li&gt;
  &lt;li&gt;Speed up first byte with QUIC&lt;/li&gt;
  &lt;li&gt;New cache headers: &lt;a href=&quot;https://hacks.mozilla.org/2017/01/using-immutable-caching-to-speed-up-the-web/&quot;&gt;immutable&lt;/a&gt;, &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control&quot;&gt;stale-while-revalidate&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Prefetch, preconnect, and preload with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;link&amp;gt;&lt;/code&gt; elements or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Link:&lt;/code&gt; headers&lt;/li&gt;
  &lt;li&gt;React to bad connections a la Netflix dynamic quality changes&lt;/li&gt;
  &lt;li&gt;Use &lt;a href=&quot;https://developers.google.com/web/updates/2015/09/automating-resource-selection-with-client-hints&quot;&gt;client hints&lt;/a&gt;, &lt;a href=&quot;https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/save-data/&quot;&gt;save-data&lt;/a&gt;, and &lt;a href=&quot;https://github.com/w3c/device-memory&quot;&gt;device-memory&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://firt.mobi/books.php&quot;&gt;Books&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;how-we-automated-our-test-database-restores&quot;&gt;How we automated our test database restores&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;All devs, managers, testers at FMG can restore a test database at any time&lt;/li&gt;
  &lt;li&gt;Had problems with polluted test data, slow restores, etc&lt;/li&gt;
  &lt;li&gt;Used a snapshot tool for SQL Server&lt;/li&gt;
  &lt;li&gt;Built a self-service tool for people to use&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;serverless-in-practise&quot;&gt;Serverless in Practise&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Used Lambda, &lt;a href=&quot;https://firebase.google.com/&quot;&gt;Firebase&lt;/a&gt;, &lt;a href=&quot;https://www.algolia.com/&quot;&gt;Algolia&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;API GW -&amp;gt; λ GraphQL -&amp;gt; λ -&amp;gt; DynamoDB -&amp;gt; λ -&amp;gt; Firebase&lt;/li&gt;
  &lt;li&gt;λ cost $700/mo, compared to cloudfront $5100, cloudwatch $3100&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.netlify.com/&quot;&gt;netlify&lt;/a&gt;, &lt;a href=&quot;https://www.cypress.io/&quot;&gt;cypress&lt;/a&gt;, &lt;a href=&quot;https://jestjs.io/&quot;&gt;jest&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;DLQ for failed λ&lt;/li&gt;
  &lt;li&gt;Can set λ max concurrency to avoid slamming SQL DB. Can set to 0 as a kill switch&lt;/li&gt;
  &lt;li&gt;Each function:
    &lt;ul&gt;
      &lt;li&gt;should perform 1 task&lt;/li&gt;
      &lt;li&gt;should perform 0 or 1 data transformations&lt;/li&gt;
      &lt;li&gt;should have no state and be idempotent&lt;/li&gt;
      &lt;li&gt;should have minimal permissions&lt;/li&gt;
      &lt;li&gt;should avoid recursion&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Use step functions or &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/azure-functions/durable-functions-overview&quot;&gt;durable functions&lt;/a&gt; to manage state&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://serverless.com/blog/serverless-architecture-code-patterns/&quot;&gt;Serverless Code Patterns&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://read.acloud.guru/&quot;&gt;acloud.guru&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;API Proxy, fanout, inline stream transformation patterns&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.manning.com/books/serverless-architectures-on-aws&quot;&gt;Serverless Architectures on AWS&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://serverlessconf.io/&quot;&gt;Serverless Conf&lt;/a&gt; [I stumbled across this by accident NY ‘16’]&lt;/li&gt;
  &lt;li&gt;How do you avoid vendor lockin? Not so much a problem for code, much more for surrouding ecosystem: SQS, SNS, DynamoDB, step functions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;move-legacy-apps-to-windows-containers-to-take-advantage-of-modern-infrastructure-and-orchestration&quot;&gt;Move legacy apps to Windows Containers to take advantage of modern infrastructure and orchestration&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;3 platform options: &lt;a href=&quot;https://hub.docker.com/r/microsoft/windowsservercore/&quot;&gt;windows server core&lt;/a&gt;, &lt;a href=&quot;https://hub.docker.com/r/microsoft/nanoserver/&quot;&gt;nano server&lt;/a&gt;, &lt;a href=&quot;https://hub.docker.com/r/microsoft/dotnet/&quot;&gt;.net core&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;No GUI&lt;/li&gt;
  &lt;li&gt;[some tips to do silent installs]&lt;/li&gt;
  &lt;li&gt;Install prerequisites first to avoid multi-step installs&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/Microsoft/IIS.ServiceMonitor&quot;&gt;ServiceMonitor.exe&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;[example Dockerfile]&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cmd.exe /c start&lt;/code&gt; analogous to macOS &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;open&lt;/code&gt; or Linux &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;xdg-open&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Can’t join activedirectory domains inside containers yet&lt;/li&gt;
  &lt;li&gt;Can almost run Linux containers in Windows&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;data-patterns-catalogue-simplifying-the-journey-from-monolith-to-modern-data-architectures&quot;&gt;Data patterns catalogue: simplifying the journey from monolith to modern data architectures&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Monoliths have been working for decades&lt;/li&gt;
  &lt;li&gt;Enterprise data warehouses have also accumulated data monoliths&lt;/li&gt;
  &lt;li&gt;Focus on asynchronous events, immutable log streaming, and microservices&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.martinfowler.com/bliki/StranglerApplication.html&quot;&gt;Strangler pattern&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;“Collection of info available “in a few weeks”&lt;/li&gt;
  &lt;li&gt;Event Gateway: identify event seams, publish events when a monolith changes state&lt;/li&gt;
  &lt;li&gt;Batch to event adapter&lt;/li&gt;
  &lt;li&gt;Event to batch adapter&lt;/li&gt;
  &lt;li&gt;Change data capture&lt;/li&gt;
  &lt;li&gt;Data Catalogue and Schema Registry with avro, parquet, protobuf, thrift&lt;/li&gt;
  &lt;li&gt;Map event types to topics + streams: can validate events are going where they supposed to, support introspection&lt;/li&gt;
&lt;/ul&gt;
</content>
   <author>
     <name>Steve Hoeksema</name>
     <email>steve@kotiri.com</email>
   </author>
 </entry>
 
 <entry>
   <title>A comprehensive mapping of PostgreSQL, Diesel, and Rust types</title>
   <link href="https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html"/>
   <updated>2018-01-31T00:00:00+13:00</updated>
   <id>https://kotiri.com/2018/01/31/postgresql-diesel-rust-types</id>
   <content type="html">&lt;p&gt;Over the last year or so I’ve been learning Rust as time permits. With the release of Diesel 1.0, I’ve recently kicked off a pet project that makes heavy use of PostgreSQL types.&lt;/p&gt;

&lt;p&gt;I couldn’t find a mapping between the PostgreSQL type, the Diesel schema type, and the Rust type, so I’ve compiled a mapping for what I could find.&lt;/p&gt;

&lt;p&gt;Happily all the types I use have been implemented, it seems there’s only XML and PostGIS types remaining.&lt;/p&gt;

&lt;p&gt;Updated as at Postgresql 10.1, Diesel 1.1.&lt;/p&gt;

&lt;div id=&quot;types&quot;&gt;

  &lt;table&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;PostgreSQL Type&lt;/th&gt;
        &lt;th&gt;PostgreSQL Size&lt;/th&gt;
        &lt;th&gt;Description&lt;/th&gt;
        &lt;th&gt;Range&lt;/th&gt;
        &lt;th&gt;Diesel Type&lt;/th&gt;
        &lt;th&gt;Rust Type&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;Nullable Types&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;nullable&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Nullable.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Nullable&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/option/enum.Option.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Option&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/datatype-numeric.html&quot;&gt;Numeric Types&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;smallint&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;int2&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;2 bytes&lt;/td&gt;
        &lt;td&gt;signed integer&lt;/td&gt;
        &lt;td&gt;-32768 to +32767&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.SmallInt.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SmallInt&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.i16.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i16&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;integer&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;int&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;int4&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;4 bytes&lt;/td&gt;
        &lt;td&gt;signed integer&lt;/td&gt;
        &lt;td&gt;-2147483648 to +2147483647&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Integer.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Integer&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.i32.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i32&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bigint&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;int8&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;8 bytes&lt;/td&gt;
        &lt;td&gt;signed integer&lt;/td&gt;
        &lt;td&gt;-9223372036854775808 to +9223372036854775807&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.BigInt.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BigInt&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.i64.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i64&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;numeric(p, s)&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;decimal(p, s)&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;2 bytes per 4 digits + 3 to 8 bytes&lt;/td&gt;
        &lt;td&gt;exact numeric of selectable precision&lt;/td&gt;
        &lt;td&gt;131072.16383 digits&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Numeric.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Numeric&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/bigdecimal/struct.BigDecimal.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bigdecimal::BigDecimal&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;real&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;float4&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;4 bytes&lt;/td&gt;
        &lt;td&gt;single precision floating-point number&lt;/td&gt;
        &lt;td&gt;6 digits precision&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Float.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Float&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.f32.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;f32&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;double precision&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;float8&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;8 bytes&lt;/td&gt;
        &lt;td&gt;double precision floating-point number&lt;/td&gt;
        &lt;td&gt;15 digits precision&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Double.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Double&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.f64.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;f64&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;smallserial&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;serial2&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;2 bytes&lt;/td&gt;
        &lt;td&gt;autoincrementing integer&lt;/td&gt;
        &lt;td&gt;1 to 32767&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.SmallInt.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SmallInt&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.i16.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i16&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;serial&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;serial4&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;4 bytes&lt;/td&gt;
        &lt;td&gt;autoincrementing integer&lt;/td&gt;
        &lt;td&gt;1 to 2147483647&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Integer.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Integer&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.i32.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i32&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bigserial&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;serial8&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;8 bytes&lt;/td&gt;
        &lt;td&gt;autoincrementing integer&lt;/td&gt;
        &lt;td&gt;1 to 9223372036854775807&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.BigInt.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BigInt&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.i64.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i64&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/datatype-money.html&quot;&gt;Monetary Types&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;money&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;8 bytes&lt;/td&gt;
        &lt;td&gt;currency amount&lt;/td&gt;
        &lt;td&gt;-92233720368547758.08 to +92233720368547758.07&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Money.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Money&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/data_types/struct.Cents.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Cents&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/datatype-character.html&quot;&gt;Character Types&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;character varying(n)&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;varchar(n)&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;n+1 or n+4 bytes&lt;/td&gt;
        &lt;td&gt;variable-length character string&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Text.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Text&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/string/struct.String.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;String&lt;/code&gt;&lt;/a&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;amp;&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.str.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;str&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;character(n)&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;char(n)&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;n+1 or n+4 bytes&lt;/td&gt;
        &lt;td&gt;fixed-length character string&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Text.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Text&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/string/struct.String.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;String&lt;/code&gt;&lt;/a&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;amp;&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.str.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;str&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;text &lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;n+1 or n+4 bytes&lt;/td&gt;
        &lt;td&gt;variable-length character string&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Text.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Text&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/string/struct.String.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;String&lt;/code&gt;&lt;/a&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;amp;&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.str.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;str&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/datatype-binary.html&quot;&gt;Binary Data Types&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bytea&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;n+1 to n+4 bytes&lt;/td&gt;
        &lt;td&gt;binary data (“byte array”)&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Binary.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Binary&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/vec/struct.Vec.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Vec&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.u8.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;u8&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;amp;&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.u8.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;u8&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/datatype-datetime.html&quot;&gt;Date/Time Types&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timestamp&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timestamp(p) without time zone&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;8 bytes&lt;/td&gt;
        &lt;td&gt;date and time of day&lt;/td&gt;
        &lt;td&gt;4713 BC to 294276 AD, 1 microsecond&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Timestamp.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Timestamp&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/chrono/naive/struct.NaiveDateTime.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chrono::NaiveDateTime&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timestamptz&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timestamp(p) with time zone&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;8 bytes&lt;/td&gt;
        &lt;td&gt;date and time of day, with time zone&lt;/td&gt;
        &lt;td&gt;4713 BC to 294276 AD, 1 microsecond&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Timestamptz.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Timestamptz&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/chrono/struct.DateTime.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chrono::DateTime&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;date&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;4 bytes&lt;/td&gt;
        &lt;td&gt;calendar date (year, month, day)&lt;/td&gt;
        &lt;td&gt;4713 BC to 5874897 AD, 1 day&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Date.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Date&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/chrono/naive/struct.NaiveDate.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chrono::NaiveDate&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;time&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;time(p) without time zone&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;8 bytes&lt;/td&gt;
        &lt;td&gt;time of day (no date)&lt;/td&gt;
        &lt;td&gt;00:00:00 to 24:00:00, 1 microsecond&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Time.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Time&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/chrono/naive/struct.NaiveTime.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chrono::NaiveTime&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timetz&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;time(p) with time zone&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;12 bytes&lt;/td&gt;
        &lt;td&gt;time of day (no date), with time zone&lt;/td&gt;
        &lt;td&gt;00:00:00+1459 to 24:00:00-1459, 1 microsecond&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;interval(fields)(p)&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;16 bytes&lt;/td&gt;
        &lt;td&gt;time span&lt;/td&gt;
        &lt;td&gt;-178000000 years to 178000000 years, 1 microsecond&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Interval.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Interval&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/data_types/struct.PgInterval.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PgInterval&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/datatype-boolean.html&quot;&gt;Boolean Type&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;boolean&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bool&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;1 byte&lt;/td&gt;
        &lt;td&gt;logical Boolean (true/false)&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Bool.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bool&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.bool.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bool&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/datatype-geometric.html&quot;&gt;Geometric Types&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;point&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(x,y)&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;16 bytes&lt;/td&gt;
        &lt;td&gt;geometric point on a plane&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;line&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{A,B,C}&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;32 bytes&lt;/td&gt;
        &lt;td&gt;infinite line on a plane&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lseg&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;((x1,y1),(x2,y2))&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;32 bytes&lt;/td&gt;
        &lt;td&gt;finite line segment on a plane&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;box&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;((x1,y1),(x2,y2))&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;32 bytes&lt;/td&gt;
        &lt;td&gt;rectangular box on a plane&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;path&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;((x1,y1),...)&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;16+16n bytes&lt;/td&gt;
        &lt;td&gt;closed geometric path on a plane&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;path&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[(x1,y1),...]&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;16+16n bytes&lt;/td&gt;
        &lt;td&gt;open geometric path on a plane&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;polygon&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;((x1,y1),...)&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;40+16n bytes&lt;/td&gt;
        &lt;td&gt;closed geometric path on a plane&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;circle&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;(x,y),r\&amp;gt;&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;24 bytes&lt;/td&gt;
        &lt;td&gt;circle on a plane&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/datatype-net-types.html&quot;&gt;Network Address Types&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cidr&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;7 or 19 bytes&lt;/td&gt;
        &lt;td&gt;IPv4 or IPv6 network address&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Cidr.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Cidr&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/ipnetwork/enum.IpNetwork.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ipnetwork::IpNetwork&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;inet&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;7 or 19 bytes&lt;/td&gt;
        &lt;td&gt;IPv4 or IPv6 host address&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Inet.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Inet&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/ipnetwork/enum.IpNetwork.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ipnetwork::IpNetwork&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;macaddr&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;6 bytes&lt;/td&gt;
        &lt;td&gt;MAC address&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.MacAddr.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MacAddr&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.u8.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;u8&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;; 6]&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;macaddr8&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;8 bytes&lt;/td&gt;
        &lt;td&gt;MAC address (EUI-64 format)&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/datatype-enum.html&quot;&gt;Enumerated Types&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;enum&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;4 bytes&lt;/td&gt;
        &lt;td&gt;enumerated value&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;(user-defined)&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/string/struct.String.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;String&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://doc.rust-lang.org/book/first-edition/enums.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;enum&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/datatype-bit.html&quot;&gt;Bit String Types&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bit(n)&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;1 byte per 8 bits + 5 or 8 bytes&lt;/td&gt;
        &lt;td&gt;fixed-length bit string&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bit varying(n)&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;varbit&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;1 byte per 8 bits + 5 or 8 bytes&lt;/td&gt;
        &lt;td&gt;variable-length bit string&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/datatype-textsearch.html&quot;&gt;Text Search Types&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tsvector&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;text search document&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TsVector&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tsquery&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;text search query&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TsQuery&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/datatype-uuid.html&quot;&gt;UUID Type&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;uuid&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;16 bytes&lt;/td&gt;
        &lt;td&gt;universally unique identifier&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Uuid.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Uuid&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://docs.rs/uuid/0.5.1/uuid/struct.Uuid.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;uuid::Uuid&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/datatype-xml.html&quot;&gt;XML Type&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;xml&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;XML data&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/datatype-json.html&quot;&gt;JSON Types&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;json&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;textual JSON data&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Json.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Json&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/serde_json/value/enum.Value.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;serde_json::Value&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jsonb&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;binary JSON data, decomposed&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Jsonb.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Jsonb&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/serde_json/value/enum.Value.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;serde_json::Value&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/arrays.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Arrays&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;t[]&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;array of values&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Array.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Array&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/vec/struct.Vec.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Vec&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;T&amp;gt;&lt;/code&gt;, &lt;a href=&quot;https://doc.rust-lang.org/std/vec/struct.Vec.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Vec&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/option/enum.Option.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Option&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;T&amp;gt;&amp;gt;&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;amp;[T]&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;amp;[&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/option/enum.Option.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Option&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;T&amp;gt;]&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/static/rangetypes.html&quot;&gt;Range Types&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;int4range&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;range of integer&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Range.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Range&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Integer.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Integer&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/collections/enum.Bound.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bound&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.i32.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i32&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;, &lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/collections/enum.Bound.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bound&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.i32.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i32&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;)&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;int8range&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;range of bigint&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Range.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Range&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.BigInt.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BigInt&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/collections/enum.Bound.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bound&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.i64.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i64&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;, &lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/collections/enum.Bound.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bound&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/primitive.i64.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i64&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;)&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;numrange&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;range of numeric&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Range.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Range&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Numeric.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Numeric&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/collections/enum.Bound.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bound&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;http://docs.diesel.rs/bigdecimal/struct.BigDecimal.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bigdecimal::BigDecimal&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;, &lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/collections/enum.Bound.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bound&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;http://docs.diesel.rs/bigdecimal/struct.BigDecimal.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bigdecimal::BigDecimal&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;)&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tsrange&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;range of timestamp&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Range.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Range&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Timestamp.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Timestamp&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/collections/enum.Bound.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bound&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;http://docs.diesel.rs/chrono/naive/struct.NaiveDateTime.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chrono::NaiveDateTime&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;, &lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/collections/enum.Bound.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bound&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;http://docs.diesel.rs/chrono/naive/struct.NaiveDateTime.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chrono::NaiveDateTime&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;)&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tstzrange&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;range of timestamptz&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Range.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Range&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Timestamptz.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Timestamptz&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/collections/enum.Bound.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bound&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;http://docs.diesel.rs/chrono/struct.DateTime.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chrono::DateTime&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;, &lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/collections/enum.Bound.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bound&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;http://docs.diesel.rs/chrono/struct.DateTime.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chrono::DateTime&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;)&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;daterange&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;range of date&lt;/td&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Range.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Range&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;http://docs.diesel.rs/diesel/sql_types/struct.Date.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Date&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/td&gt;
        &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(&lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/collections/enum.Bound.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bound&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;http://docs.diesel.rs/chrono/naive/struct.NaiveDate.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chrono::NaiveDate&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;, &lt;/code&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/collections/enum.Bound.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bound&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;&lt;/code&gt;&lt;a href=&quot;http://docs.diesel.rs/chrono/naive/struct.NaiveDate.html&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chrono::NaiveDate&lt;/code&gt;&lt;/a&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt;)&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;

&lt;/div&gt;
</content>
   <author>
     <name>Steve Hoeksema</name>
     <email>steve@kotiri.com</email>
   </author>
 </entry>
 
 <entry>
   <title>Rails 4.0.0-beta1 STDOUT logger</title>
   <link href="https://kotiri.com/2013/03/19/rails-stdout-logger.html"/>
   <updated>2013-03-19T00:00:00+13:00</updated>
   <id>https://kotiri.com/2013/03/19/rails-stdout-logger</id>
   <content type="html">&lt;p&gt;I use Unicorn and Heroku for one Rails application I maintain. I also use this fragment of code from the Heroku website:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;config.logger = Logger.new(STDOUT)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This worked fine on Heroku, but locally I got an error after upgrading to Rails 4.0.0-beta1:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ArgumentError
wrong number of arguments (0 for 1)
activesupport (4.0.0.beta1) lib/active_support/core_ext/kernel/reporting.rb:82:in `capture&apos;
activerecord (4.0.0.beta1) lib/active_record/migration.rb:345:in `call&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I stumbled across the solution after being sidetracked by a couple of Rails commits, it just needs to be scoped differently:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;config.logger = ActiveSupport::Logger.new STDOUT
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/rails/rails/commit/b7d9d6e2cd5082d269dafbc0316e2107febe1451&quot;&gt;b7d9d6&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/rails/rails/commit/1a9055073dcc189b289a1e3f47cbc72ff7380f0a&quot;&gt;1a9055&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content>
   <author>
     <name>Steve Hoeksema</name>
     <email>steve@kotiri.com</email>
   </author>
 </entry>
 
 <entry>
   <title>Rails 3.2.13 / Mail 2.5.3 OpenSSL error</title>
   <link href="https://kotiri.com/2013/03/19/rails-mail-openssl.html"/>
   <updated>2013-03-19T00:00:00+13:00</updated>
   <id>https://kotiri.com/2013/03/19/rails-mail-openssl</id>
   <content type="html">&lt;p&gt;If you get an error like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;OpenSSL::SSL::SSLError:
SSL_connect returned=1 errno=0 state=SSLv2/v3
read server hello A: unknown protocol
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It might be because you are sending emails on localhost and don’t have SSL set up on your mail server.&lt;/p&gt;

&lt;p&gt;The behaviour between Mail 2.4.4 (Rails 3.2.12) and Mail 2.5.3 (Rails 3.2.13) changed, and I needed to explicitly disable &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;enable_starttls_auto&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;config.action_mailer.smtp_settings = {
  :enable_starttls_auto =&amp;gt; false
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</content>
   <author>
     <name>Steve Hoeksema</name>
     <email>steve@kotiri.com</email>
   </author>
 </entry>
 
 <entry>
   <title>PHPUnit - Serialization of Closure is not allowed in Symfony 2</title>
   <link href="https://kotiri.com/2013/03/18/phpunit-serialization-closure.html"/>
   <updated>2013-03-18T00:00:00+13:00</updated>
   <id>https://kotiri.com/2013/03/18/phpunit-serialization-closure</id>
   <content type="html">&lt;p&gt;If you get an error like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;PHPUnit_Framework_Exception: PHP Fatal error:
Uncaught exception &apos;Exception&apos; with message
&apos;Serialization of &apos;Closure&apos; is not allowed&apos;
in vendor/symfony/src/Symfony/Component/HttpFoundation/Session.php:383
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It might be because your unit test references an uninitialized variable or array index.&lt;/p&gt;

&lt;p&gt;No, really.&lt;/p&gt;

&lt;p&gt;(Thanks &lt;a href=&quot;https://twitter.com/ethos49&quot;&gt;@ethos49&lt;/a&gt;)&lt;/p&gt;
</content>
   <author>
     <name>Steve Hoeksema</name>
     <email>steve@kotiri.com</email>
   </author>
 </entry>
 
</feed>
