Re: [GENERAL] where is pg_resetxlog ?

2009-07-25 Thread Scott Marlowe
On Sat, Jul 25, 2009 at 9:48 PM, Kevin Kempter wrote: > On Saturday 25 July 2009 20:05:14 Scott Marlowe wrote: >> On Sat, Jul 25, 2009 at 1:30 PM, Kevin >> >> Kempter wrote: >> > On Saturday 25 July 2009 13:23:54 Scott Marlowe wrote: >> >> On Sat, Jul 25, 2009 at 1:08 PM, Kevin >> >> >> >> Kempter

Re: [GENERAL] where is pg_resetxlog ?

2009-07-25 Thread Kevin Kempter
On Saturday 25 July 2009 20:05:14 Scott Marlowe wrote: > On Sat, Jul 25, 2009 at 1:30 PM, Kevin > > Kempter wrote: > > On Saturday 25 July 2009 13:23:54 Scott Marlowe wrote: > >> On Sat, Jul 25, 2009 at 1:08 PM, Kevin > >> > >> Kempter wrote: > >> > On Saturday 25 July 2009 13:02:52 Scott Marlowe w

Re: [GENERAL] Content-Type in form variables

2009-07-25 Thread Dennis Gearon
Sorry, pgsql-general? php-general? who can tell the difference while your eyes are still focusing from long hours on the comptuer? Sorry guys. PS, no wonder it didn't show up or get answered from the php guys ;-) wrote> Subject: Re: Content-Type in form variables Message-ID: <20090726012447.

Re: [GENERAL] where is pg_resetxlog ?

2009-07-25 Thread Scott Marlowe
On Sat, Jul 25, 2009 at 1:30 PM, Kevin Kempter wrote: > On Saturday 25 July 2009 13:23:54 Scott Marlowe wrote: >> On Sat, Jul 25, 2009 at 1:08 PM, Kevin >> >> Kempter wrote: >> > On Saturday 25 July 2009 13:02:52 Scott Marlowe wrote: >> >> On Sat, Jul 25, 2009 at 12:55 PM, Kevin >> >> >> >> Kempter

Re: [GENERAL] Very slow joins

2009-07-25 Thread Eric Schwarzenbach
Alban Hertroys wrote: > On 25 Jul 2009, at 11:36, MS wrote: > >>> can we see an explain analyze at least? >>> >> >> Hi, >> Well, it won't be necessary - I mean it looks just like the explain I >> sent in my first post. > > What first post? The only thing I can find is a reference in a message > by

Re: [GENERAL] Disable databse listing for non-superuser (\l) ?

2009-07-25 Thread Bill Moran
Scott Marlowe wrote: > > On Sat, Jul 25, 2009 at 5:23 AM, Bill Moran wrote: > > Scott Marlowe wrote: > >> > >> On Fri, Jul 24, 2009 at 5:02 PM, Brian A. > >> Seklecki wrote: > >> > All: > >> > > >> > Any suggestions on how-to, or comments on a potential NFR, to disable > >> > non-superuser's from

Re: [GENERAL] Content-Type in form variables

2009-07-25 Thread Sam Mason
On Sat, Jul 25, 2009 at 11:12:15AM -0700, Dennis Gearon wrote: > If I receive a form via POST or PUT with with mulitple variables, > files, application/json, others, is there anywhere in the environment > to test he mime type of each variable? ?? this doesn't seem particularly related to PG! Anyw

Re: [GENERAL] Using unnest

2009-07-25 Thread Tom Lane
Jeff Davis writes: > So, my strategy will only work if the array type you're trying to cast > to has a cast from text. As of (IIRC) 8.3, every type does have a cast from text. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To mak

Re: [GENERAL] where is pg_resetxlog ?

2009-07-25 Thread Tom Lane
Kevin Kempter writes: > On Saturday 25 July 2009 13:23:54 Scott Marlowe wrote: >> Did you rsync the pg_xlog and pg_clog (i.e. EVERYTHING under data/) or >> just the base directory? You really need to do an rsync of >> everything, not most everything. > we rsync'ed EVERYTHING (the entire director

Re: [GENERAL] Using unnest

2009-07-25 Thread Jeff Davis
On Sat, 2009-07-25 at 22:54 +0200, Thomas Kellerer wrote: > Do I understand this correctly that by casting it first to text, I > effectively create a new array > the same way I create one, when I supply a literal like '{1,2,3}'::text[] Similar, but not quite the same. '{1,2,3}'::text[] is actual

Re: [GENERAL] where is pg_resetxlog ?

2009-07-25 Thread Daniel Verite
Kevin Kempter wrote: > I suspect I need to run pg_resetxlog but I cannot find it anywhere, where > would > I find pg_resetxlog on a debian box that was installed via the deb packages > ? > or how do I get it ? It's under /usr/lib/postgresql/8.3/bin Best regards, -- Daniel PostgreSQL-p

Re: [GENERAL] Using unnest

