Skip to content

Commit

Permalink
Change http postgresql.org links to https [ci skip]
Browse files Browse the repository at this point in the history
It seems that it accepts only HTTPS connections.
Ref: postgres/postgres@7f77cbd
  • Loading branch information
y-yagi committed Jul 30, 2017
1 parent b5db730 commit b52849d
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 32 deletions.
Expand Up @@ -227,7 +227,7 @@ def supports_statement_cache? # :nodoc:
# You should consult the documentation for your database to understand the
# semantics of these different levels:
#
# * http://www.postgresql.org/docs/current/static/transaction-iso.html
# * https://www.postgresql.org/docs/current/static/transaction-iso.html
# * https://dev.mysql.com/doc/refman/5.7/en/set-transaction.html
#
# An ActiveRecord::TransactionIsolationError will be raised if:
Expand Down
Expand Up @@ -224,7 +224,7 @@ def drop_schema(schema_name, options = {})

# Sets the schema search path to a string of comma-separated schema names.
# Names beginning with $ have to be quoted (e.g. $user => '$user').
# See: http://www.postgresql.org/docs/current/static/ddl-schemas.html
# See: https://www.postgresql.org/docs/current/static/ddl-schemas.html
#
# This should be not be called manually but set in database.yml.
def schema_search_path=(schema_csv)
Expand Down
Expand Up @@ -64,11 +64,11 @@ module ConnectionAdapters
# defaults to true.
#
# Any further options are used as connection parameters to libpq. See
# http://www.postgresql.org/docs/current/static/libpq-connect.html for the
# https://www.postgresql.org/docs/current/static/libpq-connect.html for the
# list of parameters.
#
# In addition, default connection parameters of libpq can be set per environment variables.
# See http://www.postgresql.org/docs/current/static/libpq-envars.html .
# See https://www.postgresql.org/docs/current/static/libpq-envars.html .
class PostgreSQLAdapter < AbstractAdapter
ADAPTER_NAME = "PostgreSQL".freeze

Expand Down Expand Up @@ -393,7 +393,7 @@ def default_index_type?(index) # :nodoc:

private

# See http://www.postgresql.org/docs/current/static/errcodes-appendix.html
# See https://www.postgresql.org/docs/current/static/errcodes-appendix.html
VALUE_LIMIT_VIOLATION = "22001"
NUMERIC_VALUE_OUT_OF_RANGE = "22003"
NOT_NULL_VIOLATION = "23502"
Expand Down Expand Up @@ -713,7 +713,7 @@ def configure_connection
end

# SET statements from :variables config hash
# http://www.postgresql.org/docs/current/static/sql-set.html
# https://www.postgresql.org/docs/current/static/sql-set.html
variables = @config[:variables] || {}
variables.map do |k, v|
if v == ":default" || v == :default
Expand Down
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/errors.rb
Expand Up @@ -315,7 +315,7 @@ class TransactionIsolationError < ActiveRecordError
#
# See the following:
#
# * http://www.postgresql.org/docs/current/static/transaction-iso.html
# * https://www.postgresql.org/docs/current/static/transaction-iso.html
# * https://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html#error_er_lock_deadlock
class TransactionRollbackError < StatementInvalid
end
Expand Down
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/locking/pessimistic.rb
Expand Up @@ -54,7 +54,7 @@ module Locking
#
# Database-specific information on row locking:
# MySQL: http://dev.mysql.com/doc/refman/5.7/en/innodb-locking-reads.html
# PostgreSQL: http://www.postgresql.org/docs/current/interactive/sql-select.html#SQL-FOR-UPDATE-SHARE
# PostgreSQL: https://www.postgresql.org/docs/current/interactive/sql-select.html#SQL-FOR-UPDATE-SHARE
module Pessimistic
# Obtain a row lock on this record. Reloads the record to obtain the requested
# lock. Pass an SQL locking clause to append the end of the SELECT statement
Expand Down
44 changes: 22 additions & 22 deletions guides/source/active_record_postgresql.md
Expand Up @@ -29,8 +29,8 @@ that are supported by the PostgreSQL adapter.

### Bytea

