Re: [GENERAL] Feature request: support queries with returning on simple views with automatic update

2013-10-10 Thread Michael Paquier
> it would be great if i could simply write 'insert into simple_view returning > col1' or 'insert into simple_view returning col2' and postgres would make the > magic behind. You can do it with 9.3~ servers already. Here is an example: =# create table aa (a int); CREATE TABLE =# insert into aa va

[GENERAL] postgresql9.1.6 core dump

2013-10-10 Thread hiroyuki shiga
Hello. I'm having problems postgesql coredump. Do you have any idea?. OS:Scientific Linux release 6.1 DB:postgresql91-9.1.6 MEM:4G (gdb) bt full #0 SearchCatCacheList (cache=0x1d70440, nkeys=1, v1=, v2=, v3=, v4=) at catcache.c:1450 hashValue = 1943050110 hashIndex = 19

Re: [GENERAL] I need more specific instructions for switching to digest mode for this list

2013-10-10 Thread Bob Futrelle
Me bad. It was right there in front me. I'm now in Digest Mode. - Bob On Wed, Oct 9, 2013 at 12:00 PM, Igor Neyman wrote: > > -Original Message- > > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > > ow...@postgresql.org] On Behalf Of Raymond O'Donnell > > Sent: Wed

Re: [GENERAL] streaming replication timeout error

2013-10-10 Thread 高健
Thank you all a lot! I have got it. Best regards 2013/10/10 Stuart Bishop > On Wed, Oct 9, 2013 at 9:58 AM, 高健 wrote: > > > The most important part is: > > > > 2013-09-22 09:52:47 JST[28297][51d1fbcb.6e89-2][0][XX000]FATAL: Could > not > > receive data from WAL stream: could not receive dat

Re: [GENERAL] Re: pg_upgrade unrecognized configuration parameter “unix_socket_directory”

2013-10-10 Thread Bruce Momjian
On Sun, Sep 29, 2013 at 07:12:43AM -0300, Clodoaldo Neto wrote: > Someone claims to have fixed it patching pg_upgrade: > > http://dba.stackexchange.com/a/50714/6978 > > Quoting: > > "My solution is to rebuild the pg_upgrade from sources, with update to file > contrib/pg_upgrade/server.c:199 wher

Re: [GENERAL] Donation

2013-10-10 Thread Joshua D. Drake
On 10/10/2013 03:01 PM, Bret Stern wrote: I'm amazed how complete pgAdmin, postgreSQL, all the interface options, and this forum works. It's time to reflect. I feel like donating. (Maybe I'll feel the same about our politicians someday) Nnn! Is https://www.postgresql.us/donate the place t

[GENERAL] Donation

2013-10-10 Thread Bret Stern
I'm amazed how complete pgAdmin, postgreSQL, all the interface options, and this forum works. It's time to reflect. I feel like donating. (Maybe I'll feel the same about our politicians someday) Nnn! Is https://www.postgresql.us/donate the place to donate? -- Sent via pgsql-general ma

Re: [GENERAL] postgreSQL query via JDBC in different OS taking different running time?

2013-10-10 Thread Merlin Moncure
On Mon, Oct 7, 2013 at 10:35 PM, Kevin Grittner wrote: > Aftab Ahmed Chandio wrote: > >> My query processes from JDBC (Java Program) to PostgreSQL. I use >> system time by invoking java function, I collect one time unit >> before the query statement perform and second after the execution >> of qu

Re: [GENERAL] ERROR: invalid value "????" for "YYYY"

2013-10-10 Thread Steve Crawford
On 10/09/2013 05:57 PM, Brian Wong wrote: But from a user's perspective, why would it ever make sense that by adding an additional where clause, it actually brings in more data into the picture? If I have query returning 100 rows. Adding an additional where clause should only cut down the num

[GENERAL] String reverse funtion?

2013-10-10 Thread ginkgo36
Hello everyone I have to reverse a string like EA;BX;CA to CA;BX;EA. or EA,BX,CA to CA,BX,EA Is there any function to do this? Thanks all! -- View this message in context: http://postgresql.1045698.n5.nabble.com/String-reverse-funtion-tp5773871.html Sent from the PostgreSQL - general maili

[GENERAL] pg_similarity

2013-10-10 Thread janek12
Now the Steps: $ USE_PGXS=1 make $ USE_PGXS=1 make install are working. But I still don't have the directory 'SHAREDIR/contrib/pg_similarity.sql'   Janek Sendrowski  

[GENERAL] A view representing a schedule for all days into the future

2013-10-10 Thread Adam Mackler
Hi: I recently posted a question on stackoverflow, but I suspect it may require specific PostgreSQL knowledge, so I'm cross-posting a reference to it here. http://stackoverflow.com/questions/19237450/can-sql-view-have-infinite-number-of-rows-repeating-schedule-each-row-a-day The gist is that I h

Re: [GENERAL] ERROR: invalid value "????" for "YYYY"

2013-10-10 Thread Rowan Collins
On 10/10/2013 01:57, Brian Wong wrote: And the extra data that's showing up is being added to the resultset cuz without the additional where clause, the result set did not contain any of those rows like pg_statistics/etc. To add to what Brain said on this already, the key thing is that Postgr

Re: [GENERAL] Can a view represent a schedule for all days into the future?

2013-10-10 Thread David Johnston
Adam Mackler-3 wrote > If someone can answer this challenge > without imposing that requirement, then I shall be all the more > impressed. Fair enough; my goal wasn't to complete a challenge but to actually be practical. > The library I'm using is SLICK: > > http://slick.typesafe.com/ > >

Re: [GENERAL] Can a view represent a schedule for all days into the future?

2013-10-10 Thread Merlin Moncure
On Thu, Oct 10, 2013 at 12:16 PM, Adam Mackler wrote: > Hi: > > I recently posted a question on stackoverflow, but I suspect it may > require specific PostgreSQL knowledge, so I'm cross-posting a > reference to it here. > > http://stackoverflow.com/questions/19237450/can-sql-view-have-infinite-num

Re: [GENERAL] Can a view represent a schedule for all days into the future?

2013-10-10 Thread Adam Mackler
On Thu, Oct 10, 2013 at 10:42:47AM -0700, David Johnston wrote: > Adam Mackler-3 wrote > > http://stackoverflow.com/questions/19237450/can-sql-view-have-infinite-number-of-rows-repeating-schedule-each-row-a-day > > > Not sure how you can state "But I'm willing to agree never to query such a > view

Re: [GENERAL] Why doesn't update syntax match insert syntax?

2013-10-10 Thread Marc Mamin
> On Thu, Oct 10, 2013 at 10:03 AM, Rob Richardson > wrote: > > > UPDATE inner_covers > > SET X = (SELECT sl.X FROM storage_locations sl where sl.name = > > inner_covers.name), > > Y = (SELECT sl.Y FROM storage_locations sl where sl.name = > > inner_covers.name) > > > > Or is there another, mor

Re: [GENERAL] Can a view represent a schedule for all days into the future?

2013-10-10 Thread David Johnston
Adam Mackler-3 wrote > http://stackoverflow.com/questions/19237450/can-sql-view-have-infinite-number-of-rows-repeating-schedule-each-row-a-day > > I currently have a user-defined function that returns the results I > want, but the problem is in the invocation: Some host-language client > libraries

[GENERAL] Can a view represent a schedule for all days into the future?

2013-10-10 Thread Adam Mackler
Hi: I recently posted a question on stackoverflow, but I suspect it may require specific PostgreSQL knowledge, so I'm cross-posting a reference to it here. http://stackoverflow.com/questions/19237450/can-sql-view-have-infinite-number-of-rows-repeating-schedule-each-row-a-day The gist is that I h

Re: [GENERAL] Segmentation fault: pg_upgrade 9.1 to 9.3: pg_dump: row number 0 is out of range 0..-1

2013-10-10 Thread Bruce Momjian
On Sat, Sep 14, 2013 at 09:40:01PM -0400, Robert Nix wrote: > Running a pg_upgrade task is causing Segmentation fault: > > command: "/usr/lib/postgresql/9.3/bin/pg_dump" --host "/var/lib/postgresql" > --port 50432 --username "postgres" --schema-only --quote-all-identifiers > --binary-upgrade --for

Re: [GENERAL] Tree structure

2013-10-10 Thread Kaare Rasmussen
Hi Rémi Hey sorry if my answer is stupid, but there is an extension for array, even if it is limited to int (but int could be indexes of row) It's named http://www.postgresql.org/docs/9.3/static/intarray.html It provides essential function, although lacking some (I re-implemented union of arra

Re: [GENERAL] Tree structure

2013-10-10 Thread Rémi Cura
Hey sorry if my answer is stupid, but there is an extension for array, even if it is limited to int (but int could be indexes of row) It's named http://www.postgresql.org/docs/9.3/static/intarray.html It provides essential function, although lacking some (I re-implemented union of array with disjoi

Re: [GENERAL] Why doesn't update syntax match insert syntax?

2013-10-10 Thread Merlin Moncure
On Thu, Oct 10, 2013 at 10:03 AM, Rob Richardson wrote: > I've been curious about this for a long time. The syntax for an INSERT query > is often much easier to use, in my opinion, then the syntax for an UPDATE > query. For example, and this is what I am trying to do, assume you have a > tabl

[GENERAL] Why doesn't update syntax match insert syntax?

2013-10-10 Thread Rob Richardson
I've been curious about this for a long time. The syntax for an INSERT query is often much easier to use, in my opinion, then the syntax for an UPDATE query. For example, and this is what I am trying to do, assume you have a table of inner covers containing a name field and fields named x and

Re: [GENERAL] Tree structure

2013-10-10 Thread Kaare Rasmussen
Hi Merlin On Thu, Oct 10, 2013 at 1:00 AM, Kaare Rasmussen wrote: I'm quite surprised there seem to be no way in core to treat an array as an array. Using @> treats it as a set, AFAICT. can you elaborate on that? merlin To me, an array is a vector (or a vector of vectors). So I'm looking f

Re: [GENERAL] Re: [GENERAL] Forms for entering data into postgresql

2013-10-10 Thread Merlin Moncure
On Wed, Oct 9, 2013 at 9:24 PM, Adrian Klaver wrote: > On 10/09/2013 07:05 PM, Sudhir P.B. wrote: >> >> I have developed an application using MS SQL. I have used MS Access for >> creating forms to enter data into the database. I am thinking of >> changing over to postgresql and would also like to

[GENERAL] Feature request: support queries with returning on simple views with automatic update

2013-10-10 Thread Attila Soki
hi all, the automatic update for views is really a helpful feature, but i think it would be more useful with returning support. currently we have to construct a rule/trigger to support queries like 'insert into simple_view returning pk' is it possible (or desired) to implement something like an

Re: [HACKERS] [GENERAL] Urgent Help Required

2013-10-10 Thread Kevin Grittner
Chris Travers wrote: > John R Pierce wrote: > I often find in those cases it is a choice between vacuum full > and dumpall/initdb/reload/analyze. Way back in the 8.1 days I often found CLUSTER to be my best option -- as long as I had room enough for a second copy (without the bloat) while i

Re: [GENERAL] Tree structure

2013-10-10 Thread Merlin Moncure
On Thu, Oct 10, 2013 at 1:00 AM, Kaare Rasmussen wrote: > Sorry, got tangled up in this thing called 'real life'. > > >> If I understand you correctly, you want a prefix match, and sure there's >> a PostgreSQL extension for that: > > > OK, that seems to do the job, thanks a lot. The only small qui

Re: [GENERAL] streaming replication timeout error

2013-10-10 Thread Stuart Bishop
On Wed, Oct 9, 2013 at 9:58 AM, 高健 wrote: > The most important part is: > > 2013-09-22 09:52:47 JST[28297][51d1fbcb.6e89-2][0][XX000]FATAL: Could not > receive data from WAL stream: could not receive data from server: connection > timeout > scp: /opt/PostgresPlus/9.2AS/data/arch/00AC01F1

Re: [GENERAL] Schema Search Path Problem

2013-10-10 Thread Pavel Stehule
Hello 2013/10/10 Kalai R > Hi, > > I am developing .Net application using PSQL. I am using npgsql to connect > PSQL database. In single database I have more than one schemas. After I > connect database I set search path using "Set Searchpath command" for the > required schema. It works perfectl

Re: [GENERAL] Incorrect index being used

2013-10-10 Thread Jesse Long
On 09/10/2013 18:06, Tom Lane wrote: Jesse Long writes: The query runs for much longer than I expect it to run for, and I think this is due to it using the incorrect subplan. As you can see, subplans 1 and 3 make use of and index, but these subplans are not used. Subplans and 4 are seqscan, an

[GENERAL] Schema Search Path Problem

2013-10-10 Thread Kalai R
Hi, I am developing .Net application using PSQL. I am using npgsql to connect PSQL database. In single database I have more than one schemas. After I connect database I set search path using "Set Searchpath command" for the required schema. It works perfectly. But after sometime, I need to change

Re: [GENERAL] Incorrect index being used

2013-10-10 Thread Jesse Long
On 09/10/2013 15:20, Albe Laurenz wrote: Jesse Long wrote: There is no problem with row visibility, there is only one connection to the database - the connection I am using to do these selects. No idea why the plans cannot be used. It might be helpful to see the table and index definitions.

Re: [HACKERS] [GENERAL] Urgent Help Required

2013-10-10 Thread Chris Travers
On Wed, Oct 9, 2013 at 7:04 PM, John R Pierce wrote: > On 10/8/2013 8:35 AM, Chris Travers wrote: > >> First, while vacuum is usually preferred to vacuum full, in this case, I >> usually find that vacuum full clears up enough cruft to be worth it (not >> always, but especially if you are also hav