[GENERAL] SQL question on chunking aggregates

2014-03-04 Thread Owen Hartnett
Hi all: I have a table that has multiple records for a single owner_id. I'm able to use array_arg to combine the records into a single row, which works fine. I'm using this sql: select owner_id, array_agg(trim(maplot)), array_agg(revallandvalue + revalbuildingvalues) from parcel group by

Re: [GENERAL] Re: PG fails on Windows Server 2008: could not reattach to shared memory ... : 487

2010-02-04 Thread Owen Hartnett
On Aug 9, 2009, at 3:10 PM, Magnus Hagander wrote: On Sun, Aug 9, 2009 at 10:22, Abraham, Dannydanny_abra...@bmc.com wrote: Does anybody have a proven way to regenerate this problem? SO that I can tell that the patch really does fix it? No. That's the reason it has taken so long to

Re: [GENERAL] Re: PG fails on Windows Server 2008: could not reattach to shared memory ... : 487

2010-02-04 Thread Owen Hartnett
On Feb 4, 2010, at 3:47 PM, Magnus Hagander wrote: 2010/2/4 Owen Hartnett o...@clipboardinc.com: On Aug 9, 2009, at 3:10 PM, Magnus Hagander wrote: On Sun, Aug 9, 2009 at 10:22, Abraham, Dannydanny_abra...@bmc.com wrote: Does anybody have a proven way to regenerate this problem? SO

Re: [GENERAL] Functions returning multiple rowsets

2009-09-28 Thread Owen Hartnett
On Sep 28, 2009, at 3:31 PM, Mike Christensen wrote: One thing I like about Microsoft SQL is you can write a sproc that does: SELECT * FROM TableA SELECT * FROM TableB And in .NET, you'll have a DataSet object with two DataTables, one for each table. Do either of the techniques outlined

Re: [GENERAL] Attempting to connect

2009-02-17 Thread Owen Hartnett
At 3:34 PM -0800 2/15/09, Bob Pawley wrote: Finally Success Thanks everyone Here's one I ran into today - connection with the server was blocked by Kasperski Anti-Virus. The clue was that other machines on the network could connect, but this one couldn't. Funny thing was that we had

[GENERAL] libpq on iPhone?

2009-02-02 Thread Owen Hartnett
I've been able to use the libpq libraries on the iPhone simulator, but I need to compile it on the ARM processor to actually run it on an iPhone. It seems my choices are: 1) add the relevant .c files to the iPhone XCode project and try to get the conditional macros and configuration

[GENERAL] pg_dump restore as transaction?

2008-12-01 Thread Owen Hartnett
If my perusal of the sql generated by pg_dump is correct, then it doesn't appear that it's wrapped in a transaction, and thus might be able to only complete a partial restore? Or does psql myDatabase mypg_dumpfile wrap the file stream in a transaction? If not, is there a reason why it

Re: [GENERAL] pg_dump restore as transaction?

2008-12-01 Thread Owen Hartnett
At 12:37 PM -0500 12/1/08, Tom Lane wrote: Owen Hartnett [EMAIL PROTECTED] writes: If my perusal of the sql generated by pg_dump is correct, then it doesn't appear that it's wrapped in a transaction, and thus might be able to only complete a partial restore? That's correct, and intentional

Re: [GENERAL] Question on libpq parameters

2008-11-30 Thread Owen Hartnett
At 1:26 PM -0500 11/30/08, Tom Lane wrote: Owen Hartnett [EMAIL PROTECTED] writes: Yes, it did. I'm confused. My first parameter is a string, but the following two are integers. I thought the paramType parameter indicated the type. Do the integers need to be sprintf'd to strings? Yes

[GENERAL] Question on libpq parameters

2008-11-29 Thread Owen Hartnett
The following libpq code chokes on me with invalid input to an integer parameter (state == PGRES_FATAL_ERR aPtr == Error: Invalid Input syntax for integer . It fails on the call to PQexecPrepared. I suspect I'm not doing the parameters right. Can anyone spot anything wrong? Thanks,

Re: [GENERAL] Question on libpq parameters

2008-11-29 Thread Owen Hartnett
At 11:45 PM -0500 11/29/08, Tom Lane wrote: Owen Hartnett [EMAIL PROTECTED] writes: The following libpq code chokes on me with invalid input to an integer parameter (state == PGRES_FATAL_ERR aPtr == Error: Invalid Input syntax for integer . It fails on the call to PQexecPrepared. I

Re: [GENERAL] postgresql and Mac OS X

2008-11-08 Thread Owen Hartnett
At 7:51 PM -0500 11/7/08, Tom Allison wrote: adam_pgsql wrote: When I do the install script in contrib it says I have no rights to the directory. It was in /usr/local/pgsql/data/log and I changed it to /usr/local/pgsql/log. It was set as root.wheel with 755 permissions so I suspect it's mad

Re: [GENERAL] Strange Postgresql behavior solved

2008-07-26 Thread owen hartnett
On Jul 26, 2008, at 2:32 AM, Leif B. Kristensen [EMAIL PROTECTED] wrote: On Saturday 26. July 2008, Owen Hartnett wrote: Probably some funky stuff with the router (not one of their expensive ones) that caused all the consternation, but I originally thought corrupt database (because I could

[GENERAL] Strange Postgresql behavior solved

2008-07-25 Thread Owen Hartnett
I spent a day on this, and it's really not a PostgreSQL issue, but I thought I'd post it in case someone else comes down with it. Scenario: I moved the physical location and networking environment of the server. It's on Mac OS X - XServe, but that isn't germaine to the story. Originally,

[GENERAL] Finding records that are not there

2008-05-22 Thread Owen Hartnett
Hi: This is gotta be elementary SQL 101, but I'm having a mental block as to why this doesn't work. I have two tables that have identical index fields, maplot and unitno, (both indexes span two columns) and I want to find all the records in the commcost table that don't have a

Re: [GENERAL] Finding records that are not there

2008-05-22 Thread Owen Hartnett
At 6:47 PM +0200 5/22/08, hubert depesz lubaczewski wrote: On Thu, May 22, 2008 at 12:21:35PM -0400, Owen Hartnett wrote: The SQL I've tried is: select commcost.maplot, commcost.unitno from commcost where not exists(select 1 from commcost, bldg where commcost.maplot = bldg.maplot

Re: [GENERAL] Linux v.s. Mac OS-X Performance

2007-12-01 Thread Owen Hartnett
At 6:15 PM -0500 11/30/07, Greg Smith wrote: On Fri, 30 Nov 2007, Guido Neitzer wrote: Actually - In our test if just used with a similar load as pgbench (e.g. typical web applications) Mac OS X 10.4.7 performed better then Yellow Dog Linux (I was testing with G5 hardware) on the same

Re: [GENERAL] POLL: Women-sized t-shirts for PostgreSQL

2007-11-22 Thread Owen Hartnett
At 3:30 PM -0800 11/21/07, Selena Deckelmann wrote: Hello, I have been looking into getting some woman-sized PostgreSQL shirts, in addition to the more typical men-sized tshirts. The particular style is American Apparel shirts, style # 2102. They are normal looking t-shirts, just proportioned a

Re: [GENERAL] Generating subtotal reports direct from SQL

2007-10-10 Thread Owen Hartnett
At 1:32 AM +0100 10/10/07, Gregory Stark wrote: Owen Hartnett [EMAIL PROTECTED] writes: Such that the final table has additional subtotal rows with the aggregate sum of the amounts. I'm thinking I can generate two tables and merge them, but is there an easier way using a fancy Select

[GENERAL] Generating subtotal reports direct from SQL

2007-10-09 Thread Owen Hartnett
I'm hoping there's a real easy way of doing this that I'm just missing: Given a Select statement such as: Select ID, code, amount from foo where code 10; that gives me a table like this: ID codeamount _ 1 4 20 2

[GENERAL] Request for feature: pg_dump schema masquerade flag

2007-09-28 Thread Owen Hartnett
I don't think this would be too hard to effect: When pg_dumping a schema, have an additional flag -m newschemaname, that would convert all references in the dump from the original schema to the new schema name. Thus the command: pg_dump -c -s myoldschemaname -m mynewschemaname mydatabase

Re: [GENERAL] problem with transactions in VB.NET using npgsql

2007-09-05 Thread Owen Hartnett
At 10:14 AM -0400 8/28/07, Owen Hartnett wrote: At 7:05 PM -0400 8/27/07, Tom Lane wrote: Owen Hartnett [EMAIL PROTECTED] writes: I assign the transaction object to each of the commands, but it seems that some tables will get updated, even when I call rollback. Is something I'm calling

Re: [GENERAL] problem with transactions in VB.NET using npgsql

2007-09-05 Thread Owen Hartnett
At 11:32 AM -0400 9/5/07, Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Owen Hartnett wrote: I've been able to turn on statement logging (I've set log_statement to 'all'), but it doesn't seem to show the begin transaction - commit - rollback statements. Is there another way

Re: [GENERAL] problem with transactions in VB.NET using npgsql

2007-09-05 Thread Owen Hartnett
At 12:41 PM -0400 9/5/07, Owen Hartnett wrote: At 11:32 AM -0400 9/5/07, Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Owen Hartnett wrote: I've been able to turn on statement logging (I've set log_statement to 'all'), but it doesn't seem to show the begin transaction - commit

Re: [GENERAL] postgresql connection string to Vb.NET

2007-08-29 Thread Owen Hartnett
At 8:49 AM -0700 8/29/07, smithveg wrote: Hi, I got a source of connection string at this page, http://www.connectionstrings.com/default.aspx?carrier=postgresqlhttp://www.connectionstrings.com/default.aspx?carrier=postgresql I can't test it because it seems i do not add a reference in visual

Re: [GENERAL] problem with transactions in VB.NET using npgsql

2007-08-28 Thread Owen Hartnett
At 7:05 PM -0400 8/27/07, Tom Lane wrote: Owen Hartnett [EMAIL PROTECTED] writes: I assign the transaction object to each of the commands, but it seems that some tables will get updated, even when I call rollback. Is something I'm calling secretly calling commit somewhere? Dunno anything

[GENERAL] problem with transactions in VB.NET using npgsql

2007-08-27 Thread Owen Hartnett
Maybe someone here can figure it out. Everything updates fine with this code, except where there's an exception, it's not rolling back by the transaction. What I'm trying to do: Begin a transaction Do the update, insert, delete checks on each of the data tables, using a different

[GENERAL] Take your postgresSql on the road, and live to tell of it.

2007-08-07 Thread Owen Hartnett
Here's what I want to do: Checkpoint the database in whatever way is appropriate. Make copies of the database on several laptops for use in the field (in automobiles) to do database changes. Record all the changes made since the checkpoint as the user makes them. Periodically take all the

Re: [GENERAL] Take your postgresSql on the road, and live to tell of it.

2007-08-07 Thread Owen Hartnett
At 2:15 PM -0700 8/7/07, Ben wrote: How many users do you have? Have you considered giving each user a schema in which to make their changes? It sounds like you don't really have a multi-master replication issue, which makes things easier. Maybe I'm not understanding the strategy, but I

Re: [GENERAL] Take your postgresSql on the road, and live to tell of it.

2007-08-07 Thread Owen Hartnett
At 5:13 PM -0500 8/7/07, Scott Marlowe wrote: On 8/7/07, Owen Hartnett [EMAIL PROTECTED] wrote: Here's what I want to do: Checkpoint the database in whatever way is appropriate. Make copies of the database on several laptops for use in the field (in automobiles) to do database changes

Re: [GENERAL] Linux distro

2007-08-01 Thread Owen Hartnett
At 4:52 PM +0200 8/1/07, Leif B. Kristensen wrote: On Wednesday 1. August 2007 16:15, Madison Kelly wrote: /Personally/, I love Debian on servers. It's not quite as 'hardcore' as Gentoo (a great distro, but not one to start with!). It's the foundation of many of the popular distros (Ubuntu,

Re: [GENERAL] PostGreSQL for a small Desktop Application

2007-06-13 Thread Owen Hartnett
At 12:34 PM +0200 6/13/07, Magnus Hagander wrote: On Mon, Jun 11, 2007 at 10:44:38AM -0700, Gabriele wrote: I'm going to develop a medium sized business desktop client server application which will be deployed mostly on small sized networks and later eventually, hopefully, on medium sized

Re: NULLS and User Input WAS Re: [GENERAL] multimaster

2007-06-04 Thread Owen Hartnett
At 12:37 AM +0200 6/4/07, PFC wrote: Yeah, it is awful ;^) However the existing system is equally awful because there is no way to enter NULL! Consider this form : First name :Edgar Middle name : J. Last name : Hoover Now, if someone has no middle name, like John Smith, should we

[GENERAL] Turning on logging

2007-06-02 Thread Owen Hartnett
I know this is in the docs somewhere, and it's probably staring me in the face, but I haven't been able to find it: I'm running 8.2.4 through npgsql - how do I log: 1) connections to the database 2) updates, deletes, adds Is this set in the ./configuration? Or in the startup command

Re: [GENERAL] Schema as versioning strategy

2007-04-26 Thread Owen Hartnett
At 9:23 AM +0100 4/26/07, Richard Huxton wrote: Jonathan Vanasco wrote: On Apr 25, 2007, at 2:05 PM, Richard Huxton wrote: Owen Hartnett wrote: I want to freeze a snapshot of the database every year (think of end of year tax records). However, I want this frozen version (and all

[GENERAL] Schema as versioning strategy

2007-04-25 Thread Owen Hartnett
Hi: I'm a new user of Postgresql (8.2.3), and I'm very happy with both the performance and operation of the system. My compliments to you the many authors who keep this database running and useful. My question is: I want to freeze a snapshot of the database every year (think of end of