RE: Error: "remote query result rowtype does not match the specified FROM clause rowtype," on remote function call

2019-03-25 Thread Antonio Gomez
I figured it out, you have to specify the type twice, once inside the remote call and once outside. Like this: SELECT * FROM dblink('conn_str', 'select public._test1() as x(a int ,b int)') as x(a int ,b int); Not optimal and not readily discernible, but there it is. Thanks for your

stale WAL files?

2019-03-25 Thread Rob Sargent
PG10.7, Centos7 On Mar15 we filled our default tablespace/WAL partition. Cleaned up some old dumps and restarted. pg_wal had apparently exploded but cleaned itself up by the next day. On Mar16 I ran CHECKPOINT in all databases on that server (except template0). All seems fine except for 271

Re: Error: "remote query result rowtype does not match the specified FROM clause rowtype," on remote function call

2019-03-25 Thread Adrian Klaver
On 3/25/19 3:26 PM, Adrian Klaver wrote: On 3/25/19 3:20 PM, Antonio Gomez wrote: select * from public._test1(); ERROR:  a column definition list is required for functions returning "record" LINE 1: select * from public._test1(); Have you looked at postresql_fdw?: Sorry was not thinking.

Re: Error: "remote query result rowtype does not match the specified FROM clause rowtype," on remote function call

2019-03-25 Thread Adrian Klaver
On 3/25/19 3:20 PM, Antonio Gomez wrote: I figured it out, you have to specify the type twice, once inside the remote call and once outside. Like this: SELECT * FROM dblink('conn_str', 'select public._test1() as x(a int ,b int)') as x(a int ,b int); Not optimal and not readily

Re: Error: "remote query result rowtype does not match the specified FROM clause rowtype," on remote function call

2019-03-25 Thread Adrian Klaver
On 3/25/19 1:08 PM, Antonio Gomez wrote: This is my *remote* function: CREATEORREPLACE FUNCTIONpublic._test1() RETURNS record LANGUAGE plpgsql AS$function$ DECLARE rec record; BEGIN select1,2intorec; returnrec; END$function$; This is my *local* function call: SELECTx.a, x.b

Re: [External] postgres 9.5 DB corruption: invalid byte sequence for encoding "UTF8"

2019-03-25 Thread Thomas Tignor
Hi Vijay,Thanks for writing. To your questions: i think the experts will chime in soon, but why do you think this as db corruption and not just a bad input? https://github.com/postgres/postgres/blob/master/src/pl/plperl/expected/plperl_lc_1.out tptignor: Our JVM logs data before the insert

Re: Forks of pgadmin3?

2019-03-25 Thread Dave Cramer
Thomas, Any chance it would run under graalvm getting rid of the need for the JVM ? Dave Cramer da...@postgresintl.com www.postgresintl.com On Mon, 25 Mar 2019 at 07:06, Thomas Kellerer wrote: > kpi6...@gmail.com schrieb am 22.03.2019 um 17:25: > > 95% of my time I use pgadminIII just to

Error: "remote query result rowtype does not match the specified FROM clause rowtype," on remote function call

2019-03-25 Thread Antonio Gomez
This is my remote function: CREATE OR REPLACE FUNCTION public._test1() RETURNS record LANGUAGE plpgsql AS $function$ DECLARE rec record; BEGIN select 1,2 into rec; return rec; END $function$; This is my local function call: SELECT x.a, x.b FROM dblink('conn_str', 'select public._test1();') as

Re: AW: Forks of pgadmin3?

2019-03-25 Thread Tim Cross
kpi6...@gmail.com writes: > Thanks for the link but we're very reluctant to use Java based programs. > The main reason is that we need to do some works on servers whose admins > simply do not allow to install Java. > The screenshots look very promises, however. > > Regards > Klaus > >>

Re: [External] postgres 9.5 DB corruption: invalid byte sequence for encoding "UTF8"

2019-03-25 Thread Brad Nicholson
Vijaykumar Jain wrote on 03/25/2019 03:07:19 PM: > but why do you think this as db corruption and not just a bad input? > https://urldefense.proofpoint.com/v2/url? > u=https-3A__github.com_postgres_postgres_blob_master_src_pl_plperl_expected_plperl-5Flc-5F1.out=DwIFaQ=jf_iaSHvJObTbx- >

Re: [External] postgres 9.5 DB corruption: invalid byte sequence for encoding "UTF8"

