Re: [GENERAL] PostgreSQL vs Mongo

2013-10-17 Thread Bill Moran
If they pull out the Mongo is faster than PostgreSQL card, I'll state that I investigated this for my current employer and with roughly equivalent configurations (because it's impossible to get exactly equivalent) I was getting roughly the same performance from each. It's difficult to measure

Re: [GENERAL] PostgreSQL vs Mongo

2013-10-17 Thread Serge Fonville
One of the strengths/weaknesses of Mongo are with the similarity between code and access. This simplifies development from a developer's perspective, but complicates from an administrator perspective. If you want an informed opinion, ask the same question on the Mongo mailing list. Also look into

Re: [GENERAL] pg_similarity

2013-10-17 Thread sachin kotwal
I tried the installation as suggested at http://pgsimilarity.projects.pgfoundry.org/ after make install command we have run following command:- psql -f SHAREDIR/contrib/pg_similarity.sql mydb Here SHAREDIR is /usr/local/pgsql/share/extension/ under this directory we can see file

Re: [GENERAL] C-language stored function and float4 type

2013-10-17 Thread sachin kotwal
How you checked result type? Can you explain in details? - Thanks and Regards, Sachin Kotwal NTT-DATA-OSS Center (Pune) -- View this message in context: http://postgresql.1045698.n5.nabble.com/C-language-stored-function-and-float4-type-tp5773493p5774840.html Sent from the PostgreSQL -

[GENERAL] Index creation fails with automatic names

2013-10-17 Thread Florian Nigsch
Hi all, I am not sure if this is a bug or a misuse on my part. I am creating a number of indices in parallel on a table by using xargs. To do that, I write all my indices in a file indices.idx, and then have the indices build in parallel (in this case with 5 concurrent processes) cat

[GENERAL] Idle transactions in PostgreSQL 9.2.4

2013-10-17 Thread Svetlin Manavski
Hi all, I have some idle transactions in PostgreSQL 9.2.4 server which never end. My application was working fine on version 9.1 (BSD) but the problem appeared immediately as we ported it to 9.2.4 on Linux. The idle operations would frequently appear as COMMITs but sometimes I observed INSERTS as

[GENERAL] Remove or alter the default access privileges of the public schema by the database owner

2013-10-17 Thread Christian Affolter
Hi everyone I'm looking for a way to let a role which created a new database (is the database owner) change (remove) the default access privileges of the public schema, which allows everyone to use and create objects within this schema. I do not want to give the role the SUPERUSER option.

[GENERAL] Help function to sort string

2013-10-17 Thread ginkgo36
Hi everyone, Please hepl me this function: 1. I want to sort string follow anphabet and I used this query: select string_agg(x, ';') from (select trim(unnest(regexp_split_to_array('ECD FORM; BODY; PREDILUTED; CHROMO-GENIC; AUTO;RABBIT; FORMAT',';'))) x order by x) a; -- result: AUTO; BODY;

Re: [GENERAL] C-language stored function and float4 type

2013-10-17 Thread whiplash
Sorry, I created an overloaded function and forgot about it. whiplash whipl...@bss.org.ua writes: Hello! I have C-language stored function like this: CREATE FUNCTION testfunc ( x real, y real ) RETURNS real AS 'testfunc' LANGUAGE C STRICT; If i use this function (SELECT testfunc ( 0.1, 0.2 )) I

[GENERAL] Missing record in binary replica 9.3.0

2013-10-17 Thread Kaveh Mousavi Zamani
All, I found something in the following setup: I have 3 DBS db01 (9.3.0) master db02 (9.3.0) replica same network db03 (9.3.0) sync replica another network 80ms away. db01 have around 30 - 300 records per second update. At some point today I found there is a missing record in both replica.

Re: [GENERAL] Index creation fails with automatic names

2013-10-17 Thread Vick Khera
On Mon, Oct 14, 2013 at 6:31 AM, Florian Nigsch f...@nigsch.eu wrote: My question is then - where does this error come from? Is is because Postgres allocates the same name (table1_lower_idx) twice when the index begins building, because at that time there's no index present with that name?

Re: [GENERAL] Index creation fails with automatic names

