Fix highlighting and move running the server header

This commit is contained in:
steve-chavez
2018-09-20 10:47:52 -05:00
committed by Steve Chávez
parent a1d4b3ed34
commit 518b465ffa
2 changed files with 11 additions and 14 deletions
+10 -13
View File
@@ -103,22 +103,19 @@ The view will provide a new endpoint:
Full-Text Search Full-Text Search
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
The :code:`fts` filter mentioned above has a number of options to support flexible textual queries, namely the choice of plain vs phrase search and the language used for stemming. Suppose that :code:`tsearch` is a table with column :code:`my_tsv`, of type `tsvector <https://www.postgresql.org/docs/current/static/datatype-textsearch.html>`_. The follow examples illustrate the possibilities. The :code:`fts` filter mentioned above has a number of options to support flexible textual queries, namely the choice of plain vs phrase search and the language used for stemming. Suppose that :code:`tsearch` is a table with column :code:`my_tsv`, of type `tsvector <https://www.postgresql.org/docs/current/static/datatype-textsearch.html>`_. The following examples illustrate the possibilities.
.. code-block:: http .. code-block:: http
# Use language in fts query GET /tsearch?my_tsv=fts(french).amusant HTTP/1.1
GET /tsearch?my_tsv=fts(french).amusant
# Use plainto_tsquery and phraseto_tsquery .. code-block:: http
GET /tsearch?my_tsv=plfts.The%20Fat%20Cats
GET /tsearch?my_tsv=phfts.The%20Fat%20Rats
# Combine both GET /tsearch?my_tsv=plfts.The%20Fat%20Cats HTTP/1.1
GET /tsearch?my_tsv=phfts(english).The%20Fat%20Cats
# "not" also working .. code-block:: http
GET /tsearch?my_tsv=not.phfts(english).The%20Fat%20Cats
GET /tsearch?my_tsv=not.phfts(english).The%20Fat%20Cats HTTP/1.1
Using phrase search mode requires PostgreSQL of version at least 9.6 and will raise an error in earlier versions of the database. Using phrase search mode requires PostgreSQL of version at least 9.6 and will raise an error in earlier versions of the database.
@@ -346,7 +343,7 @@ By default PostgREST returns all JSON results in an array, even when there is on
This can be inconvenient for client code. To return the first result as an object unenclosed by an array, specify :code:`vnd.pgrst.object` as part of the :code:`Accept` header This can be inconvenient for client code. To return the first result as an object unenclosed by an array, specify :code:`vnd.pgrst.object` as part of the :code:`Accept` header
.. code:: http .. code-block:: http
GET /items?id=eq.1 HTTP/1.1 GET /items?id=eq.1 HTTP/1.1
Accept: application/vnd.pgrst.object+json Accept: application/vnd.pgrst.object+json
@@ -621,7 +618,7 @@ PostgreSQL has four procedural languages that are part of the core distribution:
For versions prior to PostgreSQL 10, to pass a PostgreSQL native array you need to quote it as a string: For versions prior to PostgreSQL 10, to pass a PostgreSQL native array you need to quote it as a string:
.. code:: http .. code-block:: http
POST /rpc/native_array_func HTTP/1.1 POST /rpc/native_array_func HTTP/1.1
@@ -629,7 +626,7 @@ PostgreSQL has four procedural languages that are part of the core distribution:
In these versions we recommend using function arguments of type json to accept arrays from the client: In these versions we recommend using function arguments of type json to accept arrays from the client:
.. code:: http .. code-block:: http
POST /rpc/json_array_func HTTP/1.1 POST /rpc/json_array_func HTTP/1.1
+1 -1
View File
@@ -222,7 +222,7 @@ role-claim-key
role-claim-key = ".\"https://www.example.com/role\".key" role-claim-key = ".\"https://www.example.com/role\".key"
Running the Server Running the Server
------------------ ==================
PostgREST outputs basic request logging to stdout. When running it in an SSH session you must detach it from stdout or it will be terminated when the session closes. The easiest technique is redirecting the output to a log file or to the syslog: PostgREST outputs basic request logging to stdout. When running it in an SSH session you must detach it from stdout or it will be terminated when the session closes. The easiest technique is redirecting the output to a log file or to the syslog: