<entry><type>bool</type></entry>
<entry>
Role can log in. That is, this role can be given as the initial
- session authorization identifier
+ session authorization identifier.
</entry>
</row>
</term>
<listitem>
<para>
- If set, do not trace locks for tables below this OID. (use to avoid
- output on system tables)
+ If set, do not trace locks for tables below this OID (used to avoid
+ output on system tables).
</para>
<para>
This parameter is only available if the <symbol>LOCK_DEBUG</symbol>
OK
(1 row)
-SELECT * FROM dblink('myconn','SELECT * FROM foo') AS t(a int, b text, c text[]);
+SELECT * FROM dblink('myconn', 'SELECT * FROM foo') AS t(a int, b text, c text[]);
a | b | c
----+---+---------------
0 | a | {a0,b0,c0}
<para>
The SQL command that you wish to execute in the remote database,
for example
- <literal>insert into foo values(0,'a','{"a0","b0","c0"}')</>.
+ <literal>insert into foo values(0, 'a', '{"a0","b0","c0"}')</literal>.
</para>
</listitem>
</varlistentry>
OK
(1 row)
-SELECT dblink_exec('insert into foo values(21,''z'',''{"a0","b0","c0"}'');');
+SELECT dblink_exec('insert into foo values(21, ''z'', ''{"a0","b0","c0"}'');');
dblink_exec
-----------------
INSERT 943366 1
OK
(1 row)
-SELECT dblink_exec('myconn', 'insert into foo values(21,''z'',''{"a0","b0","c0"}'');');
+SELECT dblink_exec('myconn', 'insert into foo values(21, ''z'', ''{"a0","b0","c0"}'');');
dblink_exec
------------------
INSERT 6432584 1
obj.object_name,
obj.object_identity;
END LOOP;
-END
+END;
$$;
CREATE EVENT TRIGGER test_event_trigger_for_drops
ON sql_drop
if a foreground cleanup does occur, it will take even longer.
</para>
<para>
- <varname>gin_pending_list_limit</> can be overridden for individual
- GIN indexes by changing storage parameters, and which allows each
+ <varname>gin_pending_list_limit</varname> can be overridden for individual
+ GIN indexes by changing storage parameters, which allows each
GIN index to have its own cleanup threshold.
For example, it's possible to increase the threshold only for the GIN
index which can be updated heavily, and decrease it otherwise.
Note that in this mode, the server will apply WAL one file at a
time, so if you use the standby server for queries (see Hot Standby),
there is a delay between an action in the master and when the
- action becomes visible in the standby, corresponding the time it takes
+ action becomes visible in the standby, corresponding to the time it takes
to fill up the WAL file. <varname>archive_timeout</> can be used to make that delay
shorter. Also note that you can't combine streaming replication with
this method.
hard-coded list of prefixes; this list of prefixes is also used to hyphenate
numbers on output. Since new prefixes are assigned from time to time, the
list of prefixes may be out of date. It is hoped that a future version of
- this module will obtained the prefix list from one or more tables that
+ this module will obtain the prefix list from one or more tables that
can be easily updated by users as needed; however, at present, the
list can only be updated by modifying the source code and recompiling.
Alternatively, prefix validation and hyphenation support may be
<para>
The <literal>FOR UPDATE</> lock mode
is also acquired by any <command>DELETE</> on a row, and also by an
- <command>UPDATE</> that modifies the values on certain columns. Currently,
+ <command>UPDATE</> that modifies the values of certain columns. Currently,
the set of columns considered for the <command>UPDATE</> case are those that
have a unique index on them that can be used in a foreign key (so partial
indexes and expressional indexes are not considered), but this may change
SELECT users.userid INTO STRICT userid
FROM users WHERE users.username = get_userid.username;
RETURN userid;
-END
+END;
$$ LANGUAGE plpgsql;
</programlisting>
On failure, this function might produce an error message such as
RETURN NEXT r; -- return current row of SELECT
END LOOP;
RETURN;
-END
+END;
$BODY$
LANGUAGE plpgsql;
END IF;
RETURN;
- END
+ END;
$BODY$
LANGUAGE plpgsql;
f1 int;
BEGIN
RETURN f1;
-END
+END;
$$ LANGUAGE plpgsql;
WARNING: variable "f1" shadows a previously defined variable
LINE 3: f1 int;
[ FROM <replaceable class="parameter">from_item</replaceable> [, ...] ]
[ WHERE <replaceable class="parameter">condition</replaceable> ]
[ GROUP BY <replaceable class="parameter">grouping_element</replaceable> [, ...] ]
- [ HAVING <replaceable class="parameter">condition</replaceable> [, ...] ]
+ [ HAVING <replaceable class="parameter">condition</replaceable> ]
[ WINDOW <replaceable class="parameter">window_name</replaceable> AS ( <replaceable class="parameter">window_definition</replaceable> ) [, ...] ]
[ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] <replaceable class="parameter">select</replaceable> ]
[ ORDER BY <replaceable class="parameter">expression</replaceable> [ ASC | DESC | USING <replaceable class="parameter">operator</replaceable> ] [ NULLS { FIRST | LAST } ] [, ...] ]
[ FROM <replaceable class="parameter">from_item</replaceable> [, ...] ]
[ WHERE <replaceable class="parameter">condition</replaceable> ]
[ GROUP BY <replaceable class="parameter">expression</replaceable> [, ...] ]
- [ HAVING <replaceable class="parameter">condition</replaceable> [, ...] ]
+ [ HAVING <replaceable class="parameter">condition</replaceable> ]
[ WINDOW <replaceable class="parameter">window_name</replaceable> AS ( <replaceable class="parameter">window_definition</replaceable> ) [, ...] ]
[ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] <replaceable class="parameter">select</replaceable> ]
[ ORDER BY <replaceable class="parameter">expression</replaceable> [ ASC | DESC | USING <replaceable class="parameter">operator</replaceable> ] [ NULLS { FIRST | LAST } ] [, ...] ]
</para>
<para>
- The benefit of implementing views with the rule system is,
+ The benefit of implementing views with the rule system is
that the planner has all
the information about which tables have to be scanned plus the
relationships between these tables plus the restrictive
the best path to execute the query, and the more information
the planner has, the better this decision can be. And
the rule system as implemented in <productname>PostgreSQL</productname>
- ensures, that this is all information available about the query
+ ensures that this is all information available about the query
up to that point.
</para>
</sect2>
BEGIN
RAISE NOTICE '% => %', $1, $2;
RETURN true;
-END
+END;
$$ LANGUAGE plpgsql COST 0.0000000000000000000001;
SELECT * FROM phone_number WHERE tricky(person, phone);
</table>
<para>
- Because <literal>...</> is widely used in data sources, it is allowed
- as an alternative spelling of <literal>..</>. Unfortunately, this
+ Because the <literal>...</literal> operator is widely used in data sources, it is allowed
+ as an alternative spelling of the <literal>..</literal> operator. Unfortunately, this
creates a parsing ambiguity: it is not clear whether the upper bound
in <literal>0...23</> is meant to be <literal>23</> or <literal>0.23</>.
This is resolved by requiring at least one digit before the decimal
positions in <type>tsvector</type>, which in turn affect ranking:
<screen>
-SELECT to_tsvector('english','in the list of stop words');
+SELECT to_tsvector('english', 'in the list of stop words');
to_tsvector
----------------------------
'list':3 'stop':5 'word':6
calculated for documents with and without stop words are quite different:
<screen>
-SELECT ts_rank_cd (to_tsvector('english','in the list of stop words'), to_tsquery('list & stop'));
+SELECT ts_rank_cd (to_tsvector('english', 'in the list of stop words'), to_tsquery('list & stop'));
ts_rank_cd
------------
0.05
-SELECT ts_rank_cd (to_tsvector('english','list stop words'), to_tsquery('list & stop'));
+SELECT ts_rank_cd (to_tsvector('english', 'list stop words'), to_tsquery('list & stop'));
ts_rank_cd
------------
0.1
Now we can test our dictionary:
<screen>
-SELECT ts_lexize('public.simple_dict','YeS');
+SELECT ts_lexize('public.simple_dict', 'YeS');
ts_lexize
-----------
{yes}
-SELECT ts_lexize('public.simple_dict','The');
+SELECT ts_lexize('public.simple_dict', 'The');
ts_lexize
-----------
{}
<screen>
ALTER TEXT SEARCH DICTIONARY public.simple_dict ( Accept = false );
-SELECT ts_lexize('public.simple_dict','YeS');
+SELECT ts_lexize('public.simple_dict', 'YeS');
ts_lexize
-----------
-SELECT ts_lexize('public.simple_dict','The');
+SELECT ts_lexize('public.simple_dict', 'The');
ts_lexize
-----------
{}
Then we will get these results:
<screen>
mydb=# CREATE TEXT SEARCH DICTIONARY syn (template=synonym, synonyms='synonym_sample');
-mydb=# SELECT ts_lexize('syn','indices');
+mydb=# SELECT ts_lexize('syn', 'indices');
ts_lexize
-----------
{index}
mydb=# CREATE TEXT SEARCH CONFIGURATION tst (copy=simple);
mydb=# ALTER TEXT SEARCH CONFIGURATION tst ALTER MAPPING FOR asciiword WITH syn;
-mydb=# SELECT to_tsvector('tst','indices');
+mydb=# SELECT to_tsvector('tst', 'indices');
to_tsvector
-------------
'index':1
(1 row)
-mydb=# SELECT to_tsquery('tst','indices');
+mydb=# SELECT to_tsquery('tst', 'indices');
to_tsquery
------------
'index':*
'are' 'indexes' 'useful' 'very'
(1 row)
-mydb=# SELECT 'indexes are very useful'::tsvector @@ to_tsquery('tst','indices');
+mydb=# SELECT 'indexes are very useful'::tsvector @@ to_tsquery('tst', 'indices');
?column?
----------
t
Here is a simple example:
<screen>
-SELECT * FROM ts_debug('english','a fat cat sat on a mat - it ate a fat rats');
+SELECT * FROM ts_debug('english', 'a fat cat sat on a mat - it ate a fat rats');
alias | description | token | dictionaries | dictionary | lexemes
-----------+-----------------+-------+----------------+--------------+---------
asciiword | Word, all ASCII | a | {english_stem} | english_stem | {}
</programlisting>
<screen>
-SELECT * FROM ts_debug('public.english','The Brightest supernovaes');
+SELECT * FROM ts_debug('public.english', 'The Brightest supernovaes');
alias | description | token | dictionaries | dictionary | lexemes
-----------+-----------------+-------------+-------------------------------+----------------+-------------
asciiword | Word, all ASCII | The | {english_ispell,english_stem} | english_ispell | {}
<screen>
SELECT alias, token, dictionary, lexemes
-FROM ts_debug('public.english','The Brightest supernovaes');
+FROM ts_debug('public.english', 'The Brightest supernovaes');
alias | token | dictionary | lexemes
-----------+-------------+----------------+-------------
asciiword | The | english_ispell | {}
where this can be confusing:
<screen>
-SELECT ts_lexize('thesaurus_astro','supernovae stars') is null;
+SELECT ts_lexize('thesaurus_astro', 'supernovae stars') is null;
?column?
----------
t