TigerData logo
TigerData logo
  • Product

    Product

    Tiger Cloud

    Robust elastic cloud platform for startups and enterprises

    TimescaleDB Enterprise

    Self-managed TimescaleDB for on-prem, edge and private cloud

    Open source

    TimescaleDB

    Time-series, real-time analytics and events on Postgres

    Search

    Vector and keyword search on Postgres

  • Industry

    Data Centers

    Energy & Utilities

    Oil & Gas Operations

    Smart Manufacturing

    Crypto

  • Docs
  • Pricing
  • Developer Hub

    Changelog

    Benchmarks

    Blog

    Community

    Customer Stories

    Events

    Support

    Integrations

    Launch Hub

  • Company

    About

    TigerData logo

    Timescale

    Partners

    Security

    Careers

Contact usStart a free trial
Tiger Data

Products

  • TimescaleDB
  • Tiger Cloud
  • TimescaleDB Enterprise
  • Postgres Search Stack

Industry

  • Data Centers
  • Energy & Utilities
  • Oil & Gas Operations
  • Smart Manufacturing
  • Crypto

Support

  • Cloud Status
  • Support
  • Security
  • Terms of Service
  • Code Of Conduct

Learn

  • Documentation
  • Blog
  • Tutorials
  • Changelog
  • Success Stories

Company

  • About
  • Contact Us
  • Careers
  • Newsroom
  • Brand
  • Events

Products

  • TimescaleDB
  • Tiger Cloud
  • TimescaleDB Enterprise
  • Postgres Search Stack

Industry

  • Data Centers
  • Energy & Utilities
  • Oil & Gas Operations
  • Smart Manufacturing
  • Crypto

Support

  • Cloud Status
  • Support
  • Security
  • Terms of Service
  • Code Of Conduct

Learn

  • Documentation
  • Blog
  • Tutorials
  • Changelog
  • Success Stories

Company

  • About
  • Contact Us
  • Careers
  • Newsroom
  • Brand
  • Events
Privacy preferencesLegalPrivacySitemap

Subscribe to the Tiger Data newsletter

Gold Partner with Inductive Automation — Ignition

2026 (c) Timescale, Inc., d/b/a Tiger Data.
All rights reserved.

Tiger Data
GOLD PARTNER WITHINDUCTIVE AUTOMATION

2026 (c) Timescale, Inc., d/b/a Tiger Data.
All rights reserved.

Privacy preferencesLegalPrivacySitemap

Connecting PHP and PostgreSQL: Timescale Integrations Expand

J

By Jônatas Davi Paganini

April 9th, 2025

5 min

Share

J

By Jônatas Davi Paganini

April 9th, 2025

5 min

Share

Copy as HTML

Open in ChatGPT

Open in Claude

Open in v0

Announcements & Releases

PostgreSQL, Blog

Table of contents

  1. 01 How to Connect PHP and PostgreSQL
  2. 02 PostgreSQL Integrations: Ruby, TypeScript, and More
  3. 03 Why Language-Specific Integrations Matter
  4. 04 Join Us: We're Supporting Community Integrations
  5. 05 Our Roadmap: What's Next
  6. 06 Get Involved
Get started for free
The PostgreSQL and PHP logos side by side over a black background.

Today, we're excited to announce that we're expanding our ecosystem support to allow you to connect PostgreSQL and PHP, among other programming languages, when using TimescaleDB and building Laravel applications. While PostgreSQL has always been language-agnostic, we recognize that each developer community has unique needs, patterns, and expectations regarding database integration.

Better database integration streamlines data access, enhances performance, and improves scalability, so our mission is simple: meet developers where they are and make TimescaleDB a natural extension of their existing PostgreSQL workflow—regardless of their programming language of choice. 

PHP is a versatile, easy-to-learn server-side language with built-in web development features, a vast ecosystem, strong database integration, and excellent community support, making it ideal for dynamic web applications. By integrating it with PostgreSQL and TimescaleDB, we will enable developers to build efficient, reliable, and data-driven applications with ease.

How to Connect PHP and PostgreSQL

SQL is cool, but at the end of the day, developers prefer to write their favorite programming language. Tobias Petry, who is highly involved in the Laravel ecosystem, leads our PHP and PostgreSQL integration.

