#Postgresql
16 notas · última:
Life Altering PostgreSQL Patterns
The post collects PostgreSQL patterns that reduce operational pain: UUID keys, timestamps, restrictive foreign keys, schemas, enum tables, soft deletes, status logs, special rows, careful use of views, and JSON queries.
Why and How Marten is a Great Document Database
The post shows how Marten stores and loads C# objects as JSON in PostgreSQL, creates missing database objects on demand, and fits the .NET host model while keeping ACID transactions and rich document features.
Test Driven Development With Node, Postgres, and Knex (Red/Green/Refactor)
The post walks through building a REST API with Node, Express, Knex, and PostgreSQL using TDD, from setup and migrations to tests and routes for CRUD operations.
When to Use Constraints in Ecto
The post explains when Ecto validations are enough and when database constraints are needed, showing that constraints give stronger guarantees for uniqueness, ordering, and overlap, but can reduce flexibility and user experience.
Instalando o PostgreSQL 9.3 no Ubuntu 14.04 LTS
O post mostra como instalar o PostgreSQL no Ubuntu 14.04 LTS com apt-get, alterar a senha do usuário postgres, liberar acesso remoto e criar usuários e databases.
Fragments in Ecto
The post shows how to query date ranges in Ecto by using `fragment/1` with Postgres `OVERLAPS`, plus `type/2` to tell Ecto the date types it cannot infer.
Folding Window Functions Into Ecto
The post shows how to rank trips by category with PostgreSQL window functions, then reproduce the query in Ecto 2.0 using raw SQL and tests, comparing it with a naive in-memory approach.
Spectacles
Spectacles adds database view support to ActiveRecord, with migrations, an abstract view class, and support for several database drivers. It also offers PostgreSQL materialized views with refresh and creation options.
Creating a Todo Application using the Phoenix Framework and Ember.js
The tutorial shows how to build a todo app with Phoenix and Elixir on the server, PostgreSQL for storage, and Ember on the client, then connect both apps through REST, CORS, and JSON key changes.
Why Auto Increment Is A Terrible Idea
The post argues that serial integers expose growth, make enumeration easy, and can clash across tables, while UUIDv4 offers stable, non-predictable primary keys with practical PostgreSQL support.
Avoid Rails When Generating JSON responses with PostgreSQL
The article argues that moving JSON generation into PostgreSQL removes expensive Ruby object creation and Rails serialization work, cutting response times and memory use for API payloads.
Why I can't install postgresql with rails 4.0.0.rc1 (ruby 2.0)
Describes a Bundler platform detection problem on Windows 7 x64 with Ruby 2.0, Rails 4.0.0, and pg 0.15.1. The temporary fix is to edit Gemfile.lock and add the x64 mingw32 pg variant.
Criando aplicativos Rails multi-tenant com PostgreSQL schemas
O texto explica como usar schemas do PostgreSQL para separar dados por tenant em Rails, definindo search_path por subdomínio, criando schemas novos e ajustando migrações e tabelas compartilhadas.
Install PostgreSQL 9 on CentOS
The post walks through installing PostgreSQL 9.1 on CentOS with the PostgreSQL yum repository, then configuring startup, access, remote connections, Webmin, and optional PostGIS.
Installing PostgreSQL 9.1 on Ubuntu 11.04
The page lists the commands to add the PostgreSQL PPA on Ubuntu 11.04, install PostgreSQL 9.1 and libpq-dev, set the postgres user password, and install pgAdmin3.
CentOS: how to install postgresql 9.1
The page lists the commands to add the pgdg CentOS 9.1 repository, exclude the default PostgreSQL packages in yum, install postgresql91-server, initialize the database, start the service, and enable it at boot.
