Re: How to access Postgres .pgpass file from php?

2019-09-07 Thread Adrian Klaver
On 9/7/19 3:17 PM, Howard Wells wrote: I have my php files in the web root, and the Postgres 10 logon credentials are in the php file.  I want to put them outside the web root for security, because a malicious robot could easily read the credentials. After research, I found the .pgpass file. 

How to access Postgres .pgpass file from php?

2019-09-07 Thread Howard Wells
I have my php files in the web root, and the Postgres 10 logon credentials are in the php file. I want to put them outside the web root for security, because a malicious robot could easily read the credentials. After research, I found the .pgpass file. That looks like the ideal solution, but

Re: Convert a row to a nested JSON document containing all relations in PostgreSQL

2019-09-07 Thread Adrian Klaver
On 9/6/19 9:35 PM, Ali Alizadeh wrote: Hello. In PostgreSQL 10.10, I have created a trigger function that converts the `|NEW|` row to a JSON object using |`to_jsonb(NEW)|`. But now I need to include the records on the other side of the foreign keys in |`NEW|` record in the JSON object in a n

Re: kind of a bag of attributes in a DB . . .

2019-09-07 Thread Adrian Klaver
On 9/7/19 5:45 AM, Albretch Mueller wrote: Say, you get lots of data and their corresponding metadata, which in some cases may be undefined or undeclared (left as an empty string). Think of youtube json files or the result of the "file" command. I need to be able to "instantly" search that metad

Re: Environment Variable for --data-checksum during initdb

2019-09-07 Thread Adrian Klaver
On 9/7/19 5:32 AM, Ray Cote wrote: On Thu, Sep 5, 2019 at 3:25 PM Ray Cote > wrote: > > I'm trying to remember what environment variable can be set --data-checksum before running postgresql-setup initdb. I know I've seen it but it escapes my recall at

kind of a bag of attributes in a DB . . .

2019-09-07 Thread Albretch Mueller
Say, you get lots of data and their corresponding metadata, which in some cases may be undefined or undeclared (left as an empty string). Think of youtube json files or the result of the "file" command. I need to be able to "instantly" search that metadata and I think DBs are best for such jobs an

Re: Environment Variable for --data-checksum during initdb

2019-09-07 Thread Ray Cote
On Thu, Sep 5, 2019 at 3:25 PM Ray Cote wrote: > > I'm trying to remember what environment variable can be set --data-checksum before running postgresql-setup initdb. I know I've seen it but it escapes my recall at the moment. > > The PostgreSQL documentation has a nice page of environment variabl

Convert a row to a nested JSON document containing all relations in PostgreSQL

2019-09-07 Thread Ali Alizadeh
Hello. In PostgreSQL 10.10, I have created a trigger function that converts the `NEW` row to a JSON object using `to_jsonb(NEW)`. But now I need to include the records on the other side of the foreign keys in `NEW` record in the JSON object in a nested fashion. What is the best and most gene