Let’s have a look at the simple setup for the PHP integration. Select the code in the different tabs to see other examples in Ruby and TypeScript.

  • PHP
  • Ruby
  • TypeScript
return new class extends Migration { public function up(): void { Schema::createExtensionIfNotExists('timescaledb'); Schema::create('visits', function (Blueprint $table) { $table->identity(); $table->bigInteger('website_id'); $table->text('url'); $table->float('duration'); $table->timestampTz('created_at'); $table->primary(['id', 'created_at']); $table->index(['website_id', 'created_at']); $table->timescale( new CreateHypertable('created_at', '1 day'), new CreateReorderPolicyByIndex('website_id', 'created_at'), new EnableCompression(segmentBy: 'website_id'), new CreateCompressionPolicy('3 days'), new CreateRetentionPolicy('1 year'), new EnableChunkSkipping('id'), ); }); Schema::continuousAggregate('visits_agg', function(CaggBlueprint $table) { $table->as(" SELECT time_bucket('1 hour', created_at) AS bucket, website_id, url, SUM(duration) AS duration FROM visits GROUP BY bucket, website_id, url "); $table->realtime(); $table->index(['website_id','url']); $table->timescale( new CreateRefreshPolicy('5 minutes', '1 days', '2 hours'), new EnableCompression(), new CreateCompressionPolicy('2 days'), ); }); } };
hypertable_options = { time_column: 'created_at', # partition data by this column chunk_time_interval: '1 day', # create a new table for each day compress_segmentby: 'identifier', # columnar compression key compress_after: '7 days', # start compression after 7 days compress_orderby: 'created_at DESC', # compression order drop_after: '6 months' # delete data after 6 months } create_table(:events, id: false, hypertable: hypertable_options) do |t| t.timestamptz :created_at, null: false t.string :identifier, null: false t.jsonb :payload end
import { Entity, PrimaryColumn } from 'typeorm'; import { Hypertable, TimeColumn } from '@timescaledb/typeorm'; @Entity('page_loads') @Hypertable({ compression: { // Optional compression compress: true, compress_orderby: 'time', compress_segmentby: 'user_agent', policy: { schedule_interval: '7 days', }, }, }) export class PageLoad { @PrimaryColumn({ name: 'user_agent', type: 'varchar' }) userAgent!: string; @TimeColumn() time!: Date; }

If you like this, consider giving the project a GitHub star! ⭐️ You’ll also find more integration tips and information.

In addition to the PHP/PostgreSQL integration, Tobias is producing a new course, “Making Analytics FAST—Learn Timescale.” Stay tuned!

image

PostgreSQL Integrations: Ruby, TypeScript, and More

However, this is not the only integration we’ve built. We've begun this journey with Ruby, creating a deeply integrated experience that feels natural to Ruby and Rails developers, including:

  • Native ActiveRecord extensions for TimescaleDB features
  • Simplified configuration and migration tooling
  • Performance optimization patterns tailored to Ruby applications
  • Comprehensive documentation with Ruby-specific examples

Building on this foundation, we've already expanded to TypeScript. This isn't just about specific languages—it's about creating a blueprint for how TimescaleDB can integrate seamlessly with any language ecosystem, whether through our official packages or community-led initiatives.

Why Language-Specific Integrations Matter

While TimescaleDB works with any language that connects to PostgreSQL, we believe in going beyond basic compatibility. Language-specific integrations deliver a number of benefits:

  • Idiomatic implementations that follow community best practices
  • Simplified developer experience with familiar patterns and tooling
  • Performance optimizations tailored to language-specific ORMs and drivers
  • Documentation that speaks your language, with relevant examples and use cases

Our goal isn't just to be compatible with your stack—it's to become an essential, natural extension of it.

Want to create your own integration? Read the integration guide.

Join Us: We're Supporting Community Integrations

Here's where you come in. We're actively seeking developers who want to build and maintain TimescaleDB integrations for their language communities. Whether you're passionate about Python, Go, Rust, PHP, JavaScript, Java, .NET, or any other ecosystem, we want to support your efforts.

Here's what we're offering to community integration maintainers:

  • Technical support from our DevRel team
  • Co-marketing opportunities to showcase your integration
  • Documentation collaboration to ensure comprehensive coverage
  • Conference and meetup sponsorship for community education
  • Early access to new features to keep integrations current

If you’re interested, book a Technical Office Hours call with me (Jônatas, developer advocate at Timescale), and let’s start!

Our Roadmap: What's Next

We're approaching this ecosystem expansion methodically. Throughout this process, you can expect to see us document our approach, share best practices, and create reusable patterns that make TimescaleDB integration consistent across languages while remaining idiomatic to each.

Community engagement and support

We're committed to building a strong community around TimescaleDB and fostering broader ecosystem development. Here's how we plan to engage and support developers throughout our expansion:

  • Open collaboration and contribution: We welcome developers to actively participate in shaping the future of TimescaleDB integrations. Share your ideas, expertise, and code contributions to help build a robust ecosystem that benefits everyone.
  • Community events and workshops: We'll host and participate in events and workshops to connect with developers, share insights, and provide hands-on support for TimescaleDB integration.
  • Project sponsorship and grants: We're excited to sponsor open-source projects and initiatives that align with our mission of making time-series data accessible and easy to work with.
  • Developer support and Office Hours: Our team is dedicated to providing timely and helpful support to developers integrating TimescaleDB into their projects. Reach out to us anytime, and we'll do our best to assist you.

Through these initiatives, we aim to create an inclusive community where developers can learn, collaborate, and build amazing applications with TimescaleDB.

Get Involved

At Timescale, we believe real-time analytics is part of any data-driven business, which translates into time-series data everywhere. Developers in every language community deserve first-class tools to work with this demanding workload. By expanding our ecosystem support and embracing community-led integrations, we're creating a more inclusive and powerful platform for all developers.

Join us in this mission! Here’s how you can get involved:

  1. Join our community and connect with the Ecosystem team.
  2. Book a session with our technical team.
  3. Check out our integration development guidelines.

Are you building an integration for TimescaleDB in your preferred language? We'd love to hear about it! Share your project or reach out to our Ecosystem team directly.

// Related posts

TimescaleDB 2.27: Broader Vectorized Execution, Up to 160x More Efficient UPDATE/DELETE, and Smarter UPSERT Pruning
TimescaleDB 2.27: Broader Vectorized Execution, Up to 160x More Efficient UPDATE/DELETE, and Smarter UPSERT Pruning

Announcements & Releases

TimescaleDB

TimescaleDB 2.27: Broader Vectorized Execution, Up to 160x More Efficient UPDATE/DELETE, and Smarter UPSERT Pruning

Up to 160x more efficient UPDATE/DELETE, 30% to 2x faster vectorized execution, and skip unnecessary decompression + compression. Here's what's new in TimescaleDB 2.27.

By Brandon Purcell

June 9th, 2026

TimescaleDB 2.26: 3.5x Faster time_bucket() Aggregations, 70x Faster Summary Queries, and Faster Multi-Column Lookups
TimescaleDB 2.26: 3.5x Faster time_bucket() Aggregations, 70x Faster Summary Queries, and Faster Multi-Column Lookups

Announcements & Releases

TimescaleDB

TimescaleDB 2.26: 3.5x Faster time_bucket() Aggregations, 70x Faster Summary Queries, and Faster Multi-Column Lookups

TimescaleDB 2.26 delivers 3.5x faster time_bucket() aggregations, 70x faster summary queries, and 2x faster multi-column lookups. No query rewrites needed.

By Brandon Purcell

April 22nd, 2026

pg_textsearch 1.0: How We Built a BM25 Search Engine on Postgres Pages
pg_textsearch 1.0: How We Built a BM25 Search Engine on Postgres Pages

Announcements & Releases

pg_textsearch

pg_textsearch 1.0: How We Built a BM25 Search Engine on Postgres Pages

pg_textsearch 1.0 brings native BM25 search to Postgres. No Elasticsearch sidecar needed. Learn how it works and see benchmarks vs. ParadeDB at 138M documents.

By Todd J. Green

March 31st, 2026

Stay updated with new
posts and releases.

Receive the latest technical articles and release notes in your inbox.