| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
activerecord/test/cases/schema_dumper_test.rb
|
|
|
|
|
| |
Conflicts:
activerecord/CHANGELOG.md
|
|
|
|
|
|
| |
Exception.result is nil when attempting a query after PostgreSQL
disconnect, resulting in new exception:
NoMethodError: undefined method `error_field' for nil:NilClass
|
|
|
|
| |
prepared_statements as value
|
|
|
|
|
|
| |
Fix #8414. Performance problem with postgresql adapter primary_key function.
Conflicts:
activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
|
|
|
|
| |
Fix a problem of translate_exception method in a Japanese (non English) environment.
|
|
|
|
|
|
|
| |
Postgresql doesn't accepts limits on text columns
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes:
* According to postgreSQL documentation:
(http://www.postgresql.org/docs/8.2/static/catalog-pg-attrdef.html)
we should not be using 'adsrc' field because this field is unaware of
outside changes that could affect the way that default values are
represented. Thus, I changed the queries to use
"pg_get_expr(adbin, adrelid)" instead of the historical "adsrc" field.
* Remove parsing of character type default values for 8.1 formatting since
Rails doesn't support postgreSQL 8.1 anymore.
* Remove misleading comment unrelated to code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PostgreSQL adapter properly parses default values when using multiple
schemas and domains.
When using domains across schemas, PostgresSQL prefixes the type of the
default value with the name of the schema where that type (or domain) is.
For example, this query:
```
SELECT a.attname, d.adsrc
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = "defaults"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum;
```
could return something like "'<default_value>'::pg_catalog.text" or
"(''<default_value>'::pg_catalog.text)::text" for the text columns with
defaults.
I modified the regexp used to parse this value so that it ignores
anything between ':: and \b(?:character varying|bpchar|text), and it
allows to have optional parens like in the above second example.
|
|
|
|
|
|
|
|
|
| |
senny/5920_postgres_adapter_table_with_capital_letters
postgres, quote table names when fetching the primary key (#5920)
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
|
|
|
|
|
|
|
|
| |
* Mark as SCHEMA some schema database queries. #7648
* Don't explain queries except normal CRUD sql. #7657
Closes #6458
Closes #7544
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
6d5f4de4c420ebb906109668f5702a537ac77692
Simulated & actual (manual/skipped) PostgreSQL auto-reconnection tests.
4b1bca04025a66c54e6e9d5eb6e4d4056bfa92f0
Stop being silly with formatting of method aliasing.
c381d5cbf959208adeb38e7859ee815dfbd2cf54
Fix just-plain-wrongness of psql auto-reconnect test.
1e17a9d367c54c680368be72f44247ae28b98904
Fix only-once stub logic.
f16c2043826ec1991cf94fe17cb671507b7a7f51
Changelog for PostgreSQL auto-reconnect test coverage backport.
|
|
|
|
|
|
| |
Remove prepared statement from system query in postgresql adapter
Conflicts:
activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
|
|
|
|
| |
postgresql_adapter.rb while creating distincts.
|
| |
|
|
|
|
| |
Properly discover a connection is closed in postgresql_adapter
|
| |
|
|
|
|
| |
Fix GH #5430. A Payload name for schema_search_path should be SCHEMA.
|
| |
|
| |
|
|
|
|
| |
Restoring ability to derive id/sequence from tables with nonstandard sequences for primary keys
|
| |
|
|
|
|
| |
This reverts commit 1756629835d39f60ef4c96aff81ac503c71b98b7.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
nulogy/fix_postgres_adapter_to_handle_spaces_between_schemas
Fix postgres adapter to handle spaces between schemas
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a first implementation, EXPLAIN is highly
dependent on the database and I have made some
compromises.
On one hand, the method allows you to run the most
common EXPLAIN and that's it. If you want EXPLAIN
ANALYZE in PostgreSQL you need to do it by hand.
On the other hand, I've tried to construct a string
as close as possible to the ones built by the
respective shells. The rationale is that IMO the
user should feel at home with the output and
recognize it at first sight. Per database.
I don't know whether this implementation is going
to work well. Let's see whether people like it.
|
| |
|
| |
|
|
|
|
| |
Postgres: Do not attempt to deallocate a statement if the connection is no longer active.
|
|
|
|
| |
fixes #3335
|
|
|
|
|
| |
To allow the use of prepared statements when changing schemas in
postgres, the schema search path is added to the sql key.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* https://github.com/rails/rails:
Postgresql adapter: added current_schema check for table_exists?
Postgresql adapter: added current_schema check for table_exists?
|
|
|
|
|
|
| |
Database adapters use a statement pool for limiting the number of open
prepared statments on the database. The limit defaults to 1000, but can
be adjusted in your database config by changing 'statement_limit'.
|
|\
| |
| | |
Make #extract_schema_and_table an instance method in Utils
|
| |
| |
| |
| | |
Also, move the utils test into its own test case.
|
| |
| |
| |
| | |
for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now.
|
|/ |
|
|
|
|
|
| |
Move the private method #extract_schema_and_table into a separate
Utils module so that it can be tested without resorting to #send.
|
|
|
|
|
| |
* Only on postgresql, order("first asc, second asc") was invalid
* Closes #1720
|
|\ |
|
| | |
|
| |
| |
| | |
* amongst other things, allows meta_search to run against view-backed models
|
| | |
|
| |
| |
| | |
* add/cleanup tests
|
| |
| |
| | |
* tidy test code and fix my typo
|