Credit howtos/tuts authors (#264)

This commit is contained in:
Steve Chávez
2019-10-18 11:03:32 -05:00
committed by GitHub
parent 3325a1bbc6
commit 22b6ff764d
4 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -1,6 +1,8 @@
Casting a type to a custom JSON object
======================================
:author: `steve-chavez <https://github.com/steve-chavez>`_
While using PostgREST you might have noticed that certain PostgreSQL types translate to JSON strings when you would
have expected a JSON object or array. For example, let's see the case of `range types <https://www.postgresql.org/docs/11/rangetypes.html>`_.
@@ -82,7 +84,7 @@ You can use the same idea for creating custom CASTs for different types.
.. note::
If you don't want to modify CASTs for built-in types, an option would be to `create a custom type <https://www.postgresql.org/docs/current/sql-createtype.html>`_
If you don't want to modify CASTs for built-in types, an option would be to `create a custom type <https://www.postgresql.org/docs/current/sql-createtype.html>`_
for your own ``tsrange`` and add its own CAST.
.. code-block:: postgres
@@ -1,6 +1,8 @@
Embedding a table from another schema
=====================================
:author: `steve-chavez <https://github.com/steve-chavez>`_
Suppose you have a **people** table in the ``public`` schema and this schema is exposed through PostgREST's :ref:`db-schema`.
.. code-block:: postgres