メインコンテンツまでスキップ

PostgreSQL

Squid は PostgreSQL database に接続し、Squid application の data source として使用できます。​

PostgreSQL は reliability、feature robustness、performance を目的に設計された open source object-relational database system です。Squid を使用すると、PostgreSQL database に接続し、他の database connector の data と join することもできます。

PostgreSQL database を Squid に接続するには、次の step を完了します。

  1. Squid Console を開き、PostgreSQL と使用する application を選択します。
  2. Connectors tab をクリックし、次に Available connectors をクリックします。
  3. PostgreSQL connector を選択します。
  4. 次の configuration information を入力します。
  • Connector ID - 簡潔で connector の識別に役立つ ID を選択します。
  • Database endpoint - port number を含む database host。
  • PostgreSQL username
  • PostgreSQL password - password を private に保つには、Squid Secrets に保存します。
  • Schema - 接続する schema の name。指定しない場合は default の public schema が使用されます。
  • Database name - 接続する database の name。
  • SSL configuration(必要な場合)

connection information を入力したら、Test connection をクリックして connection が正しく構成されていることを確認します。

PostgreSQL connector

Database の保護​

default では security rule が必要です。production environment では、security rule なしで connector への access を許可しないことが不可欠です。database data の保護について詳しくは、security rules documentationを参照してください。

次の table は、PostgreSQL と Squid 間の datatype mapping を示します。

PostgreSQL TypeSquid Type
bigintnumber
bitstring
bit varyingstring
booleanboolean
byteastring
charstring
characterstring
character varyingstring
cidrstring
datedate
double precisionnumber
enumstring
inetstring
integerinteger
intervalstring
jsonmap or array
jsonbmap or array
macaddrstring
macaddr8string
mediumintinteger
moneynumber
numericnumber
realnumber
smallintinteger
textstring
timestring
time with time zonestring
time without time zonestring
timestampdate
timestamp with time zonedate
timestamp without time zonedate
tinyintinteger
uuidstring
varcharstring

Squid で PostgreSQL data を操作する方法については、Client SDK documentationを参照してください。