並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 35 件 / 35件

新着順 人気順

postgresql create table if not exists exampleの検索結果1 - 35 件 / 35件

  • REST API Design Best Practices Handbook – How to Build a REST API with JavaScript, Node.js, and Express.js

    By Jean-Marc Möckel I've created and consumed many API's over the past few years. During that time, I've come across good and bad practices and have experienced nasty situations when consuming and building API's. But there also have been great moments. There are helpful articles online which present many best practices, but many of them lack some practicality in my opinion. Knowing the theory with

      REST API Design Best Practices Handbook – How to Build a REST API with JavaScript, Node.js, and Express.js
    • Postgresqlのltreeを活用した階層構造の便利な利用法 - RAKUS Developers Blog | ラクス エンジニアブログ

      はじめに ltreeとは ltree型 ltreeの操作 活用法 1. 承認フローの構築 事前準備 テーブル作成 データ追加 2. テーブルに細かくアクセス制御をかける 事前準備 ltreeの有効化 テーブル作成 ポリシー作成 行セキュリティポリシーの有効化 ポリシーの設定 データを追加 ユーザー作成 試す まとめ はじめに こんにちは! エンジニア2年目のTKDSです! 今回はltreeについて調べ、その活用法を考えてみました。 ltreeについて、ltreeの活用法の2段構成です。 ltreeとは 階層ツリー構造を模した構造を格納する機能を提供する拡張機能です。 詳しくはドキュメントをみてください。 ltree型 階層ツリー構造を表す型です。 例)`Company.Department.Team1 ドット区切りで大文字小文字は区別しないようです。 各データはラベルと呼びます(上記でのC

        Postgresqlのltreeを活用した階層構造の便利な利用法 - RAKUS Developers Blog | ラクス エンジニアブログ
      • GoでgRPCのAPIテスト環境を構築する - enechain Tech Blog

        はじめに JCEXで実践しているAPIテストについて 単体テスト 負荷テスト なぜAPIの単体テストを行っているのか API単体テストで使用するパッケージ 実例によるAPI単体テストの環境構築 前提 ステップ1: テストしたいAPIの定義 ステップ2: テストの作成 ステップ3: APIの実装 ステップ4: DBを使ったテスト ステップ5: ヘルパー関数化 ステップ6: テーブル駆動テストに変える ステップ7: フィクスチャを使ったテスト まとめ おわりに はじめに こんにちは、enechainのGXデスクでエンジニアをしている@ejiです。 GXデスクは、『日本気候取引所 - Japan Climate Exchange』 (以下 JCEX) のサービス開発を担当しており、 私は主にBFFとバックエンドのAPIをGoで開発しています。バックエンドのAPIは gRPC を使用しています。

          GoでgRPCのAPIテスト環境を構築する - enechain Tech Blog
        • トリガーを用いたPostgreSQLのデータ変更検知方法 - RAKUS Developers Blog | ラクス エンジニアブログ

          はじめに 事前準備 トリガーを使用する方法 補足:トリガーと関数のみ消す方法 まとめ はじめに こんにちは! エンジニア2年目のTKDSです! PostgreSQLでのテーブル変更検知方法について調べました。 今回はトリガーを使用する方法について説明します。 事前準備 DBの準備(compose.yaml) services: db: image: postgres:16.4-bullseye container_name: db environment: POSTGRES_USER: postgres POSTGRES_DB: postgres POSTGRES_PASSWORD: postgres ports: - "127.0.0.1:5432:5432" volumes: - db_data:/var/lib/postgresql/data - ./init.sql:/docker

            トリガーを用いたPostgreSQLのデータ変更検知方法 - RAKUS Developers Blog | ラクス エンジニアブログ
          • dbt (data build tool) を使ってデータをテストする - CUBE SUGAR CONTAINER

            ソフトウェアエンジニアリングの世界では、自動化されたテストを使ってコードの振る舞いを検証するのが当たり前になっている。 同じように、データエンジニアリングの世界でも、自動化されたテストを使ってデータの振る舞いを検証するのが望ましい。 データをテストするのに使える OSS のフレームワークも、いくつか存在する。 今回は、その中でも dbt (data build tool) を使ってデータをテストする方法について見ていく。 dbt 自体はデータのテストを主目的としたツールではないものの、テストに関する機能も備えている。 また、dbt には WebUI を備えたマネージドサービスとしての dbt Cloud と、CLI で操作するスタンドアロン版の dbt Core がある。 今回扱うのは後者の dbt Core になる。 使った環境は次のとおり。 $ sw_vers ProductName:

              dbt (data build tool) を使ってデータをテストする - CUBE SUGAR CONTAINER
            • Changing std::sort at Google’s Scale and Beyond

              TL;DR; We are changing std::sort in LLVM’s libcxx. That’s a long story of what it took us to get there and all possible consequences, bugs you might encounter with examples from open source. We provide some benchmarks, perspective, why we did this in the first place and what it cost us with exciting ideas from Hyrum’s Law to reinforcement learning. All changes went into open source and thus I can

                Changing std::sort at Google’s Scale and Beyond
              • 【PGlite】WebAssemblyでPostgreSQLを軽量に - RAKUS Developers Blog | ラクス エンジニアブログ

                はじめに PGliteの概要 PGliteの特徴 PGliteを試す ブラウザで使う PGliteの速度計測 まとめ はじめに こんにちは!エンジニア2年目のTKDSです! 今回はPGliteについて調べてみました! 概要・使い方・速度実験・まとめの内容で記事は構成されています。 使ってみた結果として、軽量高速であり色々使いみちがありそうなツールだと感じました。 ぜひ最後まで読んでいただけると幸いです。 PGliteの概要 PGliteは、PostgreSQLをWebAssembly(WASM)にコンパイルした軽量なデータベースエンジンです。 これにより、ブラウザ、Node.js、Bun、DenoなどでPostgreSQLの機能を利用でき、開発者はローカルやサーバーレス環境でデータベース操作を行うことが可能です。 PGliteは、インメモリデータベースやファイルシステム(Node.jsやB

                  【PGlite】WebAssemblyでPostgreSQLを軽量に - RAKUS Developers Blog | ラクス エンジニアブログ
                • Introduction to Postgres Indexes – Frontend Masters Blog

                  This Part 1 (of a 2-part series) is a practical, hands-on, applicable approach to database indexes. We’ll cover what B Trees are with a focus on deeply understanding, and internalizing how they store data on disk, and how your database uses them to speed up queries. This will set us up nicely for part 2, where we’ll explore some interesting, counterintuitive ways to press indexes into service to a

                    Introduction to Postgres Indexes – Frontend Masters Blog
                  • OpenAI: Scaling PostgreSQL to the Next Level | PixelsTech

                    At the PGConf.dev 2025 Global Developer Conference, Bohan Zhang from OpenAI shared OpenAI’s best practices with PostgreSQL, offering a glimpse into the database usage of one of the most prominent unicorn company. At OpenAI, we utilize an unsharded architecture with one writer and multiple readers, demonstrating that PostgreSQL can scale gracefully under massive read loads. — PGConf.dev 2025, Bohan

                    • しくじり先生のように学ぶ「NFS+sqliteで苦労した話から学ぶ、問題解決の考え方」という勉強会をやってみました | Raccoon Tech Blog [株式会社ラクーンホールディングス 技術戦略部ブログ]

                      株式会社ラクーンホールディングスのエンジニア/デザイナーから技術情報をはじめ、世の中のためになることや社内のことなどを発信してます。 インフラLinux勉強会SQLiteNFS こんにちは、羽山です。 今回は社内で実施した勉強会をほぼそのままブログ記事にしています。 ITエンジニアたるものドキュメントを残したり勉強会を実施したり分かりやすい設計にリファクタリングしたりなど、日々 知見の伝達 を意識していると思います。主要な知見はたいていそれらの方法で満たせるのですが、しかし残念ながら中には画一的な方法では伝えにくいものもあったりします。 ところで伝統芸能や工芸の世界では技術の継承において 背中を見て学ぶ という方法が用いられることがあるようです。 これと似た手法はITエンジニアの世界にもあって、先輩エンジニアとペアプログラミングをすることで文書では伝わりにくい技術や考え方・テクニックを学ぶ

                        しくじり先生のように学ぶ「NFS+sqliteで苦労した話から学ぶ、問題解決の考え方」という勉強会をやってみました | Raccoon Tech Blog [株式会社ラクーンホールディングス 技術戦略部ブログ]
                      • Parsing SQL - Strumenta

                        The code for this tutorial is on GitHub: parsing-sql SQL is a language to handle data in a relational database. If you worked with data you have probably worked with SQL. In this article we will talk about parsing SQL. It is in the same league of HTML: maybe you never learned it formally but you kind of know how to use it. That is great because if you know SQL, you know how to handle data. However

                          Parsing SQL - Strumenta
                        • 第700回 セルフホスト可能なチャット・タスク管理サービスMattermost | gihyo.jp

                          Mattermostと言えば、Slackと双璧をなすFLOSSでセルフホスト可能なチャットサービスです。もともとはチャット機能がメインではあったのですが、昨年リリースされた6.0からは定型ワークフローを管理する「Playbook」と、かんばんライクなタスク管理ツールである「Boards」が統合され、「⁠オンラインコラボレーションツール」とも言えるほど機能が充実しています。今回は改めて、Mattermostのインストールから紹介しましょう。 祝「第700回」! 2008年1月から開始した本連載も、今回で第700回を迎えることになりました。これもひとえに常日頃から本連載をご贔屓にしていただいている読者の皆様のおかげです。ありがとうございます[1]⁠。 思えば連載開始から14年。いろいろなことがありました。100年に一度の大噴火が発生したり、国内では戦後最大級の大噴火が発生したり、100年に一度

                            第700回 セルフホスト可能なチャット・タスク管理サービスMattermost | gihyo.jp
                          • Clickhouse as an alternative to ElasticSearch and MySQL, for log storage and analysis, in 2021

                            In 2018, I've written an article about Clickhouse, this piece of content is still pretty popular across the internet, and even was translated a few times. More than two years have passed since, and the pace of Clickhouse development is not slowing down: 800 merged PRs just during last month! This didn't blow your mind? Check out the full changelog, for example for 2020: https://clickhouse.tech/doc

                              Clickhouse as an alternative to ElasticSearch and MySQL, for log storage and analysis, in 2021
                            • How We Sped Up Serverless Cold Starts with Prisma by 9x

                              Cold starts are a huge roadblock for a fast user experience with serverless applications — but also inherently unavoidable. Let's explore what contributes to cold starts and how we made every serverless app built using Prisma ORM even faster. Table of contents Enabling developers to reap the benefits of Serverless & Edge The dreaded cold start 🥶 They are inherently unavoidable They have a real-wo

                                How We Sped Up Serverless Cold Starts with Prisma by 9x
                              • PostgreSQL BM25 Full-Text Search: Speed Up Performance with These Tips

                                You might have come across discussions or blog posts suggesting that PostgreSQL's built-in full-text search (FTS) struggles with performance compared to dedicated search engines or specialized extensions. A notable recent example comes from Neon's blog post, "Performance Benchmark: pg_search on Neon" (link). In their benchmark, Neon compared query performance on their database platform with their

                                  PostgreSQL BM25 Full-Text Search: Speed Up Performance with These Tips
                                • Spring Boot and Cloud Native Buildpacks Hands-on Lab

                                  以下のソフトウェアをインストールしてください。 Java 11 docker pack curl jq この資料は次のバージョンで動作確認しています。 $ java -version openjdk version "11.0.10" 2021-01-19 LTS OpenJDK Runtime Environment (build 11.0.10+9-LTS) OpenJDK 64-Bit Server VM (build 11.0.10+9-LTS, mixed mode) $ docker version Client: Docker Engine - Community Cloud integration: 1.0.9 Version: 20.10.5 API version: 1.41 Go version: go1.13.15 Git commit: 55c4c88 Built

                                  • Lesser Known PostgreSQL Features

                                    In 2006 Microsoft conducted a customer survey to find what new features users want in new versions of Microsoft Office. To their surprise, more than 90% of what users asked for already existed, they just didn't know about it. To address the "discoverability" issue, they came up with the "Ribbon UI" that we know from Microsoft Office products today. Office is not unique in this sense. Most of us ar

                                      Lesser Known PostgreSQL Features
                                    • NextAuth.js for client-side authentication in Next.js | LogRocket Blog

                                      Editor’s note: This article was last updated by Chinwike Maduabuchi on 14 June 2024 according to changes in the Auth.js v5 release and to include information about authenticating with magic links. Authentication is an important and sensitive feature in applications where a user’s credentials, such as username, email, and password, are used to verify their identity. In this article, we’ll set up a

                                        NextAuth.js for client-side authentication in Next.js | LogRocket Blog
                                      • 週刊Railsウォッチ(20201201前編)switch_pointがActive Record 6.0でサポート終了、Rails DBトランザクションの落とし穴ほか|TechRacho by BPS株式会社

                                        2020.12.01 週刊Railsウォッチ(20201201前編)switch_pointがActive Record 6.0でサポート終了、Rails DBトランザクションの落とし穴ほか こんにちは、hachi8833です。本日よりTechRachoアドベントカレンダー2020が始まりました。どうぞよろしくお願いします。 各記事冒頭には⚓でパーマリンクを置いてあります: 社内やTwitterでの議論などにどうぞ 「つっつきボイス」はRailsウォッチ公開前ドラフトを(鍋のように)社内有志でつっついたときの会話の再構成です👄 お気づきの点がありましたら@hachi8833までメンションをいただければ確認・対応いたします🙇 ⚓ Rails: 先週の改修(Rails公式ニュースより) 今週は公式更新情報から見繕いました。 元記事: Bugfixes, improvements and m

                                          週刊Railsウォッチ(20201201前編)switch_pointがActive Record 6.0でサポート終了、Rails DBトランザクションの落とし穴ほか|TechRacho by BPS株式会社
                                        • Database Fundamentals

                                          About a year ago, I tried thinking which database I should choose for my next project, and came to the realization that I don't really know the differences of databases enough. I went to different database websites and saw mostly marketing and words I don't understand. This is when I decided to read the excellent books Database Internals by Alex Petrov and Designing Data-Intensive Applications by

                                            Database Fundamentals
                                          • https://cheats.rs/rust_cheat_sheet.pdf

                                            Rust Language Cheat Sheet 26. August 2021 Contains clickable links to The Book , Rust by Example , Std Docs , Nomicon , Reference . Data Structures Data types and memory locations defined via keywords. Example Explanation struct S {} Define a struct with named fields. struct S { x: T } Define struct with named field x of type T. struct S ​(T); Define "tupled" struct with numbered field .0 of type

                                            • Deploying a Ruby on Rails 6 application on Google App Engine Standard with Travis CI

                                              Deploying a Ruby on Rails 6 application on Google App Engine Standard with Travis CI This guide will walk you through how to deploy a Ruby on Rails 6 application with a PostgreSQL database on Google App Engine standard environment using a Travis CI pipeline. Table of contentsApp Engine standard vs. flexible environmentPrerequisitesSetting up Travis CIConfiguring Travis CISpecifying Ruby and Node.j

                                                Deploying a Ruby on Rails 6 application on Google App Engine Standard with Travis CI
                                              • Rails8.1のマイナーフィーチャーで気になったもの

                                                rails8_1_new_features.md これはなに 2025/10/22にRails8.1がリリースされましたね Ruby on Rails 8.1 Release Notes — Ruby on Rails Guidesにリリースノートが書かれている 上記メジャーフィーチャーに含まれなかったマイナーフィーチャーのうち、気になったものをざっくりまとめています 間違いの指摘や、これも追加してくれ〜という物があればコメントお願いします railties ヘルスチェック用のパスに来たリクエストをログに残さない、の拡張 allow path regexp in SilenceRequest middleware by rainerborene · Pull Request #53561 · rails/rails · GitHub Silence healthcheck requests

                                                  Rails8.1のマイナーフィーチャーで気になったもの
                                                • Streaming Patterns with DuckDB

                                                  TL;DR: DuckDB used for streaming analytics? This post will show you some patterns in which you can use DuckDB to refresh your data at near real-time speed. The words “DuckDB” and “streaming” don't usually make it into the same sentence. Maybe this is because DuckDB has been positioned as an all powerful (but very lightweight) OLAP database. Or maybe this is because the ecosystem of streaming analy

                                                    Streaming Patterns with DuckDB
                                                  • Handling Concurrency Without Locks

                                                    Concurrency is not very intuitive. You need to train your brain to consider what happens when multiple processes execute a certain code block at the same time. There are several issues I often encounter: Failing to recognize potential concurrency issues: It's not uncommon for both beginner and seasoned developers to completely miss a potential concurrency problem. When this happens, and the concur

                                                    • Ubuntu 24.04 LTS (Noble Numbat) Release Notes

                                                      Noble Numbat Release Notes Table of Contents Introduction New features in 24.04 LTS Known Issues Official flavours More information Introduction These release notes for Ubuntu 24.04 LTS (Noble Numbat) provide an overview of the release and document the known issues with Ubuntu and its flavours. For details of the changes applied since 24.04, please see the 24.04.2 change summary. Support lifespan

                                                      • Testcontainersを使ってテストを効率化しよう - 電通総研 テックブログ

                                                        こんにちは、Xイノベーション本部ソフトウェアデザインセンターの中村です。 本記事は電通国際情報サービス Advent Calendar 2023の12月8日の記事です。 皆さんはデータベースアクセスを行うアプリケーションのユニットテストやインテグレーションテストをどのように実施していますか?絶対の正解はありませんが、テストの効率性や正確性などを考慮して様々な工夫や検討がなされる領域だと思います。例えば次のような戦略があります。 データベースアクセス部分をモックにする 運用時のデータベースよりも高速なインメモリデータベースを使う(例えばH2 Database Engineなど) 開発者のローカル環境に運用環境と同等のテスト用データベースをインストールする 本記事では、Testcontainersを使ってデータベースアクセスを伴うテストを効率的に実施する方法をコードを交えながら紹介します。 本

                                                          Testcontainersを使ってテストを効率化しよう - 電通総研 テックブログ
                                                        • Aurora PostgreSQLでテーブルパーティショニングを導入した話 【実践編】 - GO Tech Blog

                                                          技術戦略部 SREグループの古越です。 前回の記事でパーティショニングを導入する段階で注意するポイントについて主に触れてきました。今回は導入するために具体的に行った事や追加で導入する拡張機能の解説などを踏まえて紹介していきます。 前提知識と導入するまでの背景については前回の検討編を見て頂ければと思います。 Aurora PostgreSQLでテーブルパーティショニングを導入した話 【検討編】 実践したこと 前回のブログでも軽く触れましたが、導入する前には以下を重点的に検証し、実践しました。 パーティション管理の自動化のため pg_partmanを導入する local開発環境でpg_partmanを利用可能にする Aurora PostgreSQLパラメーターのチューニング パーティションの一部をS3にエクスポートする このあたりを具体的に解説していければと思います。 1. pg_partm

                                                            Aurora PostgreSQLでテーブルパーティショニングを導入した話 【実践編】 - GO Tech Blog
                                                          • JSON is not JSON Across Languages | Dochia CLI Blog

                                                            Introduction: These Aren’t the JSONs You’re Looking For JSON (JavaScript Object Notation) was designed as a simple, lightweight, and human-readable data interchange format, often positioned as a more accessible alternative to XML. It has become the de facto standard for web APIs and system integration. However, while the specification itself is straightforward, different programming languages and

                                                              JSON is not JSON Across Languages | Dochia CLI Blog
                                                            • New – Trusted Language Extensions for PostgreSQL on Amazon Aurora and Amazon RDS | Amazon Web Services

                                                              AWS News Blog New – Trusted Language Extensions for PostgreSQL on Amazon Aurora and Amazon RDS PostgreSQL has become the preferred open-source relational database for many enterprises and start-ups with its extensible design for developers. One of the reasons developers use PostgreSQL is it allows them to add database functionality by building extensions with their preferred programming languages.

                                                                New – Trusted Language Extensions for PostgreSQL on Amazon Aurora and Amazon RDS | Amazon Web Services
                                                              • How to Get or Create in PostgreSQL

                                                                "Get or create" is a very common operation for syncing data in the database, but implementing it correctly may be trickier than you may expect. If you ever had to implement it in a real system with real-life load, you may have overlooked potential race conditions, concurrency issues and even bloat! In this article I explore ways to "get ot create" in PostgresSQL. Illustration by Abstrakt Design Ta

                                                                  How to Get or Create in PostgreSQL
                                                                • Super Fast Rails - RorVsWild

                                                                  Introducing SuperFastRails! We are releasing a gem to help developers write ultra-optimized code. The goal is to allow developers to write code as fast as possible without caring about performance. Rails scales; it’s just a matter of writing the correct code. SuperFastRails automatically improves the requests in your Rails application. Thus, we focus only on the business logic and don’t have to th

                                                                    Super Fast Rails - RorVsWild
                                                                  • [Rust] RusqliteでSqliteを操作する | DevelopersIO

                                                                    Introduction Rustでsqliteを操作するためのcrateはたくさんありますが、 今回はRusqliteというcrateを使って Sqliteにアクセスしてみました。 RustからPostgreSQLにアクセスするcrate、rust-postgresをベースに作成されており、 似たようなインターフェイスで使うことが可能になっています。 Environment MacBook Pro (13-inch, M1, 2020) OS : MacOS 11.3.1 rust : 1.61.0 Try Sqliteのセットアップ まずはsqlite3をHomebrewでインストールします。 % brew install sqlite3 インストールできたらexample_db.db3と名前指定して起動。 % sqlite3 example_db.db3 sqlite> テーブル作成

                                                                      [Rust] RusqliteでSqliteを操作する | DevelopersIO
                                                                    • The Complete Modern React Developer 2022

                                                                      Introduction This will be a course for becoming a Complete Modern React Developer in 2022. The only three topics which are not covered in this course are Redux, GraphQL and React Native which could be covered in a future course. TypeScript is going to be the main programming language covered however if you already know JavaScript then you should find it quite easy to understand because the syntax

                                                                        The Complete Modern React Developer 2022
                                                                      • PgBouncer is useful, important, and fraught with peril

                                                                        Updated 2024-09-17 to reflect updated PgBouncer support for protocol-level prepared statements 🐘 To start, I want to say that I’m appreciative that PgBouncer exists and the work its open source maintainers put into it. I also love working with PostgreSQL, and I’m thankful for the incredible amount of work and improvements that go into it as well. I also think community and industry enthusiasm aro

                                                                          PgBouncer is useful, important, and fraught with peril
                                                                        1