2013-10-17 Thread Ian Lawrence Barwick
2013/10/14 Florian Nigsch f...@nigsch.eu: Hi all, I am not sure if this is a bug or a misuse on my part. I am creating a number of indices in parallel on a table by using xargs. To do that, I write all my indices in a file indices.idx, and then have the indices build in parallel (in this

[GENERAL] Missing record in binary replica 9.3.0

2013-10-17 Thread Kaveh Mousavi Zamani
All, I found something in the following setup: I have 3 DBS db01 (9.3.0) master db02 (9.3.0) replica same network db03 (9.3.0) sync replica another network 80ms away. db01 have around 30 - 300 records per second update. At some point today I found there is a missing record in both replica.

Re: [GENERAL] Remove or alter the default access privileges of the public schema by the database owner

2013-10-17 Thread Christian Affolter
Hello Please accept my apologies for the double posting. The original mail was held off by the Majordomo mailing list software until a mailing list administrator would allow it to be delivered. Majordomo doesn't like the string 'remove' within the subject. Thereupon, I informed the mailing

Re: [GENERAL] Index creation fails with automatic names

2013-10-17 Thread Merlin Moncure
On Mon, Oct 14, 2013 at 5:31 AM, Florian Nigsch f...@nigsch.eu wrote: Hi all, I am not sure if this is a bug or a misuse on my part. I am creating a number of indices in parallel on a table by using xargs. To do that, I write all my indices in a file indices.idx, and then have the indices

[GENERAL] COPY table FROM STDIN doesn't show count tag

2013-10-17 Thread Tim Kane
According to the docs, the output of a copy command should return a COPY count. It turns out this only happens when copying from a file, and not from STDIN. Outputs On successful completion, a COPY command returns a command tag of the form COPY count The count is the number of rows copied.

Re: [GENERAL] Idle transactions in PostgreSQL 9.2.4

2013-10-17 Thread Victor Yegorov
2013/10/15 Svetlin Manavski svetlin.manav...@itrinegy.com I have some idle transactions in PostgreSQL 9.2.4 server which never end. My application was working fine on version 9.1 (BSD) but the problem appeared immediately as we ported it to 9.2.4 on Linux. The idle operations would frequently

[GENERAL] Strange results with pg_restore

2013-10-17 Thread Oscar Calderon
Have a good day. This friday i'm going to migrate an entire database of a government institution in my country. Those are like 4 database of 2GB each one. So, i was preparing about what i'm going to do tomorrow. They currently have PostgreSQL 9.1 installed from source i think, and they will update

[GENERAL] day_trunc and day duration in a remote time zone

2013-10-17 Thread Marc Mamin
Hello, I want to retrieve the day start and duration of an epoch within a given time zone and return the day start as epoch. the queries below works as expected, but I would appreciate a simpler solution ... example: ( http://localtimes.info/Europe/Cyprus/Nicosia/ ) select

Re: [GENERAL] day_trunc and day duration in a remote time zone

2013-10-17 Thread Adrian Klaver
On 10/17/2013 08:47 AM, Marc Mamin wrote: Hello, I want to retrieve the day start and duration of an epoch within a given time zone and return the day start as epoch. Not quite sure what you are looking for, but something like: hplc= select current_date::timestamp, extract(epoch from

Re: [GENERAL] PostgreSQL vs Mongo

2013-10-17 Thread David Kerr
On Wed, Oct 16, 2013 at 09:30:59AM -0600, CS DBA wrote: - All; - - One of our clients is talking about moving to Mongo for their - reporting/data mart. I suspect the real issue is the architecture of - their data mart schema, however I don't want to start pushing back if I - can't back it up.

Re: [GENERAL] Index creation fails with automatic names

2013-10-17 Thread Kevin Grittner
Merlin Moncure mmonc...@gmail.com wrote: On Mon, Oct 14, 2013 at 5:31 AM, Florian Nigsch f...@nigsch.eu wrote: I am creating a number of indices in parallel on a table by using xargs. To do that, I write all my indices in a file indices.idx, and then have the indices build in parallel (in

Re: [GENERAL] Index creation fails with automatic names

2013-10-17 Thread Kevin Grittner
Ian Lawrence Barwick barw...@gmail.com wrote: It works fine for me on Pg 9.3.1: postgres=# CREATE TABLE foo(val1 text, val2 text); CREATE TABLE postgres=# CREATE INDEX on foo((lower(val1))); CREATE INDEX postgres=# CREATE INDEX on foo((lower(val2))); CREATE INDEX You seem to be creating

[GENERAL] when do I analyze after concurrent index creation?

2013-10-17 Thread AI Rumman
Hi, I have a very basic question. If I create index concurrently, then do I need to analyze the table? If yes, when? Please let me know. Thanks.

Re: [GENERAL] Need some help on Performance 9.0.4

2013-10-17 Thread Tomas Vondra
On 17.10.2013 20:56, akp geek wrote: got the output from depesz and this the top on the system. thanks for the help .. From depesz? That site works differently - you enter the explain plan into the form, it does some formatting/highlighting and you're supposed to submit the link to that page.

[GENERAL] How do I create a box from fields in a table?

2013-10-17 Thread Rob Richardson
I need to determine whether a given pair of coordinates is inside a given rectangle. According to the documentation, PostgreSQL provides the box and point types and a contains operator that will be perfect for this. However, the example provided in the documentation only shows the creation of

Re: [GENERAL] How do I create a box from fields in a table?

2013-10-17 Thread Merlin Moncure
On Thu, Oct 17, 2013 at 4:04 PM, Rob Richardson rdrichard...@rad-con.com wrote: I need to determine whether a given pair of coordinates is inside a given rectangle. According to the documentation, PostgreSQL provides the box and point types and a contains operator that will be perfect for

[GENERAL] [ADMIN] what's the efficient/safest way to convert database character set ?

2013-10-17 Thread Huang, Suya
Hi, I've got a question of converting database from ascii to UTF-8, what's the best approach to do so if the database size is very large? Detailed procedure or experience sharing are much appreciated! Thanks, Suya

Re: [GENERAL] werid errorindex row size 3040 exceeds btree maximum, 2712 occur randomly

2013-10-17 Thread Huang, Suya
Thanks Tomas! I'll spend some time on the link you sent, new learner of Postgres :-) Thanks, Suya -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Tomas Vondra Sent: Wednesday, October 16, 2013 9:06 AM To:

Re: [GENERAL] Index creation fails with automatic names

2013-10-17 Thread Ian Lawrence Barwick
2013/10/18 Kevin Grittner kgri...@ymail.com: Ian Lawrence Barwick barw...@gmail.com wrote: It works fine for me on Pg 9.3.1: postgres=# CREATE TABLE foo(val1 text, val2 text); CREATE TABLE postgres=# CREATE INDEX on foo((lower(val1))); CREATE INDEX postgres=# CREATE INDEX on

Re: [GENERAL] [ADMIN] what's the efficient/safest way to convert database character set ?

2013-10-17 Thread Steve Atkins
On Oct 17, 2013, at 3:13 PM, Huang, Suya suya.hu...@au.experian.com wrote: Hi, I’ve got a question of converting database from ascii to UTF-8, what’s the best approach to do so if the database size is very large? Detailed procedure or experience sharing are much appreciated! The

Re: [GENERAL] [ADMIN] what's the efficient/safest way to convert database character set ?

2013-10-17 Thread John R Pierce
On 10/17/2013 3:13 PM, Huang, Suya wrote: I’ve got a question of converting database from ascii to UTF-8, what’s the best approach to do so if the database size is very large? Detailed procedure or experience sharing are much appreciated! I believe you will need to dump the whole database,

Re: [GENERAL] [ADMIN] what's the efficient/safest way to convert database character set ?

2013-10-17 Thread Huang, Suya
Thanks Steve, Yes, we're using SQL_ASCII. Would you please be more specific about manual data cleanup work here? I'm new to Postgres and don't have any experience in character set conversion before, so any specific experience shared would be very much appreciated. Thanks, Suya -Original

Re: [GENERAL] [ADMIN] what's the efficient/safest way to convert database character set ?

2013-10-17 Thread Adrian Klaver
On 10/17/2013 08:51 PM, Huang, Suya wrote: Thanks Steve, Yes, we're using SQL_ASCII. Would you please be more specific about manual data cleanup work here? I'm new to Postgres and don't have any experience in character set conversion before, so any specific experience shared would be very

Re: [GENERAL] [ADMIN] what's the efficient/safest way to convert database character set ?

2013-10-17 Thread Huang, Suya
Forgot to mention, we're using a very old version which is 8.3.11. I'll take a look at the guide for 8.3 with similar section. Thanks Adrian! -Original Message- From: Adrian Klaver [mailto:adrian.kla...@gmail.com] Sent: Friday, October 18, 2013 3:05 PM To: Huang, Suya; Steve Atkins;

Re: [GENERAL] [ADMIN] what's the efficient/safest way to convert database character set ?

2013-10-17 Thread Huang, Suya
Yes John, we probably will use a new database server here to accommodate those converted database. By saying export/import, do you mean by : 1. pg_dump (//should I specify -E UTF 8 to dump the data in UTF-8 encoding?) 2. create database xxx -E UTF8 3. pg_restore I also see someone's doing

Re: [GENERAL] [ADMIN] what's the efficient/safest way to convert database character set ?

2013-10-17 Thread John R Pierce
On 10/17/2013 9:49 PM, Huang, Suya wrote: Yes John, we probably will use a new database server here to accommodate those converted database. By saying export/import, do you mean by : 1. pg_dump (//should I specify -E UTF 8 to dump the data in UTF-8 encoding?) 2. create database xxx -E UTF8

Re: [GENERAL] [ADMIN] what's the efficient/safest way to convert database character set ?

2013-10-17 Thread Huang, Suya
Hi John, Is it UTF8 data stored in SQL_ASCII or is it LATIN1 (ISO-8859) ? or some sort of Big5 or euc_cn ? or what? if it is already UTF8 data, are you sure that there are no invalid encodings accidentally stored? Postgres with SQL_ASCII does no character validation... if its all