<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>uggds</author_name>
  <author_url>https://blog.hatena.ne.jp/uggds/</author_url>
  <blog_title>UGA Boxxx</blog_title>
  <blog_url>https://uga-box.hatenablog.com/</blog_url>
  <categories>
    <anon>PostgreSQL</anon>
  </categories>
  <description>PostgresのCOPY FROMコマンドを使ってcsvファイルをテーブルに読み込ませたい さらにはpsqlにそのsqlを渡してコマンドラインで実行したい 実行環境 Postgresサーバーはdockerで起動している psqlはローカルマシンにインストール済み psqlでsqlを実行する書式は以下なので $ psql &quot;データベース接続情報&quot; -c &quot;SQL文&quot; シンプルに次のようにすればよさそう $ psql &quot;host=localhost port=5432 dbname=postgres user=postgres password=postgres&quot; -c &quot;\COPY TARGE…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fuga-box.hatenablog.com%2Fentry%2F2020%2F10%2F27%2F000000&quot; title=&quot;【PostgreSQL】COPYコマンドを使ってローカルにあるcsvファイルをインポートしたい - UGA Boxxx&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-10-27 00:00:00</published>
  <title>【PostgreSQL】COPYコマンドを使ってローカルにあるcsvファイルをインポートしたい</title>
  <type>rich</type>
  <url>https://uga-box.hatenablog.com/entry/2020/10/27/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
