Kaydet (Commit) 51fbe2a6 authored tarafından Marti Raudsepp's avatar Marti Raudsepp Kaydeden (comit) Tim Graham

Updated postgresql.org links to https and made them canonical.

üst adc93e85
...@@ -12,7 +12,7 @@ class DatabaseOperations(BaseDatabaseOperations): ...@@ -12,7 +12,7 @@ class DatabaseOperations(BaseDatabaseOperations):
if internal_type in ("GenericIPAddressField", "IPAddressField", "TimeField", "UUIDField"): if internal_type in ("GenericIPAddressField", "IPAddressField", "TimeField", "UUIDField"):
# PostgreSQL will resolve a union as type 'text' if input types are # PostgreSQL will resolve a union as type 'text' if input types are
# 'unknown'. # 'unknown'.
# http://www.postgresql.org/docs/9.4/static/typeconv-union-case.html # https://www.postgresql.org/docs/current/static/typeconv-union-case.html
# These fields cannot be implicitly cast back in the default # These fields cannot be implicitly cast back in the default
# PostgreSQL configuration so we need to explicitly cast them. # PostgreSQL configuration so we need to explicitly cast them.
# We must also remove components of the type within brackets: # We must also remove components of the type within brackets:
...@@ -21,7 +21,7 @@ class DatabaseOperations(BaseDatabaseOperations): ...@@ -21,7 +21,7 @@ class DatabaseOperations(BaseDatabaseOperations):
return '%s' return '%s'
def date_extract_sql(self, lookup_type, field_name): def date_extract_sql(self, lookup_type, field_name):
# http://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT # https://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT
if lookup_type == 'week_day': if lookup_type == 'week_day':
# For consistency across backends, we return Sunday=1, Saturday=7. # For consistency across backends, we return Sunday=1, Saturday=7.
return "EXTRACT('dow' FROM %s) + 1" % field_name return "EXTRACT('dow' FROM %s) + 1" % field_name
...@@ -29,7 +29,7 @@ class DatabaseOperations(BaseDatabaseOperations): ...@@ -29,7 +29,7 @@ class DatabaseOperations(BaseDatabaseOperations):
return "EXTRACT('%s' FROM %s)" % (lookup_type, field_name) return "EXTRACT('%s' FROM %s)" % (lookup_type, field_name)
def date_trunc_sql(self, lookup_type, field_name): def date_trunc_sql(self, lookup_type, field_name):
# http://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC # https://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC
return "DATE_TRUNC('%s', %s)" % (lookup_type, field_name) return "DATE_TRUNC('%s', %s)" % (lookup_type, field_name)
def _convert_field_to_tz(self, field_name, tzname): def _convert_field_to_tz(self, field_name, tzname):
...@@ -57,7 +57,7 @@ class DatabaseOperations(BaseDatabaseOperations): ...@@ -57,7 +57,7 @@ class DatabaseOperations(BaseDatabaseOperations):
def datetime_trunc_sql(self, lookup_type, field_name, tzname): def datetime_trunc_sql(self, lookup_type, field_name, tzname):
field_name, params = self._convert_field_to_tz(field_name, tzname) field_name, params = self._convert_field_to_tz(field_name, tzname)
# http://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC # https://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC
sql = "DATE_TRUNC('%s', %s)" % (lookup_type, field_name) sql = "DATE_TRUNC('%s', %s)" % (lookup_type, field_name)
return sql, params return sql, params
......
...@@ -27,7 +27,7 @@ thrilled to be able to give something back to the open-source community. ...@@ -27,7 +27,7 @@ thrilled to be able to give something back to the open-source community.
.. _Apache: https://httpd.apache.org/ .. _Apache: https://httpd.apache.org/
.. _Python: https://www.python.org/ .. _Python: https://www.python.org/
.. _PostgreSQL: http://www.postgresql.org/ .. _PostgreSQL: https://www.postgresql.org/
What does "Django" mean, and how do you pronounce it? What does "Django" mean, and how do you pronounce it?
===================================================== =====================================================
......
...@@ -33,7 +33,7 @@ also need a database engine. PostgreSQL_ is recommended, because we're ...@@ -33,7 +33,7 @@ also need a database engine. PostgreSQL_ is recommended, because we're
PostgreSQL fans, and MySQL_, `SQLite 3`_, and Oracle_ are also supported. PostgreSQL fans, and MySQL_, `SQLite 3`_, and Oracle_ are also supported.
.. _Python: https://www.python.org/ .. _Python: https://www.python.org/
.. _PostgreSQL: http://www.postgresql.org/ .. _PostgreSQL: https://www.postgresql.org/
.. _MySQL: https://www.mysql.com/ .. _MySQL: https://www.mysql.com/
.. _`SQLite 3`: https://www.sqlite.org/ .. _`SQLite 3`: https://www.sqlite.org/
.. _Oracle: http://www.oracle.com/ .. _Oracle: http://www.oracle.com/
......
...@@ -19,7 +19,7 @@ only the common types, such as ``VARCHAR`` and ``INTEGER``. For more obscure ...@@ -19,7 +19,7 @@ only the common types, such as ``VARCHAR`` and ``INTEGER``. For more obscure
column types, such as geographic polygons or even user-created types such as column types, such as geographic polygons or even user-created types such as
`PostgreSQL custom types`_, you can define your own Django ``Field`` subclasses. `PostgreSQL custom types`_, you can define your own Django ``Field`` subclasses.
.. _PostgreSQL custom types: http://www.postgresql.org/docs/current/interactive/sql-createtype.html .. _PostgreSQL custom types: https://www.postgresql.org/docs/current/static/sql-createtype.html
Alternatively, you may have a complex Python object that can somehow be Alternatively, you may have a complex Python object that can somehow be
serialized to fit into a standard database column type. This is another case serialized to fit into a standard database column type. This is another case
......
...@@ -6,7 +6,7 @@ PostgreSQL specific aggregation functions ...@@ -6,7 +6,7 @@ PostgreSQL specific aggregation functions
:synopsis: PostgreSQL specific aggregation functions :synopsis: PostgreSQL specific aggregation functions
These functions are described in more detail in the `PostgreSQL docs These functions are described in more detail in the `PostgreSQL docs
<http://www.postgresql.org/docs/current/static/functions-aggregate.html>`_. <https://www.postgresql.org/docs/current/static/functions-aggregate.html>`_.
.. note:: .. note::
......
...@@ -17,7 +17,7 @@ similarity threshold. ...@@ -17,7 +17,7 @@ similarity threshold.
To use it, add ``'django.contrib.postgres'`` in your :setting:`INSTALLED_APPS` To use it, add ``'django.contrib.postgres'`` in your :setting:`INSTALLED_APPS`
and activate the `pg_trgm extension and activate the `pg_trgm extension
<http://www.postgresql.org/docs/current/interactive/pgtrgm.html>`_ on <https://www.postgresql.org/docs/current/static/pgtrgm.html>`_ on
PostgreSQL. You can install the extension using the PostgreSQL. You can install the extension using the
:class:`~django.contrib.postgres.operations.TrigramExtension` migration :class:`~django.contrib.postgres.operations.TrigramExtension` migration
operation. operation.
...@@ -43,7 +43,7 @@ the `unaccent extension on PostgreSQL`_. The ...@@ -43,7 +43,7 @@ the `unaccent extension on PostgreSQL`_. The
:class:`~django.contrib.postgres.operations.UnaccentExtension` migration :class:`~django.contrib.postgres.operations.UnaccentExtension` migration
operation is available if you want to perform this activation using migrations). operation is available if you want to perform this activation using migrations).
.. _unaccent extension on PostgreSQL: http://www.postgresql.org/docs/current/interactive/unaccent.html .. _unaccent extension on PostgreSQL: https://www.postgresql.org/docs/current/static/unaccent.html
The ``unaccent`` lookup can be used on The ``unaccent`` lookup can be used on
:class:`~django.db.models.CharField` and :class:`~django.db.models.TextField`:: :class:`~django.db.models.CharField` and :class:`~django.db.models.TextField`::
......
...@@ -6,7 +6,7 @@ Full text search ...@@ -6,7 +6,7 @@ Full text search
The database functions in the ``django.contrib.postgres.search`` module ease The database functions in the ``django.contrib.postgres.search`` module ease
the use of PostgreSQL's `full text search engine the use of PostgreSQL's `full text search engine
<http://www.postgresql.org/docs/current/static/textsearch.html>`_. <https://www.postgresql.org/docs/current/static/textsearch.html>`_.
For the examples in this document, we'll use the models defined in For the examples in this document, we'll use the models defined in
:doc:`/topics/db/queries`. :doc:`/topics/db/queries`.
...@@ -167,7 +167,7 @@ In the event that all the fields you're querying on are contained within one ...@@ -167,7 +167,7 @@ In the event that all the fields you're querying on are contained within one
particular model, you can create a functional index which matches the search particular model, you can create a functional index which matches the search
vector you wish to use. The PostgreSQL documentation has details on vector you wish to use. The PostgreSQL documentation has details on
`creating indexes for full text search `creating indexes for full text search
<http://www.postgresql.org/docs/current/static/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX>`_. <https://www.postgresql.org/docs/current/static/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX>`_.
``SearchVectorField`` ``SearchVectorField``
--------------------- ---------------------
...@@ -183,7 +183,7 @@ if it were an annotated ``SearchVector``:: ...@@ -183,7 +183,7 @@ if it were an annotated ``SearchVector``::
>>> Entry.objects.filter(search_vector='cheese') >>> Entry.objects.filter(search_vector='cheese')
[<Entry: Cheese on Toast recipes>, <Entry: Pizza recipes>] [<Entry: Cheese on Toast recipes>, <Entry: Pizza recipes>]
.. _PostgreSQL documentation: http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-UPDATE-TRIGGERS .. _PostgreSQL documentation: https://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-UPDATE-TRIGGERS
Trigram similarity Trigram similarity
================== ==================
...@@ -193,7 +193,7 @@ three consecutive characters. In addition to the :lookup:`trigram_similar` ...@@ -193,7 +193,7 @@ three consecutive characters. In addition to the :lookup:`trigram_similar`
lookup, you can use a couple of other expressions. lookup, you can use a couple of other expressions.
To use them, you need to activate the `pg_trgm extension To use them, you need to activate the `pg_trgm extension
<http://www.postgresql.org/docs/current/interactive/pgtrgm.html>`_ on <https://www.postgresql.org/docs/current/static/pgtrgm.html>`_ on
PostgreSQL. You can install it using the PostgreSQL. You can install it using the
:class:`~django.contrib.postgres.operations.TrigramExtension` migration :class:`~django.contrib.postgres.operations.TrigramExtension` migration
operation. operation.
......
...@@ -121,7 +121,7 @@ user with `ALTER ROLE`_. ...@@ -121,7 +121,7 @@ user with `ALTER ROLE`_.
Django will work just fine without this optimization, but each new connection Django will work just fine without this optimization, but each new connection
will do some additional queries to set these parameters. will do some additional queries to set these parameters.
.. _ALTER ROLE: http://www.postgresql.org/docs/current/interactive/sql-alterrole.html .. _ALTER ROLE: https://www.postgresql.org/docs/current/static/sql-alterrole.html
.. _database-isolation-level: .. _database-isolation-level:
...@@ -148,7 +148,7 @@ configuration in :setting:`DATABASES`:: ...@@ -148,7 +148,7 @@ configuration in :setting:`DATABASES`::
handle exceptions raised on serialization failures. This option is handle exceptions raised on serialization failures. This option is
designed for advanced uses. designed for advanced uses.
.. _isolation level: http://www.postgresql.org/docs/current/static/transaction-iso.html .. _isolation level: https://www.postgresql.org/docs/current/static/transaction-iso.html
Indexes for ``varchar`` and ``text`` columns Indexes for ``varchar`` and ``text`` columns
-------------------------------------------- --------------------------------------------
...@@ -162,7 +162,7 @@ for the column. The extra index is necessary to correctly perform ...@@ -162,7 +162,7 @@ for the column. The extra index is necessary to correctly perform
lookups that use the ``LIKE`` operator in their SQL, as is done with the lookups that use the ``LIKE`` operator in their SQL, as is done with the
``contains`` and ``startswith`` lookup types. ``contains`` and ``startswith`` lookup types.
.. _PostgreSQL operator class: http://www.postgresql.org/docs/current/static/indexes-opclass.html .. _PostgreSQL operator class: https://www.postgresql.org/docs/current/static/indexes-opclass.html
Migration operation for adding extensions Migration operation for adding extensions
----------------------------------------- -----------------------------------------
...@@ -185,7 +185,7 @@ Speeding up test execution with non-durable settings ...@@ -185,7 +185,7 @@ Speeding up test execution with non-durable settings
---------------------------------------------------- ----------------------------------------------------
You can speed up test execution times by `configuring PostgreSQL to be You can speed up test execution times by `configuring PostgreSQL to be
non-durable <http://www.postgresql.org/docs/current/static/non-durability.html>`_. non-durable <https://www.postgresql.org/docs/current/static/non-durability.html>`_.
.. warning:: .. warning::
......
...@@ -765,7 +765,7 @@ object. If it's ``None``, Django uses the :ref:`current time zone ...@@ -765,7 +765,7 @@ object. If it's ``None``, Django uses the :ref:`current time zone
`mysql_tzinfo_to_sql`_. `mysql_tzinfo_to_sql`_.
.. _pytz: http://pytz.sourceforge.net/ .. _pytz: http://pytz.sourceforge.net/
.. _Time Zones: http://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-TIMEZONES .. _Time Zones: https://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-TIMEZONES
.. _Choosing a Time Zone File: https://docs.oracle.com/cd/E11882_01/server.112/e10729/ch4datetime.htm#NLSPG258 .. _Choosing a Time Zone File: https://docs.oracle.com/cd/E11882_01/server.112/e10729/ch4datetime.htm#NLSPG258
.. _mysql_tzinfo_to_sql: https://dev.mysql.com/doc/refman/en/mysql-tzinfo-to-sql.html .. _mysql_tzinfo_to_sql: https://dev.mysql.com/doc/refman/en/mysql-tzinfo-to-sql.html
......
...@@ -667,7 +667,7 @@ backend-specific. ...@@ -667,7 +667,7 @@ backend-specific.
Supported by the PostgreSQL_ (``postgresql``) and MySQL_ (``mysql``) backends. Supported by the PostgreSQL_ (``postgresql``) and MySQL_ (``mysql``) backends.
.. _PostgreSQL: http://www.postgresql.org/docs/current/static/multibyte.html .. _PostgreSQL: https://www.postgresql.org/docs/current/static/multibyte.html
.. _MySQL: https://dev.mysql.com/doc/refman/en/charset-database.html .. _MySQL: https://dev.mysql.com/doc/refman/en/charset-database.html
.. setting:: TEST_COLLATION .. setting:: TEST_COLLATION
......
...@@ -30,7 +30,7 @@ able to store certain characters in the database, and information will be lost. ...@@ -30,7 +30,7 @@ able to store certain characters in the database, and information will be lost.
for internal encoding. for internal encoding.
.. _MySQL manual: https://dev.mysql.com/doc/refman/en/charset-database.html .. _MySQL manual: https://dev.mysql.com/doc/refman/en/charset-database.html
.. _PostgreSQL manual: http://www.postgresql.org/docs/current/static/multibyte.html .. _PostgreSQL manual: https://www.postgresql.org/docs/current/static/multibyte.html
.. _Oracle manual: https://docs.oracle.com/cd/E11882_01/server.112/e10729/toc.htm .. _Oracle manual: https://docs.oracle.com/cd/E11882_01/server.112/e10729/toc.htm
.. _section 2: https://docs.oracle.com/cd/E11882_01/server.112/e10729/ch2charset.htm#NLSPG002 .. _section 2: https://docs.oracle.com/cd/E11882_01/server.112/e10729/ch2charset.htm#NLSPG002
.. _section 11: https://docs.oracle.com/cd/E11882_01/server.112/e10729/ch11charsetmig.htm#NLSPG011 .. _section 11: https://docs.oracle.com/cd/E11882_01/server.112/e10729/ch11charsetmig.htm#NLSPG011
......
...@@ -185,7 +185,7 @@ of people with their ages calculated by the database:: ...@@ -185,7 +185,7 @@ of people with their ages calculated by the database::
Jane is 42. Jane is 42.
... ...
__ http://www.postgresql.org/docs/current/static/functions-datetime.html __ https://www.postgresql.org/docs/current/static/functions-datetime.html
Passing parameters into ``raw()`` Passing parameters into ``raw()``
--------------------------------- ---------------------------------
......
...@@ -115,7 +115,7 @@ see :setting:`DATABASES` for details. ...@@ -115,7 +115,7 @@ see :setting:`DATABASES` for details.
If you're using Django's :doc:`testing framework</topics/testing/index>` to test If you're using Django's :doc:`testing framework</topics/testing/index>` to test
database queries, Django will need permission to create a test database. database queries, Django will need permission to create a test database.
.. _PostgreSQL: http://www.postgresql.org/ .. _PostgreSQL: https://www.postgresql.org/
.. _MySQL: https://www.mysql.com/ .. _MySQL: https://www.mysql.com/
.. _psycopg2: http://initd.org/psycopg/ .. _psycopg2: http://initd.org/psycopg/
.. _SQLite: https://www.sqlite.org/ .. _SQLite: https://www.sqlite.org/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment