[GENERAL] Best way to insert a row with two columns having the value based on the same argument generated by another postgres function.

2016-07-07 Thread Silk Parrot
Hi,      I am trying to build a user database. The steps for creating a new user are: 1. Use gen_salt to create a salt. 2. Compute the hash based on the salt and password and store both the hash and the salt into a new row. The pl/pgsql would look like this: CREATE OR REPLACE FUNCTION system.c

[GENERAL] How to best archetect Multi-Tenant SaaS application using Postgres

2016-08-01 Thread Silk Parrot
Hi,   We are trying build a multi tenant application and are debating which approach we should take: (also my understanding is based on that pgbouncer connection pool doesn’t work across different user/database pair): 1.  For each tenant, we create a dedicated database and a dedicated user. Thi

Re: [GENERAL] How to best archetect Multi-Tenant SaaS application using Postgres

2016-08-02 Thread Silk Parrot
(5000)? --  Regards Ryan On August 1, 2016 at 10:30:48 PM, Venkata Balaji N (nag1...@gmail.com) wrote: On Sun, Jul 31, 2016 at 12:07 PM, Silk Parrot wrote: Hi,   We are trying build a multi tenant application and are debating which approach we should take: (also my understanding is based on

[GENERAL] Unique constraint on field inside composite type.

2016-08-22 Thread Silk Parrot
Hi,     I am trying to model a social login application. The application can support multiple login providers. I am thinking of creating a custom type for each provider. e.g. CREATE TYPE system.google_user AS (    email TEXT ); CREATE TYPE system.facebook_user AS (    id TEXT );    And having

[GENERAL] Guidance on building Foreign Data Wrapper on Windows.

2013-02-12 Thread Silk Parrot
Hi Hackers, I am interested in writing a FDW. I setup my environment on Windows. However, I am not able to figure out how to build FDW successfully. Here is what I have done: -Install the 9.2.2 by using EnterpriseDB installer. Add bin/ to the PATH -I have followed the windows build instr