Re: [GENERAL] PITR and base + full backups

2008-09-16 Thread Simon Riggs
On Tue, 2008-09-16 at 21:16 +0530, Joey K. wrote: > This didn't work and not sure if this is supposed to work ;-) > > Or should I stick to just plain PITR? Yes, just drop steps (3) and (5). If you don't trust it for some reason, then don't use it at all - mixing modes like that won't work. But

Re: [GENERAL] Converting string to IN query

2008-09-16 Thread Andrus
I found that following query works: create temp table test ( test int ) on commit drop; insert into test values(1); select * from test where test = ANY ( '{1,2}' ); Is this best solution ? Will it work without causing stack overflow with 8.2 server default settings if string contains some th

[GENERAL] pg_dumpall problem when roles have default schemas

2008-09-16 Thread btober
I've run into a problem while migrating an existing 8.2.7 data base to a new server running 8.3.3 (although I think the version numbers may not matter -- I think I've seen this problem in the past and just lived with it since so much of Postgresql is so great!). The problem stems from the fact th

[GENERAL] Trigger does not behave as expected

2008-09-16 Thread Goboxe
Hi, I have a trigger as below. I am wondering why when I tried to insert to master table with date= 20080908, the trigger does not insert to z_agg_tmcarr_pfx_gtwy_cc_w_20080908. Is that something wrong with the statement "ELSEIF NEW.CallDate >= 20080908 AND NEW.CallDate <= 20080914 THEN"? ---

Re: [GENERAL] DbLink Compilation on Solaris 10

2008-09-16 Thread lighthouse . software
On Sep 16, 10:51 pm, [EMAIL PROTECTED] (Tom Lane) wrote: > [EMAIL PROTECTED] writes: > > + psql:dblink.sql:11: ERROR:  could not load library "/apps/postgresql/ > > lib/dblink.so": ld.so.1: postgre > > s: fatal: relocation error: file /apps/postgresql/lib/dblink.so: > > symbol PG_GETARG_TEXT_PP: re

Re: [GENERAL] Is there a parameter to tell postgresql to not attempt to open an IPv6 socket?

2008-09-16 Thread Andrew Sullivan
On Tue, Sep 16, 2008 at 04:46:37PM -0400, Reid.Thompson wrote: > PostgreSQL appears to all intents to startup fine on the UNIX and IPv4 > sockets. Is there a parameter to tell postgresql to not attempt to open > an IPv6 socket? Specify the specific TCP/IP interfaces in the postmaster.conf file.

Re: [GENERAL] PITR and base + full backups

2008-09-16 Thread Greg Smith
On Tue, 16 Sep 2008, Joey K. wrote: (1) pg_start_backup(`date`) (2) perform hot rsync first (while the database is running) $ rsync -avr pgdata /backup/`date`/ (3) stop pg You need to call pg_stop_backup() here and wait until the last WAL file it references has been archived before this backu

[GENERAL] Is there a parameter to tell postgresql to not attempt to open an IPv6 socket?

2008-09-16 Thread Reid.Thompson
Startup of 8.3.3 on AIX is outputting these messages into the logfile... LOG: could not bind IPv6 socket: The socket name is already in use. HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. PostgreSQL appears to all inten

Re: [GENERAL] Question about indexes

2008-09-16 Thread Reg Me Please
As I told you, I use to design indexes based upon the queries, the WHERE clauses especially. My fear is that in PGSQL the runtime "index composition" can be a drawback to the performances if compared to "static index composition". Is this true accordingly to your experience? Is there any "best

Re: [GENERAL] foreign key problem

2008-09-16 Thread Brent Wood
Brent Wood DBA/GIS consultant NIWA, Wellington New Zealand >>> Jorge Godoy <[EMAIL PROTECTED]> 09/17/08 1:36 AM >>> Em Monday 15 September 2008 19:05:25 [EMAIL PROTECTED] escreveu: > Hi, > > I need a foreign key (or equivalent) where the referenced table cannot have > a unique constraint. > > For f

