All Projects → sivers → Pg

sivers / Pg

PostgreSQL experiments

Labels

Projects that are alternatives of or similar to Pg

Globalregion
全球国家/地区下拉级联,包含中英文国际化,国家/省份(直辖市)/城市(区)/县
Stars: ✭ 28 (-53.33%)
Mutual labels:  plpgsql
Pg Emoji
😍🐘 PostgreSQL emoji encode/decode extension
Stars: ✭ 48 (-20%)
Mutual labels:  plpgsql
Pg partman
Partition management extension for PostgreSQL
Stars: ✭ 1,085 (+1708.33%)
Mutual labels:  plpgsql
Backend Interview Prep Questions
A few questions & data to help you prepare for the Slack HQ backend interview
Stars: ✭ 34 (-43.33%)
Mutual labels:  plpgsql
Spring Batch Admin Backend
Spring Batch Admin 是一个后端采用spring boot 2, spring security , oauth2, Spring data jpa 作为基础框架,集成了quartz 提供调度能力,集成了Spring batch 提供批处理能力的管理系统。系统旨在提供更底层数据展示以及常见批处理的配置以及运行能力。
Stars: ✭ 41 (-31.67%)
Mutual labels:  plpgsql
Postgres Full Text Search
Stars: ✭ 50 (-16.67%)
Mutual labels:  plpgsql
Sqlgenerate
Generates SQL when given an AST from the Codeschool/sqlite-parser
Stars: ✭ 14 (-76.67%)
Mutual labels:  plpgsql
Synapse scripts
Tools for maintaining a matrix synapse chat server // SEEKING MAINTAINERS
Stars: ✭ 58 (-3.33%)
Mutual labels:  plpgsql
Graphpostgresql
GraphQL for Postgres
Stars: ✭ 1,020 (+1600%)
Mutual labels:  plpgsql
Ms Sql Server Group Concat Sqlclr
SQL Server CLR user-defined aggregates that collectively offer similar functionality to the MySQL GROUP_CONCAT function. Specialized functions ensure the best performance based on required functionality. Aggregates implemented using C#; requires .NET Framework 3.5.
Stars: ✭ 54 (-10%)
Mutual labels:  plpgsql
Google Analytics Bigquery Data Export
Export Google Analytics data from BigQuery using Standard or Legacy SQL.
Stars: ✭ 34 (-43.33%)
Mutual labels:  plpgsql
Aquameta
Web development platform built entirely in PostgreSQL
Stars: ✭ 987 (+1545%)
Mutual labels:  plpgsql
Postgresql Functions
Custom PostgreSQL functions and extensions
Stars: ✭ 50 (-16.67%)
Mutual labels:  plpgsql
Pgwatch2
PostgreSQL metrics monitor/dashboard
Stars: ✭ 960 (+1500%)
Mutual labels:  plpgsql
Pgformatter
A PostgreSQL SQL syntax beautifier that can work as a console program or as a CGI. On-line demo site at http://sqlformat.darold.net/
Stars: ✭ 1,085 (+1708.33%)
Mutual labels:  plpgsql
Sat Api Pg
A Postgres backed STAC API.
Stars: ✭ 20 (-66.67%)
Mutual labels:  plpgsql
Pgsql Tweaks
Contains PostgreSQL functions which I regularly needed.
Stars: ✭ 48 (-20%)
Mutual labels:  plpgsql
Pg Clone Schema
Postgres clone schema utility without need of going outside of database. Makes developers life easy by running single function to clone schema with all objects. It is very handy on Postgres RDS. Utility is sponsored by http://elephas.io/
Stars: ✭ 59 (-1.67%)
Mutual labels:  plpgsql
Pgulid
Universally Unique Lexicographically Sortable Identifier (ULID) for PostgreSQL
Stars: ✭ 56 (-6.67%)
Mutual labels:  plpgsql
Fias2pgsql
Скрипты для импорта ФИАС в Postgresql
Stars: ✭ 54 (-10%)
Mutual labels:  plpgsql

PostgreSQL experiments

I'm learning and testing PostgreSQL features.

Instead of always tying them into my big d50b database, it seemed better to keep experiments isolated with minimum context or baggage.

Context

Very inspired by Rich Hickey's “Simple Made Easy” talk. Especially these points:

  • Don't braid things together
  • Intertwined things must be considered together
  • Simple doesn't mean programmer ease and familiarity
  • gem/bower install "hairball" is not simplicity
  • Simple might mean making more things, not fewer
  • Simple might mean more learning curve (slower start) for later reward
  • ORM is unnecessary complication. Work with SQL directly.
  • Classes and Models (OOP) are unnecessary complication. Work with values directly (hash/map/table).
  • Especially if JSON API is the eventual interface. It's just data.
  • Information is simple. Don't hide it behind micro-language.

I have had the same database since 1998 (17 years!), but the required code around it has changed from Perl to PHP to Ruby to JavaScript and sometimes back again. How many hundreds of hours have I spent re-writing that necessary logic around the database?

Though the norm in this industry is to treat the database as dumb storage, I have always wanted a smarter, stricter database that would not allow anything but a well-formed email address into the email field, or would not allow a started project to be deleted.

One step further, using PL/pgSQL, now all the “business logic” that classes and ORM models were doing could be done in the database directly! No more depending on that ever-changing PHP, Ruby, JavaScript stuff around it.

One step further, now that PostgreSQL has JSON functions, even the job of a REST API webserver to convert table/row values into JSON documents could be done in the database.

Less intertwining. Less complecting. Less dependencies. Double-down on the database.

PL/pgSQL is not as beautiful as Ruby, but by having all this inside the database, I can easily switch to whatever language/tech around it is best at the time.

Right now OpenResty and Plug both look appealing, but I'm open to whatever. The API webserver doesn't have to do anything but map HTTP methods and URLs to PostgreSQL function calls, then directly pass the database response as an HTTP response.

Goal

As of now, I'm daydreaming of the dumbest possible webserver, and the smartest possible database, to make a great JSON REST API.

Every database call would be the same format:

pg_query("SELECT mime, js FROM some_function_name($1, $2)", [params[:id], params[:json]])

The webserver would just send the MIME type and JSON back as the response, even for errors.

I haven't tried this yet, but that's what these PostgreSQL experiments are leading towards.

For these tests:

createuser -s sivers ; createdb -E UTF8 -O sivers sivers

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].