Re: [GENERAL] Slow Query - Postgres 9.2

2016-03-03 Thread Vitaly Burovoy
On 3/2/16, drum.lu...@gmail.com wrote: > On 3 March 2016 at 10:33, Vitaly Burovoy wrote: >> On 3/2/16, drum.lu...@gmail.com wrote: >> > Hi all... >> > >> > I'm working on a Slow Query. It's faster now (It was 20sec before)

[GENERAL] Re: could not migrate 8.0.13 database with large object data to 9.5.1

2016-03-03 Thread Premsun Choltanwanich
Hi John, Database seem now completely transferred after "create extension lo" on my new database then restore all data from the backup file. (tested by my application to call/save all information data and picture with database) Thank you for your kindly help. Regards, NETsolutions Asia

Re: [GENERAL] C function migration from 9.2 to 9.5

2016-03-03 Thread Tom Lane
Michael Omotayo Akinde writes: > This throws a compiler warning on the cast from heap_form_tuple to > HeapTuple, but IIRC it's always done that so not an error? Uh, that's *awfully* fishy, because heap_form_tuple certainly returns HeapTuple. I wondered why you had that cast

Re: [GENERAL] BDR concern/issue

2016-03-03 Thread Craig Ringer
On 3 March 2016 at 07:54, cchee-ob wrote: > I queried pg_replication_slots after I removed an BDR node and I noticed a > slot_name that isn't in bdr.bdr_node_slots. And active is 'f' and it has > been retaining bytes. Should I be concerned and is there a way to

Re: [GENERAL] C function migration from 9.2 to 9.5

2016-03-03 Thread Michael Omotayo Akinde
Thanks for the responses. I currently have Postgres installed through apt-get, so I don't think it is old libraries/header files. Just to double check, I spun up a "blank" VM with Ubuntu 14.04 (Trusty), which is what we're currently running in our dev environment, and apt-get installed

Re: [GENERAL] PLPythonu for production server

2016-03-03 Thread David G. Johnston
On Thu, Mar 3, 2016 at 12:35 PM, Adrian Klaver wrote: > On 03/03/2016 10:09 AM, Rémi Cura wrote: > >> Hey List, >> >> would it be considered safe to use plpythonu for a production database? >> What would be the limitations/ dangers? >> > > They are explained here: > >

Re: [GENERAL] PLPythonu for production server

2016-03-03 Thread Adrian Klaver
On 03/03/2016 10:09 AM, Rémi Cura wrote: Hey List, would it be considered safe to use plpythonu for a production database? What would be the limitations/ dangers? They are explained here: http://www.postgresql.org/docs/9.5/interactive/plpython.html "PL/Python is only available as an

Re: [GENERAL] bloated postgres data folder, clean up

2016-03-03 Thread Julien Rouhaud
On 03/03/2016 18:15, Rémi Cura wrote: > Hey, Hello Rémi, > first I forgot something in the querry to remove the annoying .XXX : > --- > SELECT distinct substring(file_name from '\d+' ) > FROM find_useless_postgres_file('your_database_name') ; > --- > Thanks for working on this

Re: [GENERAL] Re: could not migrate 8.0.13 database with large object data to 9.5.1

2016-03-03 Thread John R Pierce
On 3/3/2016 3:53 AM, Premsun Choltanwanich wrote: I have no source code for this contrib/lo and dll/function seem already be stored with my 8.0.13 installation package. upon looking at the current docs again in the light of day, I see that there *IS* a contrib/lo module in all recent

[GENERAL] PLPythonu for production server

2016-03-03 Thread Rémi Cura
Hey List, would it be considered safe to use plpythonu for a production database? What would be the limitations/ dangers? Thanks, Cheers, Rémi-C

Re: [GENERAL] space required before negative

2016-03-03 Thread Tom Lane
Geoff Winkless writes: > I was surprised to find that whitespace is required between the != > operator and a negative sign, otherwise postgres believes that I'm > intending !=- as an operator (I get "operator does not exist: integer > !=- integer"). > This isn't the case

[GENERAL] space required before negative

2016-03-03 Thread Geoff Winkless
Hi I was surprised to find that whitespace is required between the != operator and a negative sign, otherwise postgres believes that I'm intending !=- as an operator (I get "operator does not exist: integer !=- integer"). This isn't the case with <>-x. Is this intentional? I couldn't find

Re: [GENERAL] bloated postgres data folder, clean up

2016-03-03 Thread Rémi Cura
Hey, first I forgot something in the querry to remove the annoying .XXX : --- SELECT distinct substring(file_name from '\d+' ) FROM find_useless_postgres_file('your_database_name') ; --- Now it seems you do everything all right, with a slight confusion between bloating and useless

Re: [GENERAL] C function migration from 9.2 to 9.5

2016-03-03 Thread Tom Lane
Michael Omotayo Akinde writes: > We've been having a Postgresql database with some custom C functionality > happily running for many years now. It's been running on 9.2, and we wish > to upgrade this to the latest version. However, we're seeing some issues > with the database

Re: [GENERAL] C function migration from 9.2 to 9.5

2016-03-03 Thread Pavel Stehule
2016-03-03 16:06 GMT+01:00 Pavel Stehule : > Hi > > 2016-03-03 15:12 GMT+01:00 Michael Omotayo Akinde : > >> Hi, >> >> We've been having a Postgresql database with some custom C functionality >> happily running for many years now. It's been running on

Re: [GENERAL] C function migration from 9.2 to 9.5

2016-03-03 Thread Pavel Stehule
Hi 2016-03-03 15:12 GMT+01:00 Michael Omotayo Akinde : > Hi, > > We've been having a Postgresql database with some custom C functionality > happily running for many years now. It's been running on 9.2, and we wish > to upgrade this to the latest version. However, we're seeing

[GENERAL] C function migration from 9.2 to 9.5

2016-03-03 Thread Michael Omotayo Akinde
Hi, We've been having a Postgresql database with some custom C functionality happily running for many years now. It's been running on 9.2, and we wish to upgrade this to the latest version. However, we're seeing some issues with the database process crashing each time. A simplified, minimal

[GENERAL] Re: could not migrate 8.0.13 database with large object data to 9.5.1

2016-03-03 Thread Premsun Choltanwanich
Hi Joon, I have no source code for this contrib/lo and dll/function seem already be stored with my 8.0.13 installation package. Any suggestion? Regards, NETsolutions Asia Limited http://www.nsasia.co.th >>> John R Pierce 2016-03-03 09:05 >>> On 3/2/2016 5:52 PM, Premsun

Re: [GENERAL] CStringGetTextDatum and other conversions in server-side code

2016-03-03 Thread david
FWIW here are examples from PL/R for incoming (argument) and outgoing (result) conversions of scalar values: https://github.com/jconway/plr/blob/master/pg_conversion.c#L632 https://github.com/jconway/plr/blob/master/pg_conversion.c#L1002 That same file also has routines for conversions of

Re: [GENERAL] CStringGetTextDatum and other conversions in server-side code

2016-03-03 Thread david
all the text types are simply a 32bit length and an array of characters. you need to be aware of the encoding, and null is just another character. [dmb>] Yes, I can see that. What I need is a function that will convert to and from whatever the actual encoding happens to be into Unicode,