Re: [GENERAL] backup and restore

2007-05-10 Thread anhtin
Anybody show for me ? i want backup database and i read on Internet have function pg_start_backup(C:\Program Files\MicrosoftSQLServer\MSSQL\BACKUP\abc.backup) but i not run Some body show me. How will i do run this function ?? -- View this message in context: http://www.nabble.com/backup-and

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread PFC
On Fri, 11 May 2007 04:24:55 +0200, Tom Lane <[EMAIL PROTECTED]> wrote: "Leif B. Kristensen" <[EMAIL PROTECTED]> writes: Would it be reasonable to suggest that later versions of PostgreSQL could examine if a function changes data, and quietly marks a function as 'stable' if it doesn't? My ins

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/10/07 22:21, Tom Lane wrote: > Ron Johnson <[EMAIL PROTECTED]> writes: >> On 05/10/07 21:24, Tom Lane wrote: >>> My instinctive CS-major reply to that is "only if you've found a >>> solution to the halting problem". However, it's possible that w

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread Jorge Godoy
Ron Johnson <[EMAIL PROTECTED]> writes: > On 05/10/07 21:24, Tom Lane wrote: >> "Leif B. Kristensen" <[EMAIL PROTECTED]> writes: >>> Would it be reasonable to suggest that later versions of PostgreSQL >>> could examine if a function changes data, and quietly marks a function >>> as 'stable' if i

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread Tom Lane
Ron Johnson <[EMAIL PROTECTED]> writes: > On 05/10/07 21:24, Tom Lane wrote: >> My instinctive CS-major reply to that is "only if you've found a >> solution to the halting problem". However, it's possible that we could >> detect this case for a useful subset of real-world functions ... not >> sure

Re: [GENERAL] Fault Tolerant Postgresql (two machines, two postmasters, one disk array)

2007-05-10 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/10/07 20:43, John Gateley wrote: > Sorry if this is a FAQ, I did search and couldn't find much. > > I need to make my Postgresql installation fault tolerant. > I was imagining a RAIDed disk array that is accessible from two > (or multiple) compu

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/10/07 21:24, Tom Lane wrote: > "Leif B. Kristensen" <[EMAIL PROTECTED]> writes: >> Would it be reasonable to suggest that later versions of PostgreSQL >> could examine if a function changes data, and quietly marks a function >> as 'stable' if i

Re: [GENERAL] Missing magic block

2007-05-10 Thread Tom Lane
Mario Munda <[EMAIL PROTECTED]> writes: > I had to comment some includes out, or else i get some errors. Perhaps you are compiling against an old or incomplete set of Postgres header files? > #ifdef PG_MODULE_MAGIC > PG_MODULE_MAGIC; > #endif The problem with that coding is that it will silently

Re: [GENERAL] WAL file internals and why a 64 bit will not work on a 32 bit

2007-05-10 Thread Tom Lane
"Dhaval Shah" <[EMAIL PROTECTED]> writes: > If I partition my disk differently between the primary and standby > will that be a problem? Only if the slave runs out of space in a place where the master doesn't. regards, tom lane ---(end of broadcast

Re: [GENERAL] Installation fails on windows vista

2007-05-10 Thread novnov
It wasn't a vista failing or complication - I should have used the machine name for Account name, not localhost...sorry for cluttering up the list. -- View this message in context: http://www.nabble.com/Installation-fails-on-windows-vista-tf3724831.html#a10424989 Sent from the PostgreSQL - gene

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread Tom Lane
"Leif B. Kristensen" <[EMAIL PROTECTED]> writes: > Would it be reasonable to suggest that later versions of PostgreSQL > could examine if a function changes data, and quietly marks a function > as 'stable' if it doesn't? My instinctive CS-major reply to that is "only if you've found a solution t

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread Klint Gore
On Thu, 10 May 2007 00:06:06 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: > ... I suspect the > important point here is that if you have > > CREATE VIEW v AS SELECT sis, boom, bah ... > > then > > SELECT ... FROM ..., v, ... > > will be rewritten to the same parsetree as if you'd written > > SE

[GENERAL] Fault Tolerant Postgresql (two machines, two postmasters, one disk array)

2007-05-10 Thread John Gateley
Sorry if this is a FAQ, I did search and couldn't find much. I need to make my Postgresql installation fault tolerant. I was imagining a RAIDed disk array that is accessible from two (or multiple) computers, with a postmaster running on each computer. (Hardware upgrades could then be done to each

Re: [GENERAL] schema of system tables

2007-05-10 Thread Michael Glaesemann
On May 10, 2007, at 8:19 , Christian Rolle wrote: does somebody know a link to pdf or whatever displaying the schema of system-tables? or better has somebody something like this? Have you checked the extensive PostgreSQL documentation? Chapter 43. System Catalogs http://www.postgresql.org/