2019-03-25 Thread Vijaykumar Jain
i think the experts will chime in soon, but why do you think this as db corruption and not just a bad input? https://github.com/postgres/postgres/blob/master/src/pl/plperl/expected/plperl_lc_1.out or it may also be encoding issue. https://pganalyze.com/docs/log-insights/app-errors/U137 can you

postgres 9.5 DB corruption: invalid byte sequence for encoding "UTF8"

2019-03-25 Thread Thomas Tignor
Hoping someone may be able to offer some guidance on this recurring problem. I am providing this "problem report" to the general list as I understand the bugs list requires a set of reproduction steps we do not yet have. Please advise if I have the process wrong. I have tried to provide all

Re: WAL Archive Cleanup?

2019-03-25 Thread Foo Bar
Hello All, Wow! Lots of awesome replies, Went away for the weekend thinking my email had been rejected and come back to a full inbox. Thanks for all the help! >> Postgres version? 9.6.11 Doh. Fairly important detail there. :) >> FYI, psql is the Postgres client program, Postgres(ql) is

Re: When to store data that could be derived

2019-03-25 Thread Frank
On 2019-03-25 5:11 PM, Frank wrote: On 2019-03-25 4:06 PM, Ron wrote: On 3/25/19 8:15 AM, Frank wrote: It would be interesting to see what the query planner tries to do with this: WHERE CASE WHEN a.tran_type = 'ar_rec' THEN y.posted WHEN a.tran_type = 'cb_rec'

Re: When to store data that could be derived

2019-03-25 Thread Frank
On 2019-03-25 4:06 PM, Ron wrote: On 3/25/19 8:15 AM, Frank wrote: It would be interesting to see what the query planner tries to do with this: WHERE     CASE     WHEN a.tran_type = 'ar_rec' THEN y.posted     WHEN a.tran_type = 'cb_rec' THEN w.posted     END = '1' I have

Re: When to store data that could be derived

2019-03-25 Thread Ron
On 3/25/19 8:15 AM, Frank wrote: On 2019-03-24 2:41 PM, Peter J. Holzer wrote: On 2019-03-24 10:05:02 +0200, Frank wrote: Many thanks to Peter et al for their valuable insights. I have learned a lot. > So the important part here is not whether data is added, but whether > data is changed.

Re: When to store data that could be derived

2019-03-25 Thread Frank
On 2019-03-24 2:41 PM, Peter J. Holzer wrote: On 2019-03-24 10:05:02 +0200, Frank wrote: Many thanks to Peter et al for their valuable insights. I have learned a lot. > So the important part here is not whether data is added, but whether > data is changed. Sure, new transactions are added

AW: Forks of pgadmin3?

2019-03-25 Thread kpi6288
Thank you, I was not aware of this option - this certainly helps. Regards Klaus Von: Murtuza Zabuawala Gesendet: Freitag, 22. März 2019 18:48 An: kpi6...@gmail.com Cc: PostgreSQL mailing lists Betreff: Re: Forks of pgadmin3? Opening Query tool or Debugger window in a new separate

AW: Forks of pgadmin3?

2019-03-25 Thread kpi6288
Thanks for the link but we're very reluctant to use Java based programs. The main reason is that we need to do some works on servers whose admins simply do not allow to install Java. The screenshots look very promises, however. Regards Klaus > -Ursprüngliche Nachricht- > Von: Thomas

Re: Forks of pgadmin3?

2019-03-25 Thread Thomas Kellerer
kpi6...@gmail.com schrieb am 22.03.2019 um 17:25: > 95% of my time I use pgadminIII just to type select and update > statements and review the output rows. > > I know that I can do this in psql but it’s not handy with many > columns. An alternative you might want to try is SQL Workbench/J:

Re: Forks of pgadmin3?

2019-03-25 Thread Geoff Winkless
On Fri, 22 Mar 2019 at 16:25, wrote: > I know that I can do this in psql but it’s not handy with many columns. > I know this doesn't solve your root problem but for this issue you might find pspg helpful. https://github.com/okbob/pspg Geoff

Re: Forks of pgadmin3?

2019-03-25 Thread Christian Henz
Am 23.03.19 um 01:36 schrieb Jeff Janes: > On Fri, Mar 22, 2019 at 8:04 AM Steve Atkins > wrote: > > There's the BigSQL fork, which had at least some minimal support > for 10. I've no idea whether it's had / needs anything for 11 > > I just installed BigSQL's