Re: [GENERAL] Question about indexes

2008-09-16 Thread Scott Marlowe
On Tue, Sep 16, 2008 at 12:24 PM, Merlin Moncure <[EMAIL PROTECTED]> wrote: > On Tue, Sep 9, 2008 at 10:52 AM, regme please <[EMAIL PROTECTED]> wrote: >> Hi all. >> I usually create indexes accordingly to the queries used in my software. >> This means the more often than not I have composited index

Re: [GENERAL] Question about indexes

2008-09-16 Thread Merlin Moncure
On Tue, Sep 9, 2008 at 10:52 AM, regme please <[EMAIL PROTECTED]> wrote: > Hi all. > I usually create indexes accordingly to the queries used in my software. > This means the more often than not I have composited indexes over more than > one column. > What'd be in PGSQL (v8.3+) the pros and cons of

Re: [GENERAL] Question about indexes

2008-09-16 Thread Reg Me Please
Any hint? > Hi all. > I usually create indexes accordingly to the queries used in my software. > This means the more often than not I have composited indexes over more than > one column. > What'd be in PGSQL (v8.3+) the pros and cons of having instead only > one-column indexes? > Thanks in advance

Re: [GENERAL] about partitioning

2008-09-16 Thread Joao Ferreira gmail
Hello all, still with partitioning... wheter I use rules or triggers is there a way for me _not_ to specify field-by-field all the fields I wish to be redirected to the child-table... as example: instead of this: - create rule insert_t_1

Re: [GENERAL] [LIKELY_SPAM]Re: Oracle and Postgresql

2008-09-16 Thread Chris Browne
[EMAIL PROTECTED] ("Roberts, Jon") writes: > Roberts, Jon wrote: >> > My top 10 reasons why companies pick Oracle. >> >> Do you mean they actually get these things, or they imagine they do? >> > Huh? Companies buy Oracle all of the time. That's not the point. The question isn't whether they

Re: [GENERAL] Help with a foreign key with non-unique reference?

2008-09-16 Thread Stephan Szabo
On Tue, 16 Sep 2008, Brent Wood wrote: > I need a foreign key (or equivalent) where the referenced table cannot > have a unique constraint. Well, do you need a full foreign key or just the insert-time check on the referencing table? Does the referenced table get updates or deletes that you want t

Re: [GENERAL] PITR and base + full backups

2008-09-16 Thread Alan Hodgson
On Tuesday 16 September 2008, "Joey K." <[EMAIL PROTECTED]> wrote: > Hello, > > Just to be sure of our backups we plan to do a base + full backups (yes, > we are overly paranoid) > > (1) (`date`) > > (2) perform hot rsync first (while the database is running) > $ rsync -avr pgdata /backup/`date`/

Re: [GENERAL] Oracle and Postgresql

2008-09-16 Thread Joshua Drake
On Tue, 16 Sep 2008 11:54:18 -0500 "Roberts, Jon" <[EMAIL PROTECTED]> wrote: > > I wasn't kidding up there. Setting view permissions on plpgsql (or > > any pl code really) would be understandable. If you're not a super > > user or the owner, you need permission to see it. > > > > How can I ma

Re: [GENERAL] Oracle and Postgresql

2008-09-16 Thread Roberts, Jon
> > On Mon, Sep 15, 2008 at 2:04 PM, Christophe <[EMAIL PROTECTED]> wrote: > > > > On Sep 15, 2008, at 12:56 PM, Scott Marlowe wrote: > >> > >> I could totally get behind needing permission to see the plpgsql code. > > > > :) > > I wasn't kidding up there. Setting view permissions on plpgsql (or

Re: [GENERAL] could not open file "pg_subtrans/0014": Invalid argument