Re: [GENERAL] schema of system tables

2007-05-10 Thread Alvaro Herrera
Christian Rolle wrote: > hello guys, > > does somebody know a link to pdf or whatever displaying the schema of > system-tables? > or better has somebody something like this? There is an old presentation by Bruce Momjian about it. http://www.postgresql.org/files/developer/internalpics.pdf page 6

Re: [GENERAL] Issue with database Postgresql :(

2007-05-10 Thread Gerard M
how can I set the client_encoding to what I need? ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the m

[GENERAL] table change

2007-05-10 Thread Darren Bird
Is there a way of asking Postgresql if a particular table was changed without going back through the logs - like a last modified flag or even just a changed flag? -- Regards D. Bird

Re: [GENERAL] Missing magic block

2007-05-10 Thread Mario Munda
"Brad Buran" je napisal: > Hi Martijn, > > Thank you very much for the suggestion: > > > > CREATE FUNCTION add_one(IN int) > > > RETURNS int > > > AS 'add_one' > > > LANGUAGE C; > > I corrected this to say: > > AS 'Project1', 'add_one' > > And restarted psql (rebooted for that matter a

Re: [GENERAL] Solaris Postgresql 8.1.8 vs Postgresql 8.2.4

2007-05-10 Thread thefronny
On May 9, 4:56 am, [EMAIL PROTECTED] (Simon Smith) wrote: > I am planning to set up a new solaris 10 sparc server with a postgresql > database. > > It looks like solaris 10 comes with version 8.1.8 of postgres. > > Is there any benefit in using the 8.1.8 included solaris version over the > curren

[GENERAL] schema of system tables

2007-05-10 Thread Christian Rolle
hello guys, does somebody know a link to pdf or whatever displaying the schema of system-tables? or better has somebody something like this? i know this is existing for mssql for example, and why not for postgres? it makes something easier to overview... i would be thankful to get something lik

Re: [GENERAL] are foreign keys realized as indexes?

2007-05-10 Thread Lew
Felix Kater wrote: I am not bound to indexes, however, wonder if foreign keys itself are non-atomic functionality. I mean: if foreign keys are based on some other lower level functionality like indexes or anything else which I could use as a substitute--in what way ever. Of course, I want to gain

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread Tom Lane
Michael Glaesemann <[EMAIL PROTECTED]> writes: > Two people now have stated without much qualification that views have > some kind of associated performance (Brent Woods) or optimization > (Dann Corbit) penalty. Where does this idea come from? Views in > PostgreSQL are just rewritten with the

Re: [GENERAL] Dangers of fsync = off

2007-05-10 Thread Joel Dice
Thanks, Bill and Scott, for your responses. To summarize, turning fsync off on the master of a Slony-I cluster is probably safe if you observe the following: 1. When failover occurs, drop all databases on the failed machine and sync it with the new master before re-introducing it into the c

Re: [GENERAL] Installation fails on windows vista

2007-05-10 Thread novnov
Note I'm accepting all other defaults for the postgres installation, cluster etc. There is no existing postgres install on the machine, though there was before. I have noticed that when the postgres user is created by the installer, it's not a member of any group. Even if I add it to the admins gr

Re: [GENERAL] Windows installation; why is PL/python shown but disabled?

2007-05-10 Thread novnov
For some reason a fresh install of python made a difference...now at least the plpython checkbox is enabled. But per my other post today I can't get it to install on vista at all now. -- View this message in context: http://www.nabble.com/Windows-installation--why-is-PL-python-shown-but-disabled

[GENERAL] Installation fails on windows vista

2007-05-10 Thread novnov
I needed to reinstall postgres on a box and so far have had no success. I have UAC disabled. I enter localhost, password, ask it to create the postgres user when prompted. The user I'm installing as has admin rights on the notebook (same user as postgres was originally installed under). I get vari

Re: [GENERAL] WAL file internals and why a 64 bit will not work on a 32 bit

2007-05-10 Thread Dhaval Shah
Thanks. If I partition my disk differently between the primary and standby will that be a problem? Regards Dhaval On 5/10/07, Richard Huxton <[EMAIL PROTECTED]> wrote: Dhaval Shah wrote: > I do know that WAL files taken from a 64 bit OS will not work on a 32 > bit OS. However I have to prepare

Re: [GENERAL] tokenize string for tsearch?

2007-05-10 Thread Ottavio Campana
Magnus Hagander wrote: > On Mon, May 07, 2007 at 05:31:02PM -0700, Ottavio Campana wrote: >> Hi, I'm trying to use tsearch2 for the first time and I'm having a >> problem setting up a query >> >> If I execute >> >> SELECT * from test_table where ts_desc @@ to_tsquery ('hello&world'); >> >> it works

Re: [GENERAL] Pattern Matching - Range of Letters

2007-05-10 Thread Ron St-Pierre
William Garrison wrote: That won't work if you have a value "Anz" in there. It would be in the gap between An and Am. Yes, I realized that too. My solution to it is a bit of a hack, but it's easy and it works for me in this case. I translate everything to uppercase and simply append 'ZZ' t

[GENERAL] xml to db converter

2007-05-10 Thread garry saddington
Does anyone know of a tool that will generate a postgres database schema given an xml schema(xsd). Have tried xmlspy which says it does so but it only has limited postgres support and then it crashes. regards Garry ---(end of broadcast)--- TIP 4: Ha

Re: [GENERAL] Pattern Matching - Range of Letters

2007-05-10 Thread William Garrison
That won't work if you have a value "Anz" in there. It would be in the gap between An and Am. create table test (test text); insert into test values ('A'); insert into test values ('b'); insert into test values ('c'); insert into test values ('d'); insert into test values ('e'); insert into tes

[GENERAL] Windows installation; why is PL/python shown but disabled?

2007-05-10 Thread novnov
I have python 2.4 installed; python24\lib in the path; why is the PL\python option presented but disabled in 8.2 postgres installer? There must be some conditions under which it (and the other langs) are enabled. The only one of the 7 show that is enabled is PL/pgsql. I've found this to be true fo

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread Leif B. Kristensen
On Thursday 10. May 2007 21:21, Tom Lane wrote: >"Leif B. Kristensen" <[EMAIL PROTECTED]> writes: >> I haven't pondered the subtleties of 'stable', 'immutable' or >> 'volatile' yet, but rather reckoned that the default would do. > >Yeah, I was against this particular change actually, because I >

Re: [GENERAL] Pattern Matching - Range of Letters

2007-05-10 Thread Ron St-Pierre
Thanks Richard and Joshua, I had no idea that BETWEEN worked for text. SELECT * FROM Your_table AS YT WHERE YT.text_field BETWEEN 'Aa' AND 'An'; postgres=# select * from test where test between 'A' and 'An'; test -- A Ab Ac (3 rows) Ron Ron St-Pierre wrote: I'm sure that others have s

Re: [GENERAL] Pattern Matching - Range of Letters

2007-05-10 Thread John D. Burger
Richard Broersma Jr wrote: --- Ron St-Pierre <[EMAIL PROTECTED]> wrote: I'm sure that others have solved this but I can't find anything with my (google and archive) searches. I need to retrieve data where the text field is within a certain range e.g. A-An Am-Bc Bc-Eg Regular expression

Re: [GENERAL] Pattern Matching - Range of Letters

2007-05-10 Thread Joshua D. Drake
Ron St-Pierre wrote: I'm sure that others have solved this but I can't find anything with my (google and archive) searches. I need to retrieve data where the text field is within a certain range e.g. A-An Am-Bc Bc-Eg Yi-Zz Does anyone know of a good approach to achieve this? Should I be l

Re: [GENERAL] Pattern Matching - Range of Letters

2007-05-10 Thread Richard Broersma Jr
--- Ron St-Pierre <[EMAIL PROTECTED]> wrote: > I'm sure that others have solved this but I can't find anything with my > (google and archive) searches. I need to retrieve data where the text > field is within a certain range e.g. > A-An > Am-Bc > Bc-Eg > > Yi-Zz > > Does anyone know of a

[GENERAL] Pattern Matching - Range of Letters

2007-05-10 Thread Ron St-Pierre
I'm sure that others have solved this but I can't find anything with my (google and archive) searches. I need to retrieve data where the text field is within a certain range e.g. A-An Am-Bc Bc-Eg Yi-Zz Does anyone know of a good approach to achieve this? Should I be looking into regular e

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread Tom Lane
"Leif B. Kristensen" <[EMAIL PROTECTED]> writes: > On Thursday 10. May 2007 19:23, Tom Lane wrote: >> Are get_parent() and/or get_pbdate() marked volatile by any chance? >> 8.2 is more conservative about optimizing sub-selects involving >> volatile functions than previous releases were, because we

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread Leif B. Kristensen
On Thursday 10. May 2007 19:23, Tom Lane wrote: >"Leif B. Kristensen" <[EMAIL PROTECTED]> writes: >> CREATE OR REPLACE VIEW tmg_persons AS >> SELECT >> person_id, >> get_parent(person_id,1) AS father_id, >> get_parent(person_id,2) AS mother_id, >> last_edit, >> get_pbdate(pers

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread Tom Lane
"Leif B. Kristensen" <[EMAIL PROTECTED]> writes: > [ this query got slow in 8.2: ] > $query = "select person_id, pb_date from tmg_persons > where father_id = $p or mother_id = $p > order by pb_date"; > tmg_persons is a view involving several function calls, and

Re: [GENERAL] Replication for PG 8 recommendations

2007-05-10 Thread David Wall
Hannes Dorbath wrote: Replicate the whole block device, PostgreSQL sits on. For Linux, are you talking about something like DRDB? That would be nice in that it would also replicate the web app itself. David ---(end of broadcast)--- TIP 3: Hav

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread Marco Colombo
Ashish Karalkar wrote: > Hello All, > > Can anybody please point me to Advantages and Disadvantages of using view > > > With Regards > Ashish... Well, IMHO views are part of the "business logic" and not of the data model. You can also think of them as an API to access the data from applications

Re: [GENERAL] how to convert a string array to a string. fct array_to_string seem to work only for INT array??

2007-05-10 Thread George Weaver
On Thursday, May 10, 2007 6:07 AM David Gagnon wrote I have a string array(Compte[]) and I need to create the following string statement to populate a temporary table statement := ' INSERT INTO T_CR1 ( CRNUM, CRMONT, CSGLNUM, CRDATE) SELECT CRNUM, CSGLNUM, CRMONT, CRDATE

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread Leif B. Kristensen
On Wednesday 9. May 2007 06:32, Ashish Karalkar wrote: >Hello All, > >Can anybody please point me to Advantages and Disadvantages of using > view Sometimes, a view can fool you into writing hideously expensive queries just because it is the first method that comes to mind. I upgraded to version

[GENERAL] how to convert a string array to a string. fct array_to_string seem to work only for INT array??

2007-05-10 Thread David Gagnon
Hi all, I'm messing with this, I think simple, problem. I searched the doc and the web without success .. hum I have a string array(Compte[]) and I need to create the following string statement to populate a temporary table statement := ' INSERT INTO T_CR1 ( CRNUM, CRMONT, CSGLNUM, CRDATE)

Re: [GENERAL] Invoke trigger after commit

2007-05-10 Thread Sim Zacks
Use a Listen/Notify daemon application and put the Notify on the last line of the transaction. If it does the notify that means that the transaction was completed successfully. Sim Jan Strube wrote: Hi, is there a way to invoke a trigger only if the current transaction is committed? The pro

Re: [GENERAL] Invoke trigger after commit

2007-05-10 Thread Alexander Staubo
On 5/10/07, Jan Strube <[EMAIL PROTECTED]> wrote: is there a way to invoke a trigger only if the current transaction is committed? The problem is that my trigger does some kind of logging outside the database and therefore must not be invoked if the transaction is rolled back. PostgreSQL does n

[GENERAL] Invoke trigger after commit

2007-05-10 Thread Jan Strube
Hi, is there a way to invoke a trigger only if the current transaction is committed? The problem is that my trigger does some kind of logging outside the database and therefore must not be invoked if the transaction is rolled back. Thanks in advance Jan ---(end of br

Re: [GENERAL] Dangers of fsync = off

2007-05-10 Thread Dawid Kuroczko
On 5/8/07, Joel Dice <[EMAIL PROTECTED]> wrote: On Tue, 8 May 2007, Andrew Sullivan wrote: > My real question is why you want to turn it off. If you're using a > battery-backed cache on your disk controller, then fsync ought to be > pretty close to free. Are you sure that turning it off will de

Re: [GENERAL] WAL file internals and why a 64 bit will not work on a 32 bit

2007-05-10 Thread Richard Huxton
Dhaval Shah wrote: I do know that WAL files taken from a 64 bit OS will not work on a 32 bit OS. However I have to prepare a technical answer to this. That is, questions like - why a WAL file from 64 bit will not work in 32 bit. Also does the WAL file differ for same architecture but different k

Re: [GENERAL] In theory question

2007-05-10 Thread Hannes Dorbath
On 09.05.2007 17:30, Erik Jones wrote: On 09.05.2007 16:13, Naz Gassiep wrote: I think this is close to what MySQL's query cache does. The question is if this should be the job of the DBMS and not another layer. At least the pgmemcache author and I think that it's better done outside the DBMS.

Re: [GENERAL] Replication for PG 8 recommendations

2007-05-10 Thread Hannes Dorbath
On 10.05.2007 06:30, David Wall wrote: On Wed, 2007-05-09 at 14:40 -0700, David Wall wrote: Is there a "preferred" replication system for PG 8 db users? Obviously, we're looking for robustness, ease of operations/installation, low latency and efficient with system and network resources, wit