From 634a0c70b7a4cc719d298d4601e26d87b305bd83 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 29 Nov 2020 23:26:06 +0100 Subject: [PATCH] Fix spelling to satisfy postgrest-docs-spellcheck --- admin.rst | 6 +-- api.rst | 50 ++++++++++---------- auth.rst | 2 +- configuration.rst | 14 +++--- development.rst | 8 ++-- ecosystem.rst | 20 ++++---- how-tos/casting-type-to-custom-json.rst | 6 +-- how-tos/providing-images-for-img.rst | 6 +-- index.rst | 2 +- install.rst | 4 +- postgrest.dict | 61 +++++++++++++++++++------ releases/upcoming.rst | 4 +- releases/v7.0.0.rst | 4 +- schema_structure.rst | 14 +++--- 14 files changed, 118 insertions(+), 83 deletions(-) diff --git a/admin.rst b/admin.rst index a272fcfbb..d131708e4 100644 --- a/admin.rst +++ b/admin.rst @@ -145,7 +145,7 @@ The PostgREST server logs basic request information to stdout, including the req HTTP Requests ------------- -A great way to inspect incoming HTTP requests including headers and query params is to sniff the network traffic on the port where PostgREST is running. For instance on a development server bound to port 3000 on localhost, run this: +A great way to inspect incoming HTTP requests including headers and query parameters is to sniff the network traffic on the port where PostgREST is running. For instance on a development server bound to port 3000 on localhost, run this: .. code:: bash @@ -250,7 +250,7 @@ Now, whenever the structure of the database schema changes, PostgreSQL will noti Daemonizing =========== -For linux distros that use **systemd** (ubuntu, debian, archlinux) you can create a daemon in the following way. +For Linux distributions that use **systemd** (Ubuntu, Debian, Archlinux) you can create a daemon in the following way. First, create postgrest configuration in ``/etc/postgrest/config`` @@ -271,7 +271,7 @@ Then create the systemd service file in ``/etc/systemd/system/postgrest.service` .. code-block:: ini [Unit] - Description=REST API for any Postgres database + Description=REST API for any PostgreSQL database After=postgresql.service [Service] diff --git a/api.rst b/api.rst index d2119a6ea..548c7094d 100644 --- a/api.rst +++ b/api.rst @@ -255,7 +255,7 @@ A full-text search on the computed column: GET /people?full_name=fts.Beckett HTTP/1.1 -As mentioned, computed columns do not appear in the output by default. However you can include them by listing them in the vertical filtering :code:`select` param: +As mentioned, computed columns do not appear in the output by default. However you can include them by listing them in the vertical filtering :code:`select` parameter: .. code-block:: HTTP @@ -314,7 +314,7 @@ Here ``information.cpe`` is a column name. .. note:: - Some http libraries might encode URLs automatically(e.g. :code:`axios`). In these cases you should use double quotes + Some HTTP libraries might encode URLs automatically(e.g. :code:`axios`). In these cases you should use double quotes :code:`""` directly instead of :code:`%22`. Ordering @@ -332,7 +332,7 @@ If no direction is specified it defaults to ascending order: GET /people?order=age HTTP/1.1 -If you care where nulls are sorted, add nullsfirst or nullslast: +If you care where nulls are sorted, add ``nullsfirst`` or ``nullslast``: .. code-block:: http @@ -359,7 +359,7 @@ PostgREST uses HTTP range headers to describe the size of results. Every respons Here items zero through fourteen are returned. This information is available in every response and can help you render pagination controls on the client. This is an RFC7233-compliant solution that keeps the response JSON cleaner. -There are two ways to apply a limit and offset rows: through request headers or query params. When using headers you specify the range of rows desired. This request gets the first twenty people. +There are two ways to apply a limit and offset rows: through request headers or query parameters. When using headers you specify the range of rows desired. This request gets the first twenty people. .. code-block:: http @@ -443,7 +443,7 @@ To help with these cases, PostgREST can get the exact count up until a threshold that threshold is surpassed. To use this behavior, you can specify the ``Prefer: count=estimated`` header. The **threshold** is defined by :ref:`max-rows`. -Here's an example. Suppose we set ``max-rows=1000`` and *smalltable* has 321 rows, then we'll get the exact count: +Here's an example. Suppose we set ``max-rows=1000`` and ``smalltable`` has 321 rows, then we'll get the exact count: .. code-block:: http @@ -455,7 +455,7 @@ Here's an example. Suppose we set ``max-rows=1000`` and *smalltable* has 321 row HTTP/1.1 206 Partial Content Content-Range: 0-24/321 -If we make a similar request on *bigtable*, which has 3573458 rows, we would get the planned count: +If we make a similar request on ``bigtable``, which has 3573458 rows, we would get the planned count: .. code-block:: http @@ -481,13 +481,13 @@ Use the Accept request header to specify the acceptable format (or formats) for GET /people HTTP/1.1 Accept: application/json -The current possibilities are +The current possibilities are: -* \*/\* -* text/csv -* application/json -* application/openapi+json -* application/octet-stream +* ``*/*`` +* ``text/csv`` +* ``application/json`` +* ``application/openapi+json`` +* ``application/octet-stream`` The server will default to JSON for API endpoints and OpenAPI on the root. @@ -776,7 +776,7 @@ Embedding Disambiguation ------------------------ For doing resource embedding, PostgREST infers the relationship between two tables based on a foreign key between them. -However, in cases where there's more than one foreign key between two tables, it's not possible to infer the relationship unambiguosly +However, in cases where there's more than one foreign key between two tables, it's not possible to infer the relationship unambiguously by just specifying the tables names. Target Disambiguation @@ -850,7 +850,7 @@ Hint Disambiguation ~~~~~~~~~~~~~~~~~~~ If specifying the **target** is not enough for unambiguous embedding, you can add a **hint**. For example, let's assume we create -two VIEWs of ``addresses``: ``central_addresses`` and ``eastern_addresses``. +two views of ``addresses``: ``central_addresses`` and ``eastern_addresses``. Since PostgREST supports :ref:`embedding_views` by detecting **source foreign keys** in the views, embedding with the foreign key as the **target** will not be enough for an unambiguous embed: @@ -914,7 +914,7 @@ URL encoded payloads can be posted with ``Content-Type: application/x-www-form-u No "{ \"a\": 1, \"b\": 2 }" - Some javascript libraries will post the data incorrectly if you're not careful. For best results try one of the :ref:`clientside_libraries` built for PostgREST. + Some JavaScript libraries will post the data incorrectly if you're not careful. For best results try one of the :ref:`clientside_libraries` built for PostgREST. To update a row or rows in a table, use the PATCH verb. Use :ref:`h_filter` to specify which record(s) to update. Here is an example query setting the :code:`category` column to child for all people below a certain age. @@ -1150,7 +1150,7 @@ PostgreSQL has four procedural languages that are part of the core distribution: .. note:: - Why the `/rpc` prefix? One reason is to avoid name collisions between views and procedures. It also helps emphasize to API consumers that these functions are not normal restful things. The functions can have arbitrary and surprising behavior, not the standard "post creates a resource" thing that users expect from the other routes. + Why the ``/rpc`` prefix? One reason is to avoid name collisions between views and procedures. It also helps emphasize to API consumers that these functions are not normal restful things. The functions can have arbitrary and surprising behavior, not the standard "post creates a resource" thing that users expect from the other routes. Immutable and stable functions ------------------------------ @@ -1171,10 +1171,10 @@ Because ``add_them`` is ``IMMUTABLE``, we can alternately call the function with The function parameter names match the JSON object keys in the POST case, for the GET case they match the query parameters ``?a=1&b=2``. -Calling functions with a single json parameter +Calling functions with a single JSON parameter ---------------------------------------------- -You can also call a function that takes a single parameter of type json by sending the header :code:`Prefer: params=single-object` with your request. That way the JSON request body will be used as the single argument. +You can also call a function that takes a single parameter of type JSON by sending the header :code:`Prefer: params=single-object` with your request. That way the JSON request body will be used as the single argument. .. code-block:: plpgsql @@ -1220,7 +1220,7 @@ as in ``{1,2,3,4}``. Note that the curly brackets have to be urlencoded(``{`` is .. code-block:: http - GET /rpc/plus_one?arr=%7B1,2,3,4%7D' HTTP/1.1 + GET /rpc/plus_one?arr=%7B1,2,3,4%7D' HTTP/1.1 .. note:: @@ -1232,14 +1232,14 @@ as in ``{1,2,3,4}``. Note that the curly brackets have to be urlencoded(``{`` is { "arr": "{1,2,3,4}" } - In these versions we recommend using function parameters of type json to accept arrays from the client. + In these versions we recommend using function parameters of type JSON to accept arrays from the client. .. _s_procs_variadic: Calling variadic functions -------------------------- -You can call a variadic function by passing a json array in a POST request: +You can call a variadic function by passing a JSON array in a POST request: .. code-block:: postgres @@ -1299,7 +1299,7 @@ PostgREST will detect if the function is scalar or table-valued and will shape t Bulk Call --------- -It's possible to call a function in a bulk way, analoguosly to :ref:`bulk_insert`. To do this, you need to add the +It's possible to call a function in a bulk way, analogously to :ref:`bulk_insert`. To do this, you need to add the ``Prefer: params=multiple-objects`` header to your request. .. code-block:: http @@ -1316,7 +1316,7 @@ It's possible to call a function in a bulk way, analoguosly to :ref:`bulk_insert [ 3, 7 ] -If you have large payloads to process, it's preferrable you instead use a function with an :ref:`array parameter ` or json parameter, as this will be more efficient. +If you have large payloads to process, it's preferable you instead use a function with an :ref:`array parameter ` or JSON parameter, as this will be more efficient. It's also possible to :ref:`Specify Columns ` on functions calls. @@ -1489,7 +1489,7 @@ HTTP Logic Accessing Request Headers, Cookies and JWT claims ------------------------------------------------- -You can access request headers, cookies and jwt claims by reading GUC variables set by PostgREST per request. They are named :code:`request.header.XYZ`, :code:`request.cookie.XYZ` and :code:`request.jwt.claim.XYZ`. +You can access request headers, cookies and JWT claims by reading GUC variables set by PostgREST per request. They are named :code:`request.header.XYZ`, :code:`request.cookie.XYZ` and :code:`request.jwt.claim.XYZ`. .. code-block:: postgresql @@ -1707,7 +1707,7 @@ PostgREST translates `PostgreSQL error codes `_ - In this video series, DigitalOcean shows how to build and deploy an Nginx + PostgREST(using a managed PostgreSQL database) + Vue.js webapp in an Ubuntu server droplet. -* `PostgREST + Auth0: Create REST API in mintutes, and add social login using Auth0 `_ - A step-by-step tutorial to show how to Dockerize and integrate Auth0 to PostgREST service. +* `PostgREST + Auth0: Create REST API in mintutes, and add social login using Auth0 `_ - A step-by-step tutorial to show how to dockerize and integrate Auth0 to PostgREST service. * `PostgREST + PostGIS API tutorial in 5 minutes `_ - In this tutorial, GIS • OPS shows how to perform PostGIS calculations through PostgREST :ref:`s_procs` interface. @@ -23,10 +23,10 @@ Example Apps * `tatut/postgrest-ui `_ - ClojureScript UI components for PostgREST * `priyank-purohit/PostGUI `_ - React Material UI admin panel * `Qu4tro/pgrst-dev-setup `_ - docker-compose and tmuxp setup for experimentation. -* `subzerocloud/postgrest-starter-kit `_ - Boilerplate for new project -* `NikolayS/postgrest-google-translate `_ - Calling to external translation service +* `subzerocloud/postgrest-starter-kit `_ - boilerplate for new project +* `NikolayS/postgrest-google-translate `_ - calling to external translation service * `CodeforAustralia/heritage-near-me `_ - Elm and PostgREST with PostGIS -* `timwis/handsontable-postgrest `_ - An excel-like database table editor +* `timwis/handsontable-postgrest `_ - an excel-like database table editor * `Recmo/PostgrestSkeleton `_ - Docker Compose, PostgREST, Nginx and Auth0 * `benoror/ember-postgrest-dynamic-ui `_ - generating Ember forms to edit data * `ruslantalpa/blogdemo `_ - blog api demo in a vagrant image @@ -39,7 +39,7 @@ Example Apps * `SMRxT/postgrest-demo `_ - multi-tenant logging system * `PierreRochard/postgrest-boilerplate `_ - example auth back-end * `marmelab/ng-admin-postgrest `_ - automatic database admin panel -* `seveibar/postgrest-vercel `_ - Run postgrest on Vercel (Serverless/AWS Lambda) +* `seveibar/postgrest-vercel `_ - run PostgREST on Vercel (Serverless/AWS Lambda) .. _eco_external_notification: @@ -48,7 +48,7 @@ External Notification These are PostgreSQL bridges that propagate LISTEN/NOTIFY to external queues for further processing. This allows stored procedures to initiate actions outside the database such as sending emails. -* `vbalasu/pg-notify-webhook `_ - Trigger webhooks from postgres LISTEN/NOTIFY +* `vbalasu/pg-notify-webhook `_ - trigger webhooks from PostgreSQL's LISTEN/NOTIFY * `diogob/postgres-websockets `_ - expose web sockets for PostgreSQL's LISTEN/NOTIFY * `frafra/postgresql2websocket `_ - Websockets * `matthewmueller/pg-bridge `_ - Amazon SNS @@ -63,14 +63,14 @@ These are PostgreSQL bridges that propagate LISTEN/NOTIFY to external queues for Extensions ---------- -* `pg-safeupdate `_ - Prevent full-table updates or deletes +* `pg-safeupdate `_ - prevent full-table updates or deletes * `srid/spas `_ - allow file uploads and basic auth * `svmnotn/postgrest-auth `_ - OAuth2-inspired external auth server * `wildsurfer/postgrest-oauth-server `_ - OAuth2 server * `nblumoe/postgrest-oauth `_ - OAuth2 WAI middleware * `criles25/postgrest-auth `_ - email based auth/signup -* `ppKrauss/PostgREST-writeAPI `_ - generate Nginx rewrite rules to fit an OpenAPI spec -* `seveibar/postgrest-node `_ - Run a postgrest server in NodeJS via an npm module +* `ppKrauss/PostgREST-writeAPI `_ - generate nginx rewrite rules to fit an OpenAPI spec +* `seveibar/postgrest-node `_ - Run a PostgREST server in Node.js via npm module * `Exahilosys/aiodata `_ - Python, event-based proxy and caching client. .. _clientside_libraries: @@ -95,7 +95,7 @@ Client-Side Libraries * `clesiemo3/postgrestR `_ - R * `PierreRochard/postgrest-angular `_ - TypeScript, generate UI from API description * `thejettdurham/postgrest-sharp-client `_ (needs maintainer) - C#, RestSharp -* `team142/ng-postgrest `_ - Angular app for browsing, editing data exposed over Postgrest. +* `team142/ng-postgrest `_ - Angular app for browsing, editing data exposed over PostgREST. * `andytango/redux-postgrest `_ - TypeScript/JS, client integrated with (React) Redux. .. _eco_commercial: diff --git a/how-tos/casting-type-to-custom-json.rst b/how-tos/casting-type-to-custom-json.rst index b2b25128d..1cc606127 100644 --- a/how-tos/casting-type-to-custom-json.rst +++ b/how-tos/casting-type-to-custom-json.rst @@ -80,12 +80,12 @@ The result now is: } ] -You can use the same idea for creating custom CASTs for different types. +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 `_ - for your own ``tsrange`` and add its own CAST. + If you don't want to modify casts for built-in types, an option would be to `create a custom type `_ + for your own ``tsrange`` and add its own cast. .. code-block:: postgres diff --git a/how-tos/providing-images-for-img.rst b/how-tos/providing-images-for-img.rst index be442287b..a90c7939e 100644 --- a/how-tos/providing-images-for-img.rst +++ b/how-tos/providing-images-for-img.rst @@ -1,11 +1,11 @@ .. _providing_img: -Providing images for -========================== +Providing images for ```` +============================== :author: `pkel `_ -In this how-to, you will learn how to create an endpoint for providing images to HTML :code:`` tags without client side javascript. +In this how-to, you will learn how to create an endpoint for providing images to HTML :code:`` tags without client side JavaScript. The resulting HTML might look like this: .. code-block:: html diff --git a/index.rst b/index.rst index 3e7b0b518..65d0d54e4 100644 --- a/index.rst +++ b/index.rst @@ -238,7 +238,7 @@ Testimonials -- Louis Brauer "I really enjoyed the fact that all of a sudden I was writing - microservices in SQL DDL (and v8 javascript functions). I dodged so + microservices in SQL DDL (and v8 JavaScript functions). I dodged so much boilerplate. The next thing I knew, we pulled out a full rewrite of a Spring+MySQL legacy app in 6 months. Literally 10x faster, and code was super concise. The old one took 3 years and a team of 4 diff --git a/install.rst b/install.rst index d365cf362..165a4b6ee 100644 --- a/install.rst +++ b/install.rst @@ -51,7 +51,7 @@ If you downloaded PostgREST from the release page, first extract the compressed # On Windows you should unzip the file -Now you can run postgrest with the :code:`--help` flag to see usage instructions: +Now you can run PostgREST with the :code:`--help` flag to see usage instructions: .. code-block:: bash @@ -218,7 +218,7 @@ Assuming your making modifications locally and then pushing to GitHub, it's easy 1. Create a new app on Heroku 2. In Settings add the following buildpack :code:`https://github.com/PostgREST/postgrest-heroku` 3. Add the require Config Vars in Heroku (see https://github.com/PostgREST/postgrest/blob/master/app.json#L7-L57 for more details) -4. Modify your postgrest.conf file as required to match your Config Vars in Heroku +4. Modify your ``postgrest.conf`` file as required to match your Config Vars in Heroku 5. Create your :code:`Procfile` and add :code:`./env-to-config ./postgrest postgrest.conf` 6. Push your changes to GitHub 7. Set Heroku to automatically deploy from Master and then manually deploy the branch for the first build diff --git a/postgrest.dict b/postgrest.dict index c0a0e8c82..0d043e805 100644 --- a/postgrest.dict +++ b/postgrest.dict @@ -1,24 +1,35 @@ personal_ws-1.1 en 0 utf-8 +Adossi AMQP api +API's +Archlinux aud Auth auth authenticator balancer -Bool +Beles +Bouscal +buildpack cd centric -conf +changelog +ClojureScript config cryptographically CSV -csv +Daemonizing DDL +DiBiase disjoined +dockerize DoS eq +Fenko +Fernandes filename +FreeBSD fts GHC Github @@ -27,23 +38,24 @@ grantor GraphQL gte GUC +Gumbs Haskell Heroku HMAC Homebrew -http HTTPS HV -ILIKE ilike +io IP JS +js JSON -json JWK JWT jwt Kinesis +Kofi localhost login Logins @@ -51,31 +63,36 @@ logins lon lt lte +macOS middleware +misprediction Mithril multi MVCC +namespace namespaced neq -NGINX -Nginx +nginx ngrep -nullsfirst -nullslast +nixpkgs +npm nxl nxr OAuth +onwards OpenAPI openapi ORM ov -param -params passphrase +Pelletier +Petr pgcrypto pgjwt pgSQL phfts +phraseto +plainto plfts PostGIS PostgreSQL @@ -84,18 +101,24 @@ PostgREST postgrest PostgREST's pre +psql +Qin RabbitMQ +Rafaj RDS reallyreallyreallyreallyverysafe +Redux refactor requester's RESTful RestSharp RLS +RPC RSA savepoint schemas Sencha +Serverless SHA signup SIGUSR @@ -108,23 +131,35 @@ sr SSL stateful stdout +Stolarz SuperAgent syslog +systemd Tcl +tmuxp +todo +todos +Tsingson tsquery TypeScript UI ui unicode +unix UPSERT -Upsert uri url urls +variadic +Vercel verifier versioning Vondra +Vue WAI +webhooks +websearch Websockets webuser +wfts ZeroMQ diff --git a/releases/upcoming.rst b/releases/upcoming.rst index c6d9ec27d..4ef4ea9af 100644 --- a/releases/upcoming.rst +++ b/releases/upcoming.rst @@ -10,7 +10,7 @@ These are changes yet unreleased. If you'd like to try them out before a new off Added ----- -* Allow http status override through the :ref:`response.status ` GUC. +* Allow HTTP status override through the :ref:`response.status ` GUC. |br| -- `@steve-chavez `_ * Allow :ref:`s_procs_variadic`. |br| -- `@wolfgangwalther `_ @@ -24,6 +24,6 @@ Fixed Changed ------- -* Docker images are now optimized to be built from the scratch image. This reduces the compressed image size from over 30mb to about 4mb. +* Docker images are now optimized to be built from the scratch image. This reduces the compressed image size from over 30 MB to about 4 MB. For more details, see `Docker image built with Nix `_. |br| -- `@monacoremo `_ diff --git a/releases/v7.0.0.rst b/releases/v7.0.0.rst index 57117c22f..d72579086 100644 --- a/releases/v7.0.0.rst +++ b/releases/v7.0.0.rst @@ -5,7 +5,7 @@ v7.0.0 ====== -You can donwload this release at the `PostgREST v7.0.0 release page `_. +You can download this release at the `PostgREST v7.0.0 release page `_. Added ----- @@ -45,7 +45,7 @@ Added Fixed ----- -* Allow embedding a VIEW when its source table foreign key is UNIQUE +* Allow embedding a view when its source table foreign key is UNIQUE |br| -- `@bwbroersma `_ * ``Accept: application/vnd.pgrst.object+json`` behavior is now enforced for POST/PATCH/DELETE regardless of ``Prefer: return=minimal`` diff --git a/schema_structure.rst b/schema_structure.rst index a51d08c92..c45f30f32 100644 --- a/schema_structure.rst +++ b/schema_structure.rst @@ -20,7 +20,7 @@ This allows you to change the internals of your schema and maintain backwards co Functions ========= -By default, when a function is created, the privilege to execute it is not restricted by role. The function access is PUBLIC—executable by all roles (more details at `PostgreSQL Privileges page `_). This is not ideal for an API schema. To disable this behavior, you can run the following SQL statement: +By default, when a function is created, the privilege to execute it is not restricted by role. The function access is ``PUBLIC`` — executable by all roles (more details at `PostgreSQL Privileges page `_). This is not ideal for an API schema. To disable this behavior, you can run the following SQL statement: .. code-block:: postgres @@ -55,7 +55,7 @@ Security definer ---------------- A function is executed with the privileges of the user who calls it. This means that the user has to have all permissions to do the operations the procedure performs. -If the function accesses private database objects, your :ref:`API roles ` won't be able to succesfully execute the function. +If the function accesses private database objects, your :ref:`API roles ` won't be able to successfully execute the function. Another option is to define the function with the :code:`SECURITY DEFINER` option. Then only one permission check will take place, the permission to call the function, and the operations in the function will have the authority of the user who owns the function itself. @@ -84,13 +84,13 @@ For changing this, we can create a non-SUPERUSER role and make this role the vie .. code-block:: postgres - CREATE ROLE api_views_owner NOINHERIT; - ALTER VIEW sample_view OWNER TO api_views_owner; + CREATE ROLE api_views_owner NOINHERIT; + ALTER VIEW sample_view OWNER TO api_views_owner; Rules ----- -Insertion on VIEWs with complex `RULEs `_ might not work out of the box with PostgREST. -It's recommended that you `use triggers instead of RULEs `_. -If you want to keep using RULEs, a workaround is to wrap the VIEW insertion in a stored procedure and call it through the :ref:`s_procs` interface. +Insertion on views with complex `rules `_ might not work out of the box with PostgREST. +It's recommended that you `use triggers instead of rules `_. +If you want to keep using rules, a workaround is to wrap the view insertion in a stored procedure and call it through the :ref:`s_procs` interface. For more details, see this `github issue `_.