From b6c03f3658b41101076ab21d4e9bedfc8db0b997 Mon Sep 17 00:00:00 2001 From: Steve Phillips Date: Mon, 27 Apr 2020 06:58:01 -0700 Subject: [PATCH] api.rst: formatting tweaks --- api.rst | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/api.rst b/api.rst index 350f77123..0bab1152f 100644 --- a/api.rst +++ b/api.rst @@ -702,7 +702,7 @@ Embedding on Stored Procedures If you have a :ref:`Stored Procedure ` that returns a table type, you can embed its related resources. -Here's a sample function(notice the ``RETURNS SETOF films``). +Here's a sample function (notice the ``RETURNS SETOF films``). .. code-block:: plpgsql @@ -742,9 +742,12 @@ Say you want to insert a **film** and then get some of its attributes plus embed Prefer: return=representation { - "id": 100, "director_id": 40, - "title": "127 hours", "year": 2010, - "rating": 7.6, "language": "english" + "id": 100, + "director_id": 40, + "title": "127 hours", + "year": 2010, + "rating": 7.6, + "language": "english" } Response: @@ -1122,13 +1125,13 @@ The client can call it by posting an object like 3 -Procedures must be declared with named parameters. Procedures declared like: +Procedures must be declared with named parameters. Procedures declared like .. code-block:: plpgsql CREATE FUNCTION non_named_args(integer, text, integer) ... -Can not be called with PostgREST, since we use `named notation `_ internally. +cannot be called with PostgREST, since we use `named notation `_ internally. Note that PostgreSQL converts identifier names to lowercase unless you quote them like: