Re: [GENERAL] BDR replication and table triggers

2017-05-02 Thread Craig Ringer
> However if I perform any INSERT, UPDATE or DELETE operations on > DB2 and these changes propagate over to DB1 via BDR I do not see DB1 firing > any triggers. Is this intended behavior? Yes. > My current understanding is that > BDR is unable to invoke Postgres triggers as it operates on the row

Re: [GENERAL] Implicit typecasting to numeric in psql

2017-05-02 Thread Tom Lane
Payal Singh writes: > I have a table with an integer column 'userid'. But I am not seeing an out > of range error when trying to get an id larger than possible in integer: > db=# explain select * from users where userid = > 21474836472871287898765456789::numeric; Cross-type comparisons are legal

Re: [GENERAL] BDR replication and table triggers

2017-05-02 Thread Sylvain Marechal
Why not using the logical decoding feature: https://www.postgresql.org/docs/9.4/static/logicaldecoding-example.html On both sides, you would have a process that regularly decodes the stream and emits notifications for event in tables you are insterested in. Sylvain 2017-05-02 18:18 GMT+02:00 Alv

[GENERAL] Implicit typecasting to numeric in psql

2017-05-02 Thread Payal Singh
Hi, I have a table with an integer column 'userid'. But I am not seeing an out of range error when trying to get an id larger than possible in integer: db=# explain select * from users where userid = 21474836472871287898765456789::numeric; QUERY PLAN --

Re: [GENERAL] Language support of postgresql

2017-05-02 Thread John R Pierce
On 5/2/2017 11:41 AM, Tom Lane wrote: John R Pierce writes: I thought Postgres supported client_encodings of BIG5, GB18030, and GBK, all of which can be stored in the server using either UTF8 or MULE_INTERNAL (MultiLingual EMACS) encodings for internal storage ? Hm, there's MULE<=>BIG5 convert

Re: [GENERAL] Language support of postgresql

2017-05-02 Thread Tom Lane
John R Pierce writes: > I thought Postgres supported client_encodings of BIG5, GB18030, and GBK, > all of which can be stored in the server using either UTF8 or > MULE_INTERNAL (MultiLingual EMACS) encodings for internal storage ? Hm, there's MULE<=>BIG5 converters but I don't see any for GBK o

Re: [GENERAL] Language support of postgresql

2017-05-02 Thread Tom Lane
"Martel, Hong" writes: > As I understand, currently Postgres doesn$B!G(Bt support Chinese encoding > GBK and BIG5 on both server and client side, only UNICODE. Is it true? Are > there any plans for postgresql team to implement GBK and BIG5 encoding > anytime soon? Yes, and no. There's bas

Re: [GENERAL] Language support of postgresql

2017-05-02 Thread John R Pierce
On 4/28/2017 7:45 AM, Martel, Hong wrote: As I understand, currently Postgres doesn’t support Chinese encoding GBK and BIG5 on both server and client side, only UNICODE. Is it true? Are there any plans for postgresql team to implement GBK and BIG5 encoding anytime soon? Are there any alte

Re: [GENERAL] BDR replication and table triggers

2017-05-02 Thread Alvaro Aguayo Garcia-Rada
Hi. It's not like BDR is unable to replicate triggers across the cluster: BDR is not intended to do so. BDR replicates everything that happens inside a transaction; that includes both SQL run directly from the application, as well as changes made by triggers and extensions. As the changes are

[GENERAL] Column rename in an extension update script

2017-05-02 Thread Philippe BEAUDOIN
Hi all, I am coding an update script for an extension. And I am in trouble when trying to rename a column of an existing table. Just after the ALTER TABLE statement, I want to access this table. But at this time, the altered column is not visible with its new name. I wrote a simple test cas

Re: [GENERAL] Can PG replace redis, amqp, s3 in the future?

2017-05-02 Thread Thomas Delrue
On April 30, 2017 1:37:02 PM GMT+02:00, "Thomas Güttler" wrote: >Is is possible that PostgreSQL will replace these building blocks in >the future? > > - redis (Caching) > - rabbitmq (amqp) > - s3 (Blob storage) These are three very different sets of functionalities, each requiring a different

Re: [GENERAL] Language support of postgresql

2017-05-02 Thread Martel, Hong
Hi, As I understand, currently Postgres doesn’t support Chinese encoding GBK and BIG5 on both server and client side, only UNICODE. Is it true? Are there any plans for postgresql team to implement GBK and BIG5 encoding anytime soon? Are there any alternative solutions for this besides switchi

[GENERAL] Generalized pg_stat_statements?

2017-05-02 Thread Jacob Scott
When reviewing execution statistics, I am frequently interested in the behavior of "classes" of queries, rather than individual queries, for example queries which - Contain a join - Touch a specific column - Use POSIX regular expressions AFAIK this sort of summary/rollup information can'

Re: [GENERAL] FDW table doesn't exist

2017-05-02 Thread kerneltrick
Figured this out... someone changed the name of the column and took out the extra 'h' in acceptance_threshhold on the database the fdw is pointing -- View this message in context: http://www.postgresql-archive.org/FDW-table-doesn-t-exist-tp5958279p5958336.html Sent from the PostgreSQL - g

[GENERAL] BDR replication and table triggers

2017-05-02 Thread jamesadams89
Hi, I have some questions regarding how BDR interacts with triggers. I have two databases that are both joined to the same BDR group and correctly replicating between one another sharing a table created as: create table testtable( key varchar(16) NOT NULL PRIMARY KEY, data jsonb

[GENERAL] FDW table doesn't exist

2017-05-02 Thread kerneltrick
Hi all, I have a FDW to another database but I started getting this error while trying to use it select * from aut_class limit 10; ERROR: column "acceptance_threshhold" does not exist HINT: Perhaps you meant to reference the column "aut_class.acceptance_threshold". Yet when I do some checking,