2008-09-16 Thread Raymond O'Donnell
On 16/09/2008 01:54, Scott Marlowe wrote: > On Mon, Sep 15, 2008 at 5:33 PM, Warren Bell <[EMAIL PROTECTED]> wrote: >> I have gotten this error before and it was attributed to my anti virus >> program. I am running Postgres 8.1 on Windows XP. I am using Nod32 as my >> anti virus program. I have tri

[GENERAL] PITR and base + full backups

2008-09-16 Thread Joey K.
Hello, Just to be sure of our backups we plan to do a base + full backups (yes, we are overly paranoid) (1) pg_start_backup(`date`) (2) perform hot rsync first (while the database is running) $ rsync -avr pgdata /backup/`date`/ (3) stop pg (4) perform cold rsync $ rsync -avr --delete pgdata /b

Re: [GENERAL] nightly vacuum

2008-09-16 Thread Bill Moran
In response to "Lee Keel" <[EMAIL PROTECTED]>: > >-Original Message- > >From: Tom Lane [mailto:[EMAIL PROTECTED] > > > >"Lee Keel" <[EMAIL PROTECTED]> writes: > >> I have 15 or so databases that I am deleting all the data in them and > >> re-importing on a nightly basis. (Long story here

Re: [GENERAL] nightly vacuum

2008-09-16 Thread Lee Keel
>-Original Message- >From: Tom Lane [mailto:[EMAIL PROTECTED] > >"Lee Keel" <[EMAIL PROTECTED]> writes: >> I have 15 or so databases that I am deleting all the data in them and >> re-importing on a nightly basis. (Long story here, but basically I >> found using the copy command was the fa

Re: [GENERAL] nightly vacuum

2008-09-16 Thread Tom Lane
"Lee Keel" <[EMAIL PROTECTED]> writes: > I have 15 or so databases that I am deleting all the data in them and > re-importing on a nightly basis. (Long story here, but basically I > found using the copy command was the fastest way to get the data into > this read-only system from Sql Server 2000.)

Re: [GENERAL] client_encoding / postgresql strange behaviour

2008-09-16 Thread Michael Fuhr
On Tue, Sep 16, 2008 at 05:15:41AM -0600, Enrico Sabbadin wrote: > Hi, as far as I've understood client_encoding tells postgresql > how data "will arrive / must be send back" to the client application. > Postgresql will do the conversion for you if the database encoding is > different. Correct

[GENERAL] nightly vacuum

2008-09-16 Thread Lee Keel
Hello all, I have been playing around with the automated vacuum, but I can't seem to get it to perform as desired. My Situation: I have 15 or so databases that I am deleting all the data in them and re-importing on a nightly basis. (Long story here, but basically I found using the copy co

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-16 Thread Andrew Sullivan
On Tue, Sep 16, 2008 at 09:39:03AM -0400, Jonathan Bond-Caron wrote: > > I agree here. I hope there's a consensus that it does offer some level of > protection. There is not, in fact, in the security community a consensus that it offers some level of protection. There are some security people w

Re: [GENERAL] drop index

2008-09-16 Thread Tom Lane
"Pau Marc Munoz Torres" <[EMAIL PROTECTED]> writes: > psql 8.2.6 (server 8.2.5) > Schema | Name | Type | Owner |Table > ++---+---+-- > public | h2dbp | index | pau | precalc > public | icsp | index | pau | local > public | icspn | index | pau

Re: [GENERAL] drop index

2008-09-16 Thread Pau Marc Munoz Torres
psql 8.2.6 (server 8.2.5) Schema | Name | Type | Owner |Table ++---+---+-- public | h2dbp | index | pau | precalc public | icsp | index | pau | local public | icspn | index | pau | names public | idx| index | pau | local public | iid

Re: [GENERAL] drop index

2008-09-16 Thread Richard Huxton
Pau Marc Munoz Torres wrote: > Hi everybody > > I have a problem with index, i droped a table before drop their indexs, so, > now i can't remove the index That shouldn't be possible. What version of PostgreSQL is this? -- Richard Huxton Archonet Ltd -- Sent via pgsql-general mailing list

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-16 Thread Glyn Astill
> One big reason why nothing hasn't been done is that > there is a decent > 'low tech' obfuscation tactic already: remove > select access from > pg_proc to the user accounts in question and > 'public'. This will > essentially disable casual browsing of procedure code from > user > accounts. Neat

Re: [GENERAL] DbLink Compilation on Solaris 10

2008-09-16 Thread Tom Lane
[EMAIL PROTECTED] writes: > + psql:dblink.sql:11: ERROR: could not load library "/apps/postgresql/ > lib/dblink.so": ld.so.1: postgre > s: fatal: relocation error: file /apps/postgresql/lib/dblink.so: > symbol PG_GETARG_TEXT_PP: referenced symbol not found > I am running postgresql version 8.2.4

[GENERAL] Backend timeout

2008-09-16 Thread Dragan Ciric
Hi! We need some help. Sometimes we have broken connections with backend ( postgresql server ). When this occurs, we have "idle in transaction" indication on server side. Can you answer us, how long will server stay in this state and what happens with this broken connection ( client started tran

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-16 Thread Gregory Williamson
Nice trick ... thanks! > One big reason why nothing hasn't been done is that there is a decent > 'low tech' obfuscation tactic already: remove select access from > pg_proc to the user accounts in question and 'public'. This will > essentially disable casual browsing of procedure code from user >

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-16 Thread Jonathan Bond-Caron
On Tue Sep 16 08:40 AM, Bill Moran wrote: > In response to Tom Lane <[EMAIL PROTECTED]>: > >> Bill Moran <[EMAIL PROTECTED]> writes: >>> What I'm _asking_ is why would extending SECURITY DEFINER to include >>> preventing unauthorized users from viewing code _not_ be a valid >>> method of securin

Re: [GENERAL] Index order

2008-09-16 Thread Gregory Stark
Glyn Astill <[EMAIL PROTECTED]> writes: > I'd expect the rows starting with the caret to appear either at the start or > end of, rather than in the middle, it appears as if the index ignores them. > > Database locale is Latin1 Latin1 isn't a locale, it's a character set (and an encoding). Your

Re: [GENERAL] Index order

2008-09-16 Thread Glyn Astill
> > > I have a table with a varchar field "artist" > (see table def below), > and if I order by the field "artist" it does not > order as expected when > there are characters such as ^ at the start of the text. > > You didn't say what you consider "expected", > but I suspect that the > answer is

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-16 Thread Merlin Moncure
On Tue, Sep 16, 2008 at 9:15 AM, Glyn Astill <[EMAIL PROTECTED]> wrote: > > As much as I'm impressed with the "we do it properly or not at all" attitude, > it'd be nice if there was an option to stop the casual user from viewing code. > > I'll admit to obfusicating bits and pieces using C, even th

Re: [GENERAL] Index order

2008-09-16 Thread Tom Lane
Glyn Astill <[EMAIL PROTECTED]> writes: > I was just wondering if there's any way to tweak the way an an index is > ordered on a text field? > I have a table with a varchar field "artist" (see table def below), and if I order by the field "artist" it does not order as expected when there are char

Re: [GENERAL] Index order

2008-09-16 Thread Glyn Astill
> > > Hi chaps, > > > > I was just wondering if there's any way to tweak > the way an an index is ordered on a text field? > > Yes, it's called functional index. Write your function, > which does > whatever you want with your data and create index > (foo(artist)) > Hmm, I understand what you're

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-16 Thread Glyn Astill
> Because it's so full of obvious loopholes. Yes, > it might slow down > > someone who didn't have superuser access to the > database or root access > > to the machine it's on; but that doesn't count > as secure really. The > > problem is that the people who ask for this type of > feature are usu