2009-07-25 Thread Thomas Kellerer
Jeff Davis wrote on 25.07.2009 22:44: It's generally hard to work with values of type anyarray. You have to cast them to text and then to a normal array type. For example: select unnest(histogram_bounds::text::oid[]) from pg_stats where tablename='pg_amop' and attname='amopopr'; G

Re: [GENERAL] Using unnest

2009-07-25 Thread Jeff Davis
On Sat, 2009-07-25 at 22:24 +0200, Thomas Kellerer wrote: > I was trying to use information from the pg_stats view, when I remembered > that 8.4 now has the cool > unnest function. > > However I can't seem to get this to work with a column defined as anyarray. It's generally hard to work with v

[GENERAL] Using unnest

2009-07-25 Thread Thomas Kellerer
Hi, I was trying to use information from the pg_stats view, when I remembered that 8.4 now has the cool unnest function. However I can't seem to get this to work with a column defined as anyarray. So my query is: select histogram_bounds from pg_stats where tablename = 'my_table' and attname

Re: [GENERAL] where is pg_resetxlog ?

2009-07-25 Thread Kevin Kempter
On Saturday 25 July 2009 13:23:54 Scott Marlowe wrote: > On Sat, Jul 25, 2009 at 1:08 PM, Kevin > > Kempter wrote: > > On Saturday 25 July 2009 13:02:52 Scott Marlowe wrote: > >> On Sat, Jul 25, 2009 at 12:55 PM, Kevin > >> > >> Kempter wrote: > >> > Hi all; > >> > > >> > I'm trying to restore from

Re: [GENERAL] where is pg_resetxlog ?

2009-07-25 Thread Scott Marlowe
On Sat, Jul 25, 2009 at 1:08 PM, Kevin Kempter wrote: > On Saturday 25 July 2009 13:02:52 Scott Marlowe wrote: >> On Sat, Jul 25, 2009 at 12:55 PM, Kevin >> >> Kempter wrote: >> > Hi all; >> > >> > I'm trying to restore from a tar of the filesystem on a debian box and I >> > get xlog errors. >> > >

Re: [GENERAL] where is pg_resetxlog ?

2009-07-25 Thread Kevin Kempter
On Saturday 25 July 2009 13:02:52 Scott Marlowe wrote: > On Sat, Jul 25, 2009 at 12:55 PM, Kevin > > Kempter wrote: > > Hi all; > > > > I'm trying to restore from a tar of the filesystem on a debian box and I > > get xlog errors. > > > > I suspect I need to run pg_resetxlog but I cannot find it any

Re: [GENERAL] Disable databse listing for non-superuser (\l) ?

2009-07-25 Thread Scott Marlowe
On Sat, Jul 25, 2009 at 5:23 AM, Bill Moran wrote: > Scott Marlowe wrote: >> >> On Fri, Jul 24, 2009 at 5:02 PM, Brian A. >> Seklecki wrote: >> > All: >> > >> > Any suggestions on how-to, or comments on a potential NFR, to disable >> > non-superuser's from viewing the database list via \l? >> >> S

Re: [GENERAL] where is pg_resetxlog ?

2009-07-25 Thread Scott Marlowe
On Sat, Jul 25, 2009 at 12:55 PM, Kevin Kempter wrote: > Hi all; > > I'm trying to restore from a tar of the filesystem on a debian box and I get > xlog errors. > > I suspect I need to run pg_resetxlog but I cannot find it anywhere, where > would > I find pg_resetxlog on a debian box that was inst

[GENERAL] where is pg_resetxlog ?

2009-07-25 Thread Kevin Kempter
Hi all; I'm trying to restore from a tar of the filesystem on a debian box and I get xlog errors. I suspect I need to run pg_resetxlog but I cannot find it anywhere, where would I find pg_resetxlog on a debian box that was installed via the deb packages ? or how do I get it ? Thanks in adv

[GENERAL] Content-Type in form variables

2009-07-25 Thread Dennis Gearon
If I receive a form via POST or PUT with with mulitple variables, files, application/json, others, is there anywhere in the environment to test he mime type of each variable? POST /en/html/dummy.php HTTP/1.1 Host: www.explainth.at User-Agent: Mozilla/5.0 (Windows;en-GB; rv:1.8.0.11) Gecko/20070

Re: [GENERAL] Disable databse listing for non-superuser (\l) ?

2009-07-25 Thread Andreas Wenk
Greg Stark schrieb: On Sat, Jul 25, 2009 at 2:53 PM, Andreas Wenk wrote: I mean, didn't Apple just kill someone for letting their new iPhone design leak? this is now going off topic - but what do you mean with your last sentence? Please don't quote an entire message if you're only respondin

Re: [GENERAL] FATAL: root page 3 of "pg_class_oid_index" has level 0, expected 1

2009-07-25 Thread Tom Lane
Andrew Radamis writes: > ERROR: invalid page header in block 43 of relation "pg_attribute" At this point I think you should assume you've got serious hardware problems. Get hold of some memory and disk test programs and see what you can find out. regards, tom lane --

Re: [GENERAL] Copying only incremental records to another DB..

