[GENERAL] Memory Management in pqlib, Garbage Collection support

2012-05-03 Thread Alexander Reichstadt
Hi, since I got no answer so far I searched through the docu again. I searched for GC as well as Garbage, and all garbage refers to is with regard to vacuuming a database. But my question refers to wether or not memory management is with garbage collection supported or not. When I try to link

Re: [GENERAL] SQLSTATE XX000 Internal Error 7

2012-05-03 Thread Martijn van Oosterhout
On Thu, May 03, 2012 at 02:46:16PM +0800, Ben Madin wrote: > (PS How did you come to deciding that it was EINVAL - is that 'Error INVALid > argument'?) It's one of the standard error codes, see for example http://www.jbox.dk/sanos/source/include/errno.h.html Tom is right, it's not clear how this

Re: [GENERAL] Memory Management in pqlib, Garbage Collection support

2012-05-03 Thread Peter Bex
On Thu, May 03, 2012 at 09:08:53AM +0200, Alexander Reichstadt wrote: > > Hi, > > since I got no answer so far I searched through the docu again. I searched > for GC as well as Garbage, and all garbage refers to is with regard to > vacuuming a database. But my question refers to wether or not m

Re: [GENERAL] Uppercase to lowercase trigger?

2012-05-03 Thread Chrishelring
Maybe I should clarify what I mean. I have a db (postgresql 8.4.1 with a postGIS spatial extension) with about 200+ tables in it. Some of them is supposed to be updated using an application what requres that some of the columns are in uppercase (a leftover from Oracle I suppose) but the main appl

Re: [GENERAL] Memory Management in pqlib, Garbage Collection support

2012-05-03 Thread John R Pierce
On 05/03/12 12:08 AM, Alexander Reichstadt wrote: since I got no answer so far I searched through the docu again. I searched for GC as well as Garbage, and all garbage refers to is with regard to vacuuming a database. But my question refers to wether or not memory management is with garbage co

Re: [GENERAL] pqlib garbage collection

2012-05-03 Thread Alexander Reichstadt
Hi, since I got no answer so far I searched through the docu again. I searched for GC as well as Garbage, and all garbage refers to is with regard to vacuuming a database. But my question refers to wether or not memory management is with garbage collection supported or not. When I try to link a

Re: [GENERAL] Memory Management in pqlib, Garbage Collection support

2012-05-03 Thread Alexander Reichstadt
Thanks, that's answering my question. In Objective-C as well as many other languages there is the feature to turn on Garbage Collection. It's a separate thread that scans memory for strong pointers, their source and origin and "vacuums" memory so to not have any leaks. Anything unreferenced and

Re: [GENERAL] Uppercase to lowercase trigger?

2012-05-03 Thread Pavel Stehule
Hello 2012/5/3 Chrishelring : > Maybe I should clarify what I mean. > > I have a db (postgresql 8.4.1 with a postGIS spatial extension) with about > 200+ tables in it. Some of them is supposed to be updated using an > application what requres that some of the columns are in uppercase (a > leftover

Re: [GENERAL] Uppercase to lowercase trigger?

2012-05-03 Thread Ken Tanzer
What if you created separate tables with the fields in uppercase, either with different names or better yet the same names and a different schema? It seems you could put triggers on those tables, and have your trigger translate the field names and make the updates to the real tables instead. Seem

Re: [GENERAL] Uppercase to lowercase trigger?

2012-05-03 Thread John R Pierce
On 05/03/12 12:50 AM, Ken Tanzer wrote: What if you created separate tables with the fields in uppercase, either with different names or better yet the same names and a different schema? It seems you could put triggers on those tables, and have your trigger translate the field names and make t

Re: [GENERAL] Memory Management in pqlib, Garbage Collection support

2012-05-03 Thread Magnus Hagander
On Thu, May 3, 2012 at 9:39 AM, Alexander Reichstadt wrote: > Thanks, that's answering my question. In Objective-C as well as many other > languages there is the feature to turn on Garbage Collection. It's a > separate thread that scans memory for strong pointers, their source and > origin and "va

Re: [GENERAL] Memory Management in pqlib, Garbage Collection support

2012-05-03 Thread Peter Bex
On Thu, May 03, 2012 at 09:39:29AM +0200, Alexander Reichstadt wrote: > Thanks, that's answering my question. In Objective-C as well as many other > languages there is the feature to turn on Garbage Collection. It's a separate > thread that scans memory for strong pointers, their source and origi

Re: [GENERAL] Memory Management in pqlib, Garbage Collection support

2012-05-03 Thread Simon Riggs
On Thu, May 3, 2012 at 8:56 AM, Magnus Hagander wrote: > On Thu, May 3, 2012 at 9:39 AM, Alexander Reichstadt wrote: >> Thanks, that's answering my question. In Objective-C as well as many other >> languages there is the feature to turn on Garbage Collection. It's a >> separate thread that scans

Re: [GENERAL] Memory Management in pqlib, Garbage Collection support

2012-05-03 Thread Alban Hertroys
On 3 May 2012 09:39, Alexander Reichstadt wrote: > Thanks, that's answering my question. In Objective-C as well as many other I notice that you're talking about pqlib instead of libpq. Perhaps pqlib is an Obj-C wrapper around libpq that most of us just don't know about? Obj-C is not a particularl

Re: [GENERAL] Memory Management in pqlib, Garbage Collection support

2012-05-03 Thread Alexander Reichstadt
(Sorry, I meant libpq). Actually it's finalize in Objective-C as well. PGSQLKit is the ObjC wrapper framework for libpq. I was confused by what I had learnt about GC, being it can't mix with non-GC. What the docu didn't mention in the places I read --or at least not so that it stuck-- was that i

Re: [GENERAL] Uppercase to lowercase trigger?

2012-05-03 Thread Chrishelring
Hmm.. Haden´t thought about making a view. It should work because the application that uses the data is read-only (yet!). I´ll give that a try. Thanks! Christian -- View this message in context: http://postgresql.1045698.n5.nabble.com/Uppercase-to-lowercase-trigger-tp5680384p5682880.html Sent f

Re: [GENERAL] SQL functions not being inlined

2012-05-03 Thread Evan Martin
Thanks, I went into that function, added log statements everywhere and figured which check it's failing on: !heap_attisnull(func_tuple, Anum_pg_proc_proconfig) and it's because my real function had this at the end: SET search_path FROM CURRENT; which I never imagined would make any difference

[GENERAL] How to get the physical locations of tables, views, functions etc of Postgresql in Windows & Linux?

2012-05-03 Thread Siva Palanisamy
Hi there! I'm interested to get the physical locations of tables, views, functions, data/content available in the tables of PostgreSQL in Linux OS. I've a scenario that PostgreSQL could be installed in SD-Card facility and Hard-Disk. If I've tables, views, functions, data in SD, I want to get th

Re: [GENERAL] How to get the physical locations of tables, views, functions etc of Postgresql in Windows & Linux?

2012-05-03 Thread Raghavendra
On Thu, May 3, 2012 at 6:52 PM, Siva Palanisamy wrote: > Hi there! I'm interested to get the physical locations of tables, views, > functions, data/content available in the tables of PostgreSQL in Linux OS. > I've a scenario that PostgreSQL could be installed in SD-Card facility and > Hard-Disk.

[GENERAL] Encryption - searching and sorting

2012-05-03 Thread David Welton
Hi, We have a situation where HIPAA data that needs to be encrypted. Since we have lots of users, and a number of users who access the data of different people, we cannot simply encrypt the disk and call it good - it's not fine-grained enough. So far, we've been encrypting each row, and that actu

Re: [GENERAL] SQLSTATE XX000 Internal Error 7

2012-05-03 Thread Tom Lane
Ben Madin writes: > On 03/05/2012, at 11:57 AM, Tom Lane wrote: >> So this is smelling like a kernel or filesystem bug. I wonder exactly >> which OS X update you're running, and what sort of filesystem the >> database is stored on. > [ it's an up-to-date, pretty vanilla looking OS X Lion install

Re: [GENERAL] Removal of BSDi, BSD/OS port

2012-05-03 Thread Bruce Momjian
On Wed, May 02, 2012 at 12:31:02PM -0400, Bruce Momjian wrote: > I assume there are no current users of the BSDi, BSD/OS port that are > going to be upgrading to Postgres 9.2. Therefore, I propose removal of > that port in Postgres 9.2. Any objections? Port removed for Postgres 9.2. -- Bruce

Re: [GENERAL] Re: How to insert random character data into tables for testing purpose. THanks.

2012-05-03 Thread yxj
Hi Bruce, Thanks. I tried. It works. Regards. Grace At 2012-05-03 07:14:21,"Bruce Momjian" wrote: >On Wed, May 02, 2012 at 11:03:47AM -0700, leaf_yxj wrote: >> Hi Andreas, >> >> Thanks a lot. >> >> I tried those following , they work. >> >> 1) insert into test values ( generate_series(

Re: [GENERAL] SQL functions not being inlined

2012-05-03 Thread Tom Lane
Evan Martin writes: > Thanks, I went into that function, added log statements everywhere and > figured which check it's failing on: > !heap_attisnull(func_tuple, Anum_pg_proc_proconfig) > and it's because my real function had this at the end: > SET search_path FROM CURRENT; Well, shame on you f

Re: [GENERAL] Limit the normal user to see system catalog or not??? And create privilege???

2012-05-03 Thread yxj
Hi Super Guys, Thanks. I learned a lot. It's very good for me to know that. Regards. Grace At 2012-05-03 07:15:29,"Bruce Momjian" wrote: >On Wed, May 02, 2012 at 04:03:01PM -0700, Adrian Klaver wrote: >> On 05/02/2012 11:42 AM, Bruce Momjian wrote: >> > On Wed, Mar 28, 2012 at 01:54:58

[GENERAL] Issue with rsync based incremental backup : postgres: startup process waiting for 0000000100000001000000D2

2012-05-03 Thread Samba
Hi, I'm trying to make a periodic (daily) incremental backup using rsync but noticing a message that postgres startup process is waiting on so and so XLOG file indefinitely. I intend to schedule a cron job to periodically execute this rsync backup process by : a) stop postgres server on backup s

Re: [GENERAL] pqlib garbage collection

2012-05-03 Thread Martijn van Oosterhout
On Thu, May 03, 2012 at 08:33:06AM +0200, Alexander Reichstadt wrote: > Hi, > > since I got no answer so far I searched through the docu again. I > searched for GC as well as Garbage, and all garbage refers to is with > regard to vacuuming a database. But my question refers to wether or > not mem

Re: [GENERAL] Uppercase to lowercase trigger?

2012-05-03 Thread Darren Duncan
Chrishelring wrote: Hmm.. Haden´t thought about making a view. It should work because the application that uses the data is read-only (yet!). I´ll give that a try. Thanks! Well a view is a much more natural solution than the other proposal, about constantly doing data definition / changing th

[GENERAL] privs drop after alter table

2012-05-03 Thread Gauthier, Dave
v8.3.4 on linux After this.. alter table fred alter column wilma set default 'dino'; ...it appeared that a user that had insert,delete,update privs lost them. I regranded and things went back to normal. Is it correct for those privs to be dropped in this case? If so, why (just curious). Thank

Re: [GENERAL] Issue with rsync based incremental backup : postgres: startup process waiting for 0000000100000001000000D2

2012-05-03 Thread Michael Nolan
On Thu, May 3, 2012 at 11:49 AM, Samba wrote: > Hi, > > > Please advise me if what i'm doing is makes sense and is an accepted > mechanism for taking backups or if there is any other procedure that i can > emplpoy to avoid unnecessarily archiving gigabytes of WAL logs which may be > growing many

Re: [GENERAL] privs drop after alter table

2012-05-03 Thread Josh Kupershmidt
On Thu, May 3, 2012 at 11:14 AM, Gauthier, Dave wrote: > v8.3.4 on linux > After this.. > > alter table fred alter column wilma set default 'dino'; > > ...it appeared that a user that had insert,delete,update privs lost them. > > I regranded and things went back to normal. > > Is it correct for th

[GENERAL] Move the postgreSQL database from Drive C to Map Network Drive (Called Z)

2012-05-03 Thread EllyR
Hi, I have a huge Postgres database on my C drive, I am continuously collecting the data, so unfortunately, the drive is getting full and I wanted to move it to a map network drive I got. I followed the instruction in the link below: http://kb.vircom.com/kbase/default.asp?id=1512&Lang=1&SID= 1 -

Re: [GENERAL] Move the postgreSQL database from Drive C to Map Network Drive (Called Z)

2012-05-03 Thread John R Pierce
On 05/03/12 11:55 AM, EllyR wrote: But after doing all the things mentioned in the link, when I want to start the postgres again as a service, it can not be started, it seems it does not recognize the map network drive , would you please let me know if I am in the right track or I need to do some

Re: [GENERAL] Move the postgreSQL database from Drive C to Map Network Drive (Called Z)

2012-05-03 Thread Magnus Hagander
On Thu, May 3, 2012 at 8:55 PM, EllyR wrote: > Hi, > > I have a huge Postgres database on my C drive, I am continuously collecting > the data, so unfortunately, the drive is getting full and I wanted to move > it to a map network drive I got. I followed the instruction in the link It's not suppor

Re: [GENERAL] Move the postgreSQL database from Drive C to Map Network Drive (Called Z)

2012-05-03 Thread Chris Angelico
On Fri, May 4, 2012 at 4:55 AM, EllyR wrote: > I have a huge Postgres database on my C drive, I am continuously collecting > the data, so unfortunately, the drive is getting full and I wanted to move > it to a map network drive I got. Are you able to install Postgres on a remote system and then u

[GENERAL] trimming a column

2012-05-03 Thread Michael P. Soulier
Hi, I need to trim whitespace off of a whole column and replace the existing values with the trimmed ones. This isn't working update mytable set id = trim(id); I'm not sure of the correct syntax. Help appreciated. Mike signature.asc Description: Digital signature

Re: [GENERAL] trimming a column

2012-05-03 Thread Greg Williamson
Michael -- >Hi, > >I need to trim whitespace off of a whole column and replace the existing >values with the trimmed ones. > >This isn't working > >update mytable set id = trim(id); > >I'm not sure of the correct syntax. Help appreciated. > >Mike > The trim function needs to be told what sort of

Re: [GENERAL] trimming a column

2012-05-03 Thread Adrian Klaver
On 05/03/2012 06:55 PM, Greg Williamson wrote: Michael -- Hi, I need to trim whitespace off of a whole column and replace the existing values with the trimmed ones. This isn't working update mytable set id = trim(id); I'm not sure of the correct syntax. Help appreciated. Mike The trim f

Re: [GENERAL] trimming a column

2012-05-03 Thread Adrian Klaver
On 05/03/2012 06:01 PM, Michael P. Soulier wrote: Hi, I need to trim whitespace off of a whole column and replace the existing values with the trimmed ones. This isn't working update mytable set id = trim(id); I'm not sure of the correct syntax. Help appreciated. Works here: test=> SELECT v

Re: [GENERAL] SQL functions not being inlined

2012-05-03 Thread Evan Martin
Of course, it seems silly now to not have included "SET search_path FROM current" in my post, but I had no idea what was and wasn't critical - that was the whole problem. Wisdom begins with knowing the right questions to ask! Yes, I was looking at the same function - even checked SVN logs to ma

Re: [GENERAL] trimming a column

2012-05-03 Thread Michael P. Soulier
On 03/05/12 Adrian Klaver said: > Works here: > test=> SELECT version(); > version > --- > PostgreSQL 9.0.7 on i686-pc-linux-gnu, compiled by GCC gcc (SUSE > Linux) 4.6.2, 3

Re: [GENERAL] trimming a column

2012-05-03 Thread Michael P. Soulier
On 03/05/12 Michael P. Soulier said: > still, in my app I see a lot of trailing whitespace after reading from the > db... [root@vmbg-msoulier3 eventviewer]# PYTHONPATH=.. python manage.py shell Python 2.6.6 (r266:84292, Dec 7 2011, 20:38:36) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2 Type

[GENERAL] Re: Move the postgreSQL database from Drive C to Map Network Drive (Called Z)

2012-05-03 Thread EllyR
Yes you are right, I have read that it is not that reliable, but I have to do something for that, what would be your suggestion for this case? Thanks. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Move-the-postgreSQL-database-from-Drive-C-to-Map-Network-Drive-Called-Z-t

[GENERAL] Re: Move the postgreSQL database from Drive C to Map Network Drive (Called Z)

2012-05-03 Thread EllyR
One I tried to install it on map network drive, it failed to work, so I had to install it back on the C drive. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Move-the-postgreSQL-database-from-Drive-C-to-Map-Network-Drive-Called-Z-tp5684058p5684612.html Sent from the Post

[GENERAL] Re: Move the postgreSQL database from Drive C to Map Network Drive (Called Z)

2012-05-03 Thread EllyR
Thanks for answering, I have the latest Postgres on my machine, do you know where can I find the instruction for map network drive? or do you think it won't work at all on network drive? -- View this message in context: http://postgresql.1045698.n5.nabble.com/Move-the-postgreSQL-database-from-

Re: [GENERAL] trimming a column

2012-05-03 Thread Michael P. Soulier
On 03/05/12 Michael P. Soulier said: > lots and lots of whitespace. I think it's in the db. Ah, they're not varchars, they're character columns. That explains it... signature.asc Description: Digital signature

Re: [GENERAL] Re: Move the postgreSQL database from Drive C to Map Network Drive (Called Z)

2012-05-03 Thread John R Pierce
On 05/03/12 5:15 PM, EllyR wrote: I have the latest Postgres on my machine, do you know where can I find the instruction for map network drive? or do you think it won't work at all on network drive? database servers should not be run in SMB/CIFS network shares. The shares just aren't reliabl

Re: [GENERAL] Re: Move the postgreSQL database from Drive C to Map Network Drive (Called Z)

2012-05-03 Thread David Johnston
On May 3, 2012, at 20:20, EllyR wrote: > Yes you are right, I have read that it is not that reliable, but I have to do > something for that, what would be your suggestion for this case? Thanks. Simplest option: install a new local hard drive and configure a tablespace to use it. Alternative: B