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

2016-03-01 Thread John R Pierce
(thread moved from pg_bugs) (upgrading a 8.0.13 database on Windows XP 32bit to 9.5.1 on Windows 8 64 bit.) On 3/1/2016 8:05 PM, Premsun Choltanwanich wrote: Modified command by remove -Ft flag as per you suggestion: pg_dump -v -h 192.168.200.75 -U clubadmin -d clubprogram | psql -U

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

2016-03-01 Thread Premsun Choltanwanich
Dear All, I have very old project database which also contain lo data (large object data managed by database's functions as lo(oid), lo_in(cstring), lo_oid(lo), lo_out(lo) and oid(lo) to manage ) running on PostgreSQL 8.0.13 and need to migrate it to most recently version as PostgreSQL 9.5.1.

Re: [GENERAL] multicolumn index and setting effective_cache_size using human-readable-numbers

2016-03-01 Thread Jeff Janes
On Mon, Feb 29, 2016 at 3:02 PM, Geoff Winkless wrote: > > Perhaps I'm not being clear. Index 1 has field a and is used in the join no > matter how small I set effective_cache_size (even 32mb). Index 2 has fields > a,b but will not be used at ecs of 3gb, 6gb, whatever up til

Re: [GENERAL] Looking for pure C function APIs for server extension: language handler and SPI

2016-03-01 Thread John R Pierce
On 2/29/2016 3:55 PM, da...@andl.org wrote: What I need (to find or create) is a ‘pure’ C language API to support a Postgres server extension. By ‘pure’ I mean one that has no knowledge of Postgres internals and that could be called by a generic interface provided by some other tool that can

Re: [GENERAL] Looking for pure C function APIs for server extension: language handler and SPI

2016-03-01 Thread John McKown
On Mon, Feb 29, 2016 at 5:55 PM, wrote: > What I need (to find or create) is a ‘pure’ C language API to support a > Postgres server extension. By ‘pure’ I mean one that has no knowledge of > Postgres internals and that could be called by a generic interface provided > by some

Re: [GENERAL] Schema Size

2016-03-01 Thread drum.lu...@gmail.com
On 2 March 2016 at 12:23, Scott Mead wrote: > > On Tue, Mar 1, 2016 at 6:07 PM, David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> You should read the definitions for the functions you are using to >> retrieve the sizes. >> >>

Re: [GENERAL] Function fixing - PostgreSQL 9.2

2016-03-01 Thread drum.lu...@gmail.com
> > >>> *Question:* Payments in a Pending state cannot be invoiced and are excluded from the Invoice Runs section, but they are showing in the count mechanic. How can I solve this? >>> >>> ​In 9.2 you probably need to convert the count into a conditional sum: >>> >>>

Re: [GENERAL] substring on bit(n) and bytea types is slow

2016-03-01 Thread Arjen Nienhuis
On Feb 29, 2016 22:26, "Evgeny Morozov" < evgeny.morozov+list+pg...@shift-technology.com> wrote > SELECT substring(bitarray from (32 * (n - 1) + 1) for 32) -- bitarray is a column of type bit(6400) > FROM array_test_bit > JOIN generate_series(1, 1) n ON true; Substring on a bit string is

Re: [GENERAL] Schema Size

2016-03-01 Thread Scott Mead
On Tue, Mar 1, 2016 at 6:07 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > You should read the definitions for the functions you are using to > retrieve the sizes. > > ​http://www.postgresql.org/docs/current/static/functions-admin.html​ > > +1, you've gotta be careful with each of

Re: [GENERAL] Schema Size

2016-03-01 Thread David G. Johnston
You should read the definitions for the functions you are using to retrieve the sizes. ​http://www.postgresql.org/docs/current/static/functions-admin.html​ On Tue, Mar 1, 2016 at 3:48 PM, drum.lu...@gmail.com wrote: > Hi there > > Wanna see how size a schema is in my

[GENERAL] Schema Size

2016-03-01 Thread drum.lu...@gmail.com
Hi there Wanna see how size a schema is in my PostgreSQL 9.2 Got two queries - they return different values... can u please check? cheers; Query 1: SELECT schema_name, pg_size_pretty(sum(table_size)::bigint) as "disk space", (sum(table_size) / pg_database_size(current_database())) *

Re: [GENERAL] multiple UNIQUE indices for FK

2016-03-01 Thread Rafal Pietrak
W dniu 01.03.2016 o 20:02, Igor Neyman pisze: [] > > > It just occured to me: how do I make sure (e.g. force within a database) with > the above structure, that a message can have *only one* sender? > but, allow for multiple recepients? > > -R > >

Re: [GENERAL] commit time in logical decoding

2016-03-01 Thread Alvaro Herrera
Weiping Qu wrote: > Hello Artur, > > Thank you for your reply. > Should it work in a stable version like Postgresql 9.4, since it's enough > for me and I don't care whether it's 9.6 or 9.5. > Nevertheless I will try it using 9.4. Yes, it was introduced by a commit that's in 9.5 and up only, so

Re: [GENERAL] multiple UNIQUE indices for FK

2016-03-01 Thread David G. Johnston
Sorry for the delay - used to getting replied-to-all on messages I send but you didn't and I didn't notice the response until now. On Mon, Feb 29, 2016 at 4:03 AM, Rafal Pietrak wrote: > > > > Partitioning and partial indexes both have considerable limitations that > > you

Re: [GENERAL] commit time in logical decoding

2016-03-01 Thread Weiping Qu
Hello Artur, Thank you for your reply. Should it work in a stable version like Postgresql 9.4, since it's enough for me and I don't care whether it's 9.6 or 9.5. Nevertheless I will try it using 9.4. Regards, Weiping On 01.03.2016 22:04, Artur Zakirov wrote: Hello, Weiping It seems that it

Re: [GENERAL] multiple UNIQUE indices for FK

2016-03-01 Thread Igor Neyman
W dniu 28.02.2016 o 03:35, David G. Johnston pisze: > W dniu 23.02.2016 o 09:39, Rafal Pietrak pisze: > > Can anybody suggest any other way out of this mass? > > > ​The only thought that sticks while reading your prose is:​ > > ​message > message-person < person​ > > >

Re: [GENERAL] commit time in logical decoding

2016-03-01 Thread Artur Zakirov
Hello, Weiping It seems that it is a bug. Thank you for report. I guess it will be fixed soon. On 01.03.2016 17:36, Weiping Qu wrote: Dear postgresql general mailing list, I am currently using the logical decoding feature (version 9.6 I think as far as I found in the source, wal_level:

[GENERAL] Custom column ordering

2016-03-01 Thread Steven Xu
Hi all,I'm trying to order some rows based on port names, a text column, using some domain-specific knowledge for Netdisco, an open-source application. In particular, I'm trying to do this without having to redo the entire design for the database. Note that in this database, there are no foreign

Re: [GENERAL] Does RAISE EXCEPTION rollback previous commands in a stored function?

2016-03-01 Thread Pavel Stehule
Hi 2016-03-01 19:41 GMT+01:00 Alexander Farber : > Good evening, > > in PostgreSQL 9.5 does RAISE EXCEPTION reliably rollback all previous > commands in a stored function? > > I have a stored function (the code is at the bottom), which takes a JSON > array of objects

Re: [GENERAL] Does RAISE EXCEPTION rollback previous commands in a stored function?

2016-03-01 Thread Andreas Kretschmer
> Alexander Farber hat am 1. März 2016 um 19:41 > geschrieben: > > > Good evening, > > in PostgreSQL 9.5 does RAISE EXCEPTION reliably rollback all previous > commands in a stored function? Yes. -- Sent via pgsql-general mailing list

[GENERAL] Does RAISE EXCEPTION rollback previous commands in a stored function?

2016-03-01 Thread Alexander Farber
Good evening, in PostgreSQL 9.5 does RAISE EXCEPTION reliably rollback all previous commands in a stored function? I have a stored function (the code is at the bottom), which takes a JSON array of objects as arguments. First it prepares some data and then loops through the JSON array and

Re: [GENERAL] Rules on View

2016-03-01 Thread Tom Lane
Sridhar N Bamandlapally writes: > Is there a way to avoid creating rule under creation of view ? If you mean the ON SELECT rule, no. A view basically *is* an ON SELECT rule; there's not very much else to it. What usefulness do you imagine you'd get from a view without ON

Re: [GENERAL] Anyone compare PG 9.5 and MongoDB 3.2?

2016-03-01 Thread pbj
Very helpful!!  Thanks!! On Tuesday, March 1, 2016 9:32 AM, Peter Devoy wrote: > MongoDB has released 3.2 with their WiredTiger storage.  Has anyone > benchmarked 9.5 against it, and for JSONB elements several MB in size? > > PJ Hi Paul I do not have an answer for

[GENERAL] commit time in logical decoding

2016-03-01 Thread Weiping Qu
Dear postgresql general mailing list, I am currently using the logical decoding feature (version 9.6 I think as far as I found in the source, wal_level: logical, max_replication_slot: > 1, track_commit_timestamp: on, I am not sure whether this will help or not). Following the online

Re: [GENERAL] Anyone compare PG 9.5 and MongoDB 3.2?

2016-03-01 Thread Peter Devoy
> MongoDB has released 3.2 with their WiredTiger storage. Has anyone > benchmarked 9.5 against it, and for JSONB elements several MB in size? > > PJ Hi Paul I do not have an answer for you but there is a great talk here in which someone explains why they moved from a NoSQL stack to Postgres:

[GENERAL] Anyone compare PG 9.5 and MongoDB 3.2?

2016-03-01 Thread Paul Jones
MongoDB has released 3.2 with their WiredTiger storage. Has anyone benchmarked 9.5 against it, and for JSONB elements several MB in size? PJ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] Rules on View

2016-03-01 Thread Sridhar N Bamandlapally
Hi Is there a way to avoid creating rule under creation of view ? please let me know Thanks Sridhar