2009-07-25 Thread Tom Lane
Craig Ringer writes: > To be clearer: Do you mean that the folder you backed up is the folder > with the file "PG_VERSION" in it, and all its contents? Careful --- there are multiple PG_VERSION files scattered around in a Postgres data directory tree. Your comment is correct with respect to the

[GENERAL] Server/Client Encoding Errors

2009-07-25 Thread APseudoUtopia
Hey, I'm having some problems when inserting special characters into a column. Here's the table: -- Table "public.users_history_ip" Column |Type | Modifiers +---

Re: [GENERAL] Very slow joins

2009-07-25 Thread Merlin Moncure
On Sat, Jul 25, 2009 at 8:45 AM, Sam Mason wrote: > On Sat, Jul 25, 2009 at 02:36:19AM -0700, MS wrote: >> I believe the update took so long because pgsql was checking if the >> changes don't break the referential integrity. >> So - problem solved, postgres good. ;) But isn't there a way to make >>

Re: [GENERAL] Disable databse listing for non-superuser (\l) ?

2009-07-25 Thread Greg Stark
On Sat, Jul 25, 2009 at 2:53 PM, Andreas Wenk wrote: >> I mean, didn't Apple just kill someone for letting their new iPhone >> design leak? > > this is now going off topic - but what do you mean with your last sentence? Please don't quote an entire message if you're only responding to part of it.

Re: [GENERAL] split string by special characters

2009-07-25 Thread Andreas Wenk
Jan-Erik schrieb: On 24 Juli, 23:22, a.w...@netzmeister-st-pauli.de (Andreas Wenk) wrote: Hi, I was thinking about that and in my opinion the approach to let the database do that is the wrong direction. Sure you can do a lot with regexp_split_to_table or regexp_split_to_array but they are kind

Re: [GENERAL] Disable databse listing for non-superuser (\l) ?

2009-07-25 Thread Andreas Wenk
Bill Moran schrieb: Scott Marlowe wrote: On Fri, Jul 24, 2009 at 5:02 PM, Brian A. Seklecki wrote: All: Any suggestions on how-to, or comments on a potential NFR, to disable non-superuser's from viewing the database list via \l? So, is this a misguided attempt at security through obscurity

Re: [GENERAL] Is there a RECORD[] type in plpgsql?

2009-07-25 Thread Merlin Moncure
On Sat, Jul 25, 2009 at 2:42 AM, Nick Boutelier wrote: > Im using the same... > > FOR record_or_row IN query LOOP > > at the beginning of a function and at the end of a function. Is there > a way to save the query results in a RECORD[] type so that I don't > have to run the query twice? yes (in po

Re: [GENERAL] Is there a RECORD[] type in plpgsql?

2009-07-25 Thread Sam Mason
On Fri, Jul 24, 2009 at 11:42:07PM -0700, Nick Boutelier wrote: > Im using the same... > > FOR record_or_row IN query LOOP > > at the beginning of a function and at the end of a function. Is there > a way to save the query results in a RECORD[] type so that I don't > have to run the query twice?

Re: [GENERAL] Very slow joins

2009-07-25 Thread Sam Mason
On Sat, Jul 25, 2009 at 02:36:19AM -0700, MS wrote: > I believe the update took so long because pgsql was checking if the > changes don't break the referential integrity. > So - problem solved, postgres good. ;) But isn't there a way to make > some bulk operations without having to drop indexes/FKs

Re: [GENERAL] Very slow joins

2009-07-25 Thread Alban Hertroys
On 25 Jul 2009, at 11:36, MS wrote: can we see an explain analyze at least? Hi, Well, it won't be necessary - I mean it looks just like the explain I sent in my first post. What first post? The only thing I can find is a reference in a message by you from yesterday, to a two-year old post

[GENERAL] Is there a RECORD[] type in plpgsql?

2009-07-25 Thread Nick Boutelier
Im using the same... FOR record_or_row IN query LOOP at the beginning of a function and at the end of a function. Is there a way to save the query results in a RECORD[] type so that I don't have to run the query twice? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To mak

Re: [GENERAL] Very slow joins

2009-07-25 Thread MS
> can we see an explain analyze at least? > Hi, Well, it won't be necessary - I mean it looks just like the explain I sent in my first post. BUT I found the real cause of my problem - the "fk2" field from my example had not only an index, but it was also a foreign key to another table. I believe t

Re: [GENERAL] Disable databse listing for non-superuser (\l) ?

2009-07-25 Thread Bill Moran
Scott Marlowe wrote: > > On Fri, Jul 24, 2009 at 5:02 PM, Brian A. > Seklecki wrote: > > All: > > > > Any suggestions on how-to, or comments on a potential NFR, to disable > > non-superuser's from viewing the database list via \l? > > So, is this a misguided attempt at security through obscurity,

Re: [GENERAL] Copying only incremental records to another DB..

2009-07-25 Thread Craig Ringer
Scott Ribe wrote: You mean rsync the "data" folder, or the entire PG folder? I meant the data folder. To be clearer: Do you mean that the folder you backed up is the folder with the file "PG_VERSION" in it, and all its contents? -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql