Weird ranking results with ts_rank

2019-11-14 Thread Javier Ayres
Hi everybody. I'm implementing a solution that uses PostgreSQL's full text search capabilities and I have come across a particular set of results for ts_rank that don't seem to make sense according to the documentation. I have tried the following queries in PostgreSQL 10, 11 and 12. In both cases

Re: PostGreSQL Replication and question on maintenance

2019-11-14 Thread Pavel Stehule
pá 15. 11. 2019 v 6:26 odesílatel github kran napsal: > > Hello postGreSQL Community , >> >> >> >> Hope everyone is doing great !!. >> >> >> *Background* >> >> We use PostgreSQL Version 10.6 version and heavily use PostgreSQL for our >> day to day activities to write and read data. We have 2 clus

Fwd: PostGreSQL Replication and question on maintenance

2019-11-14 Thread github kran
> Hello postGreSQL Community , > > > > Hope everyone is doing great !!. > > > *Background* > > We use PostgreSQL Version 10.6 version and heavily use PostgreSQL for our > day to day activities to write and read data. We have 2 clusters running > PostgreSQL engine , one cluster > > keeps data up to

Re: Query which shows FK child columns?

2019-11-14 Thread Jeff Ross
On 11/14/19 11:49 AM, Ron wrote: v9.6.16 I have a query which shows the parents and children in FK relations, along with the parent column name, but can't seem to find the child column names. Is there a way to find the child column names without having to dig into pg_constraint? Thanks

Query which shows FK child columns?

2019-11-14 Thread Ron
v9.6.16 I have a query which shows the parents and children in FK relations, along with the parent column name, but can't seem to find the child column names. Is there a way to find the child column names without having to dig into pg_constraint? Thanks test=# select ccu.table_schema||'.'|

Re: Wall shiping replica failed to recover database with error: invalid contrecord length 1956 at FED/38FFE208

2019-11-14 Thread Tom Lane
Kyotaro Horiguchi writes: > At Wed, 2 Oct 2019 19:24:02 -0400, Stephen Frost wrote > in >> * Tom Lane (t...@sss.pgh.pa.us) wrote: >>> Yeah, those messages are all pretty ancient, from when WAL was new and not >>> to be trusted much. Perhaps the thing to do is move the existing info >>> into DE

PostGreSQL Replication and question on maintenance

2019-11-14 Thread github kran
sorry changing the subject line. On Thu, Nov 14, 2019 at 11:21 AM github kran wrote: > Hello Team, > > > > Hope everyone is doing great !!. > > > *Background* > > We use PostgreSQL Version 10.6 version and heavily use PostgreSQL for our > day to day activities to write and read data. We have 2 c

Re: Postgresql RDS DB Latency Chossing Hash join Plan

2019-11-14 Thread github kran
Hello Team, Hope everyone is doing great !!. *Background* We use PostgreSQL Version 10.6 version and heavily use PostgreSQL for our day to day activities to write and read data. We have 2 clusters running PostgreSQL engine , one cluster keeps data up to 60 days and another cluster retains da

Re: Problems modifyiong view

2019-11-14 Thread stan
On Thu, Nov 14, 2019 at 10:12:22AM -0500, Tom Lane wrote: > Adrian Klaver writes: > > On 11/14/19 5:53 AM, stan wrote: > >> I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am > >> getting the following error: > >> ERROR: cannot change name of view column "descrip" to "con

Re: Problems modifyiong view

2019-11-14 Thread stan
On Thu, Nov 14, 2019 at 06:31:48AM -0800, Adrian Klaver wrote: > On 11/14/19 5:53 AM, stan wrote: > > I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am > > getting the following error: > > > > ERROR: cannot change name of view column "descrip" to "contact_person_1" > >

Re: Problems modifyiong view

2019-11-14 Thread Adrian Klaver
On 11/14/19 7:54 AM, Adrian Klaver wrote: On 11/14/19 7:45 AM, Tom Lane wrote: Adrian Klaver writes: On 11/14/19 7:12 AM, Tom Lane wrote: If you actually want to rename an existing view column, use ALTER TABLE ... RENAME COLUMN ... for that. Alright, I'm missing something here: test=# a

Re: Problems modifyiong view

2019-11-14 Thread Adrian Klaver
On 11/14/19 7:45 AM, Tom Lane wrote: Adrian Klaver writes: On 11/14/19 7:12 AM, Tom Lane wrote: If you actually want to rename an existing view column, use ALTER TABLE ... RENAME COLUMN ... for that. Alright, I'm missing something here: test=# alter table up_test rename COLUMN col1 to co

Re: INOUT PARAMETERS WITH RETURN TABLES IN FUNCTION

2019-11-14 Thread Adrian Klaver
On 11/13/19 11:58 PM, İlyas Derse wrote: Please reply to list also. Ccing list. I want to do like this ; I can't make sense of the below. I don't see where "x" and "y" are used in the function, unless they supposed to be "id" and "filesize". I have no idea what the QUERY is doing? Pretty su

Re: Problems modifyiong view

2019-11-14 Thread Tom Lane
Adrian Klaver writes: > On 11/14/19 7:12 AM, Tom Lane wrote: >> If you actually want to rename an existing view column, use >> ALTER TABLE ... RENAME COLUMN ... for that. > Alright, I'm missing something here: > test=# alter table up_test rename COLUMN col1 to col_1; > ALTER TABLE > ... > test=#

Re: Problems modifyiong view

2019-11-14 Thread Adrian Klaver
On 11/14/19 7:12 AM, Tom Lane wrote: Adrian Klaver writes: On 11/14/19 5:53 AM, stan wrote: I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am getting the following error: ERROR: cannot change name of view column "descrip" to "contact_person_1" Am I missing something

RE: ERROR: COPY escape must be a single one-byte character (multi-delimiter appears to work on Postgres 9.0 but does not on Postgres 9.2)

2019-11-14 Thread Kevin Brannen
>Adrian Klaver wrote: >On 11/13/19 4:40 PM, Brandon Ragland wrote: >> Hello, >> >> I have a Talend enterprise job that loads data into a PostgreSQL >> database via the COPY command. When migrating to a new server this >> command fails with the following error message: >> org.postgresql.util.PSQLExc

Re: Problems modifyiong view

2019-11-14 Thread Tom Lane
Adrian Klaver writes: > On 11/14/19 5:53 AM, stan wrote: >> I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am >> getting the following error: >> ERROR: cannot change name of view column "descrip" to "contact_person_1" >> Am I missing something here? > https://www.postgr

Re: Problems modifyiong view

2019-11-14 Thread Adrian Klaver
On 11/14/19 5:53 AM, stan wrote: I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am getting the following error: ERROR: cannot change name of view column "descrip" to "contact_person_1" I suppose I can drop the view, and recreate it, but that seems to indicate that th

Re: Problems modifyiong view

2019-11-14 Thread Igor Korot
Hi, On Thu, Nov 14, 2019 at 7:54 AM stan wrote: > > I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am > getting the following error: > > ERROR: cannot change name of view column "descrip" to "contact_person_1" > > I suppose I can drop the view, and recreate it, but tha

Problems modifyiong view

2019-11-14 Thread stan
I am trying to add columns to a view using CREATE OR REPLACE VIEW, and I am getting the following error: ERROR: cannot change name of view column "descrip" to "contact_person_1" I suppose I can drop the view, and recreate it, but that seems to indicate that the create or replace functionality i