* [type definition](http://www.postgresql.org/docs/current/static/datatype-binary.html)
* [functions and operators](http://www.postgresql.org/docs/current/static/functions-binarystring.html)
* [type definition](https://www.postgresql.org/docs/current/static/datatype-binary.html)
* [functions and operators](https://www.postgresql.org/docs/current/static/functions-binarystring.html)

```ruby
# db/migrate/20140207133952_create_documents.rb
Expand All @@ -49,8 +49,8 @@ Document.create payload: data

### Array

* [type definition](http://www.postgresql.org/docs/current/static/arrays.html)
* [functions and operators](http://www.postgresql.org/docs/current/static/functions-array.html)
* [type definition](https://www.postgresql.org/docs/current/static/arrays.html)
* [functions and operators](https://www.postgresql.org/docs/current/static/functions-array.html)

```ruby
# db/migrate/20140207133952_create_books.rb
Expand Down Expand Up @@ -83,8 +83,8 @@ Book.where("array_length(ratings, 1) >= 3")

### Hstore

* [type definition](http://www.postgresql.org/docs/current/static/hstore.html)
* [functions and operators](http://www.postgresql.org/docs/current/static/hstore.html#AEN179902)
* [type definition](https://www.postgresql.org/docs/current/static/hstore.html)
* [functions and operators](https://www.postgresql.org/docs/current/static/hstore.html#AEN179902)

NOTE: You need to enable the `hstore` extension to use hstore.

Expand Down Expand Up @@ -116,8 +116,8 @@ Profile.where("settings->'color' = ?", "yellow")

### JSON and JSONB

* [type definition](http://www.postgresql.org/docs/current/static/datatype-json.html)
* [functions and operators](http://www.postgresql.org/docs/current/static/functions-json.html)
* [type definition](https://www.postgresql.org/docs/current/static/datatype-json.html)
* [functions and operators](https://www.postgresql.org/docs/current/static/functions-json.html)

```ruby
# db/migrate/20131220144913_create_events.rb
Expand Down Expand Up @@ -147,8 +147,8 @@ Event.where("payload->>'kind' = ?", "user_renamed")

### Range Types

* [type definition](http://www.postgresql.org/docs/current/static/rangetypes.html)
* [functions and operators](http://www.postgresql.org/docs/current/static/functions-range.html)
* [type definition](https://www.postgresql.org/docs/current/static/rangetypes.html)
* [functions and operators](https://www.postgresql.org/docs/current/static/functions-range.html)

This type is mapped to Ruby [`Range`](http://www.ruby-doc.org/core-2.2.2/Range.html) objects.

Expand Down Expand Up @@ -182,7 +182,7 @@ event.ends_at # => Thu, 13 Feb 2014

### Composite Types

* [type definition](http://www.postgresql.org/docs/current/static/rowtypes.html)
* [type definition](https://www.postgresql.org/docs/current/static/rowtypes.html)

Currently there is no special support for composite types. They are mapped to
normal text columns:
Expand Down Expand Up @@ -222,7 +222,7 @@ contact.save!

### Enumerated Types

* [type definition](http://www.postgresql.org/docs/current/static/datatype-enum.html)
* [type definition](https://www.postgresql.org/docs/current/static/datatype-enum.html)

Currently there is no special support for enumerated types. They are mapped as
normal text columns:
Expand Down Expand Up @@ -260,7 +260,7 @@ article.status = "published"
article.save!
```

To add a new value before/after existing one you should use [ALTER TYPE](http://www.postgresql.org/docs/current/static/sql-altertype.html):
To add a new value before/after existing one you should use [ALTER TYPE](https://www.postgresql.org/docs/current/static/sql-altertype.html):

```ruby
# db/migrate/20150720144913_add_new_state_to_articles.rb
Expand All @@ -274,7 +274,7 @@ def up
end
```

NOTE: ENUM values can't be dropped currently. You can read why [here](http://www.postgresql.org/message-id/29F36C7C98AB09499B1A209D48EAA615B7653DBC8A@mail2a.alliedtesting.com).
NOTE: ENUM values can't be dropped currently. You can read why [here](https://www.postgresql.org/message-id/29F36C7C98AB09499B1A209D48EAA615B7653DBC8A@mail2a.alliedtesting.com).

Hint: to show all the values of the all enums you have, you should call this query in `bin/rails db` or `psql` console:

Expand All @@ -289,9 +289,9 @@ SELECT n.nspname AS enum_schema,

### UUID

* [type definition](http://www.postgresql.org/docs/current/static/datatype-uuid.html)
* [pgcrypto generator function](http://www.postgresql.org/docs/current/static/pgcrypto.html#AEN182570)
* [uuid-ossp generator functions](http://www.postgresql.org/docs/current/static/uuid-ossp.html)
* [type definition](https://www.postgresql.org/docs/current/static/datatype-uuid.html)
* [pgcrypto generator function](https://www.postgresql.org/docs/current/static/pgcrypto.html#AEN182570)
* [uuid-ossp generator functions](https://www.postgresql.org/docs/current/static/uuid-ossp.html)

NOTE: You need to enable the `pgcrypto` (only PostgreSQL >= 9.4) or `uuid-ossp`
extension to use uuid.
Expand Down Expand Up @@ -340,8 +340,8 @@ See [this section](#uuid-primary-keys) for more details on using UUIDs as primar

### Bit String Types

* [type definition](http://www.postgresql.org/docs/current/static/datatype-bit.html)
* [functions and operators](http://www.postgresql.org/docs/current/static/functions-bitstring.html)
* [type definition](https://www.postgresql.org/docs/current/static/datatype-bit.html)
* [functions and operators](https://www.postgresql.org/docs/current/static/functions-bitstring.html)

```ruby
# db/migrate/20131220144913_create_users.rb
Expand All @@ -364,7 +364,7 @@ user.save!

### Network Address Types

* [type definition](http://www.postgresql.org/docs/current/static/datatype-net-types.html)
* [type definition](https://www.postgresql.org/docs/current/static/datatype-net-types.html)

The types `inet` and `cidr` are mapped to Ruby
[`IPAddr`](http://www.ruby-doc.org/stdlib-2.2.2/libdoc/ipaddr/rdoc/IPAddr.html)
Expand Down Expand Up @@ -399,7 +399,7 @@ macbook.address

### Geometric Types

* [type definition](http://www.postgresql.org/docs/current/static/datatype-geometric.html)
* [type definition](https://www.postgresql.org/docs/current/static/datatype-geometric.html)

All geometric types, with the exception of `points` are mapped to normal text.
A point is casted to an array containing `x` and `y` coordinates.
Expand Down Expand Up @@ -457,7 +457,7 @@ Document.where("to_tsvector('english', title || ' ' || body) @@ to_tsquery(?)",
Database Views
--------------

* [view creation](http://www.postgresql.org/docs/current/static/sql-createview.html)
* [view creation](https://www.postgresql.org/docs/current/static/sql-createview.html)

Imagine you need to work with a legacy database containing the following table:

Expand Down
2 changes: 1 addition & 1 deletion guides/source/active_record_querying.md
Expand Up @@ -2045,4 +2045,4 @@ following pointers may be helpful:

* MariaDB: [EXPLAIN](https://mariadb.com/kb/en/mariadb/explain/)

* PostgreSQL: [Using EXPLAIN](http://www.postgresql.org/docs/current/static/using-explain.html)
* PostgreSQL: [Using EXPLAIN](https://www.postgresql.org/docs/current/static/using-explain.html)
2 changes: 1 addition & 1 deletion guides/source/active_record_validations.md
Expand Up @@ -638,7 +638,7 @@ class Holiday < ApplicationRecord
message: "should happen once per year" }
end
```
Should you wish to create a database constraint to prevent possible violations of a uniqueness validation using the `:scope` option, you must create a unique index on both columns in your database. See [the MySQL manual](http://dev.mysql.com/doc/refman/5.7/en/multiple-column-indexes.html) for more details about multiple column indexes or [the PostgreSQL manual](http://www.postgresql.org/docs/current/static/ddl-constraints.html) for examples of unique constraints that refer to a group of columns.
Should you wish to create a database constraint to prevent possible violations of a uniqueness validation using the `:scope` option, you must create a unique index on both columns in your database. See [the MySQL manual](http://dev.mysql.com/doc/refman/5.7/en/multiple-column-indexes.html) for more details about multiple column indexes or [the PostgreSQL manual](https://www.postgresql.org/docs/current/static/ddl-constraints.html) for examples of unique constraints that refer to a group of columns.

There is also a `:case_sensitive` option that you can use to define whether the
uniqueness constraint will be case sensitive or not. This option defaults to
Expand Down

0 comments on commit b52849d

Please sign in to comment.