Re: [GENERAL] How to commuciate between two server in postgress

2005-11-24 Thread Richard Huxton
asfar khan wrote: Hi Everyone Please any one provide me the details of creating dblink ibetween two server n postgress. What problems are you currently seeing? What are you trying at the moment and what error message(s) do you get? -- Richard Huxton Archonet Ltd

Re: [GENERAL] Delete statement does not work with PostgreSQL 8.0.1

2005-11-24 Thread Richard Huxton
Ledina Hido wrote: Hi, I have just today installed the new version of PostgreSQL (8.1.0), and my old code seems to have stopped working. I am basically trying to delete a row from a table: DELETE FROM "CON" WHERE "ref"='CON5'; I have checked and CON5 is definitively in the CON table. I trie

[GENERAL] declare function with IN and OUT parameter as well as refcursor

2005-11-24 Thread Frank Motzkat/IC3S AG
Hi community,   I would like to declare a function with IN and OUT parameters as well as a refcursor as return value. For example something like this:   This doesn’t work. It gives the compilation error ‘ERROR:  function result type must be integer because of OUT parameters’ CREATE OR

Re: [GENERAL] declare function with IN and OUT parameter as well as refcursor

2005-11-24 Thread Martijn van Oosterhout
On Thu, Nov 24, 2005 at 09:26:07AM +0100, Frank Motzkat/IC3S AG wrote: > Hi community, > > I would like to declare a function with IN and OUT parameters as well as a > refcursor as return value. > > For example something like this: > > This doesn???t work. It gives the compilation error ???ERRO

Re: [GENERAL] Silent start of Postgres in XP

2005-11-24 Thread Andrus
>> Trying to use same approach with Postgres fails. Postgres >> requires special user account and is not capable to create >> this account without user intervention. > > Sure, it's very much capable of diong that. See > http://pginstaller.projects.postgresql.org/silent.html, specifically > look for

Re: [GENERAL] Delete statement does not work with PostgreSQL 8.0.1

2005-11-24 Thread Ledina Hido
Hi guys, Thanks for you suggestions. After a long night I found out what the problem was. I had a trigger for deletes on table CON, and the trigger returned NEW at the end instead of OLD. Thanks again, Ledina PS I didn't really think 8.1 delete had stopped working. It was just far too e

[GENERAL] Errors with temporary tables

2005-11-24 Thread Alexander Presber
Hello everyone, We encounter the following two strange errormessages when working with temporary tables. 1) ERROR: duplicate key violates unique constraint "pg_type_typname_nsp_index" 2) ERROR: tuple concurrently updated This is how: To cache large resultsets of searches we select them

Re: [GENERAL] Private email requests

2005-11-24 Thread A. Kretschmer
am 24.11.2005, um 8:25:15 +0100 mailte Harald Armin Massa folgendes: > Bruce, > list, > > I translated that part to german, I know the source is strong in Germany - > maybe it can be a helpfull addition - even if most speak English, they are > even more happy to read sth. in German. Nice Idea ;

[GENERAL] selecting a attribute from a function

2005-11-24 Thread A.j. Langereis
Dear all, I have written a function that returns a set. This set is of a type I made, containing multiple attributes.   create type my_type as (col1 int, col2 int)   Something likes this works:   select col1 from my_pg_func('hello');   But how can I do something like this:   select my_pg_func(t

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-24 Thread Adam Witney
On 23/11/05 10:20 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: > Adam Witney <[EMAIL PROTECTED]> writes: >> Whats the best way to zero the bad block? > > Probably dd from /dev/zero, along the lines of > > dd bs=8k seek=597621 count=1 conv=notrunc if=/dev/zero of=relation > > (check this before you

Re: [GENERAL] How to commuciate between two server in postgress

2005-11-24 Thread Richard Huxton
Don't forget to CC: the list - that way everyone can help. asfar khan wrote: My problem is that I have two postgress server on window platform. I would like to know how to communicate between them. Ah - can't help you here. I don't run PG on Windows. Is there an option on the installer? 1

[GENERAL] Set a blank password for a db user

2005-11-24 Thread Rembrandt
Hi, I'm new to postgresql and i have an easy question to ask. I have installed postgresql 8.1 on windows 2000 and i want to use it with my app developed with php 5 + apache 2. All works well but i need to know if this is possible : I use pgAdminIII as administration tool an i need to create a rest

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-24 Thread Tom Lane
Adam Witney <[EMAIL PROTECTED]> writes: > Just wanted to clarify, should this not be > dd bs=8k seek=7 count=1 conv=notrunc if=/dev/zero of=134401991.4 Looks reasonable. regards, tom lane ---(end of broadcast)--- TIP 4:

Re: [GENERAL] Errors with temporary tables

2005-11-24 Thread Tom Lane
Alexander Presber <[EMAIL PROTECTED]> writes: > We encounter the following two strange errormessages when working > with temporary tables. > 1) ERROR: duplicate key violates unique constraint > "pg_type_typname_nsp_index" > 2) ERROR: tuple concurrently updated The first of these looks like

[GENERAL] Function name variable within a non-trigger function

2005-11-24 Thread Berend Tober
I know that within a trigger function the functin name can be referenced by the special variable TG_NAME, so I could include raise an exception that identified its source with a line like: RAISE EXCEPTION ''ERROR IN %'', TG_NAME; Is there a similar set of special variables defined for "no

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-24 Thread Adam Witney
On 24/11/05 2:48 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: > Adam Witney <[EMAIL PROTECTED]> writes: >> Just wanted to clarify, should this not be >> dd bs=8k seek=7 count=1 conv=notrunc if=/dev/zero of=134401991.4 > > Looks reasonable. > > regards, tom lane Excellent thanks. I have run it

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-24 Thread Tom Lane
Adam Witney <[EMAIL PROTECTED]> writes: > bugasbase2=# vacuum; > WARNING: relation "mba_data_base" page 597621 is uninitialized --- fixing This is the expected result of what you did. > WARNING: relation "mba_data_base" page 640793 is uninitialized --- fixing > WARNING: relation "mba_data_base

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-24 Thread Adam Witney
On 24/11/05 3:52 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: > Adam Witney <[EMAIL PROTECTED]> writes: >> bugasbase2=# vacuum; >> WARNING: relation "mba_data_base" page 597621 is uninitialized --- fixing > > This is the expected result of what you did. > >> WARNING: relation "mba_data_base" page

[GENERAL] Postgres as embedded db for GUI

2005-11-24 Thread David Pratt
Hi. Where would I locate information on setting up postgres as a stand alone db for a gui application. I am writing this in python and have been using sqlite but would like to try my app with postgres backend. Links to any specific open source example would be helpful. The only user would be

Re: [GENERAL] Postgres as embedded db for GUI

2005-11-24 Thread Jaime Casanova
On 11/24/05, David Pratt <[EMAIL PROTECTED]> wrote: > Hi. Where would I locate information on setting up postgres as a stand > alone db for a gui application. I am writing this in python and have > been using sqlite but would like to try my app with postgres backend. > Links to any specific open

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-24 Thread Tom Lane
Adam Witney <[EMAIL PROTECTED]> writes: > If you mean by that, this: > select * from mba_data_base where ctid = '(640792,12)'; > select * from mba_data_base where ctid = '(640799,1)'; > Then the data looks normal... Of course everything in between that is now > blank. The question is, can you te

[GENERAL] different queries and their efficiencies

2005-11-24 Thread David Welton
Hi, I'm curious as to what the general opinion is on these different queries and their relative merits, especially in terms of speed: - select count(*) from zstore_temp where product_code not in (select product_code from zstore) QUERY PLAN -

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-24 Thread Adam Witney
On 24/11/05 4:19 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: > Adam Witney <[EMAIL PROTECTED]> writes: >> If you mean by that, this: > >> select * from mba_data_base where ctid = '(640792,12)'; >> select * from mba_data_base where ctid = '(640799,1)'; > >> Then the data looks normal... Of course e

Re: [GENERAL] Private email requests

2005-11-24 Thread Karsten Hilbert
On Thu, Nov 24, 2005 at 08:25:15AM +0100, Harald Armin Massa wrote: > I translated that part to german, I know the source is strong in Germany - > maybe it can be a helpfull addition - even if most speak English, they are > even more happy to read sth. in German. I suggest the German translation b

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-24 Thread Tom Lane
Adam Witney <[EMAIL PROTECTED]> writes: > On 24/11/05 4:19 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: >> The question is, can you tell whether any data is actually missing? > Well each of these datasets are about 20,000 rows each... So I can tell > which one is in (640792,12) and in (640799,1), the

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-24 Thread Adam Witney
On 24/11/05 4:42 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: > Adam Witney <[EMAIL PROTECTED]> writes: >> On 24/11/05 4:19 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: >>> The question is, can you tell whether any data is actually missing? > >> Well each of these datasets are about 20,000 rows each...

Re: [GENERAL] Postgres as embedded db for GUI

2005-11-24 Thread David Pratt
Hi Jaime. I currently work with psycopg with web apps. My question is more a matter of whether postgres can be installed in a way that keeps it contained to the program files for the app (as opposed to the regular type of install where postgres becomes available as a server available anywhere

Re: [GENERAL] Postgres as embedded db for GUI

2005-11-24 Thread Peter Eisentraut
David Pratt wrote: > Hi. Where would I locate information on setting up postgres as a > stand alone db for a gui application. This is not possible. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: In ve

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-24 Thread Tom Lane
Adam Witney <[EMAIL PROTECTED]> writes: > Does this help identifying what went wrong? At this point I think there's no question that your filesystem is dropping blocks :-(. Might want to check for available kernel updates, or contemplate changing to a different filesystem.

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-24 Thread Adam Witney
On 24/11/05 5:28 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: > Adam Witney <[EMAIL PROTECTED]> writes: >> Does this help identifying what went wrong? > > At this point I think there's no question that your filesystem is > dropping blocks :-(. Might want to check for available kernel updates, > or

Re: [GENERAL] different queries and their efficiencies

2005-11-24 Thread Tom Lane
David Welton <[EMAIL PROTECTED]> writes: > I'm curious as to what the general opinion is on these different > queries and their relative merits, especially in terms of speed: You really should do EXPLAIN ANALYZE rather than assuming that the planner's estimates are reliable. The NOT IN case, at l

[GENERAL] pg_dump --data-only: is dump ordered to keep foreign-key-relations loadable?

2005-11-24 Thread Harald Armin Massa
I migrated one database from 8.0 to 8.1That I used to do add "without oids" to all tables.First step so:pg_dump --schema-only  -U user databasethe file was edited, all tables to "withoud oids"; and reloaded in 8.1After that I pg_dump --data-only -U user databaseand tried to reload the data. But it

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-24 Thread Qingqing Zhou
"Tom Lane" <[EMAIL PROTECTED]> wrote > > At this point I think there's no question that your filesystem is > dropping blocks :-(. It is very interesting to follow this thread. But at this point, can you explain more why "there is no question" is file system's fault? Thanks, Qingqing ---

Re: [GENERAL] pg_dump --data-only: is dump ordered to keep foreign-key-relations

2005-11-24 Thread Florian G. Pflug
Harald Armin Massa wrote: > [snipped text] pg_dump --data-only -U user database and tried to reload the data. But it fails on foreign keys: depending tables are being dumped before the tables they depend on. I solved it by manually dumping the relevant tables and reloading them, Now I cannot f

Re: [GENERAL] pg_dump --data-only: is dump ordered to keep foreign-key-relations

2005-11-24 Thread Peter Wilson
Harald Armin Massa wrote: I migrated one database from 8.0 to 8.1 That I used to do add "without oids" to all tables. First step so: pg_dump --schema-only -U user database the file was edited, all tables to "withoud oids"; and reloaded in 8.1 After that I pg_dump --data-only -U user databa

[GENERAL] tool for DB design

2005-11-24 Thread Nikolay Samokhvalov
Please, suggest any free/opensource tool for DB design under Linux. I need following: ER (or UML)-diagram -> physical diagram -> SQL code (I don't even dream about reverse transformation...) Quite good example of such tool is Sybase PowerDesigner (which supports Postgres), but AFAIK it runs only un

Re: [GENERAL] tool for DB design

2005-11-24 Thread Tino Wildenhain
Am Freitag, den 25.11.2005, 02:25 +0300 schrieb Nikolay Samokhvalov: > Please, suggest any free/opensource tool for DB design under Linux. I > need following: ER (or UML)-diagram -> physical diagram -> SQL code (I > don't even dream about reverse transformation...) Quite good example > of such tool

[GENERAL] pg_connect troubles on localhost

2005-11-24 Thread John Taber
using postgresql 8.1 on Ubuntu Breezy I cannot connect to a database I created - checking \du the username is listed. I also created a password with #ALTER ROLE WITH PASSWORD '' I tried without password but it calls for a password. Any ideas? Warning: pg_connect() [function.pg-co

Re: [GENERAL] pg_connect troubles on localhost

2005-11-24 Thread Jerry Sievers
John Taber <[EMAIL PROTECTED]> writes: > using postgresql 8.1 on Ubuntu Breezy > I cannot connect to a database I created - checking \du the username is > listed. I also created a password with #ALTER ROLE WITH PASSWORD > '' I tried without password but it calls for a password. Any i

[GENERAL] New user questions

2005-11-24 Thread Walter Dnes
I'm running PostgreSQL 8.0.3, the latest stable ebuild, on Gentoo linux. 1) Am I inviting any problems in linux by moving the directory /var/lib/postgresql to /home/postgresql, and then symlinking /home/postgresql back to /var/lib/postgresql? The reason for this is to avoid having databases,

[GENERAL] regarding the apostrophe character

2005-11-24 Thread surabhi.ahuja
 hello everyone,   in case i need to give a value which has apostrophe as one of the characters i need to escape it. and similary for the characters such as backslash.   what other characters need to be escaped. Is there any list published?   cant this be fixed in postgres?   thanks regards Sura

Re: [GENERAL] regarding the apostrophe character

2005-11-24 Thread Michael Glaesemann
On Nov 25, 2005, at 13:12 , surabhi.ahuja wrote: in case i need to give a value which has apostrophe as one of the characters i need to escape it. and similary for the characters such as backslash. http://www.postgresql.org/docs/current/interactive/sql- syntax.html#SQL-SYNTAX-STRINGS Mic

[GENERAL] regarding postmaster.pid file

2005-11-24 Thread surabhi.ahuja
 i have a small query. when i start postmaster the postmaster.pid file is created by default in the PGDATA directory. but in case that directory gets full if i try to restart postmaster ... it fails because there is not enough space to create the postmaster.pid file/   My question is that wh

[GENERAL] postmaster does not come up

2005-11-24 Thread surabhi.ahuja
 this is in continuation of the problem i was facing some time back.   if i try to start postmaster ...it times out. what can be the possible cause of it . I also have seen a core file being generated.   in case such a thing happens ... what shuld i be doing? how can i recover my database in suc

Re: [GENERAL] regarding the apostrophe character

2005-11-24 Thread surabhi.ahuja
Title: Re: [GENERAL] regarding the apostrophe character in which version will the use of "Escape string syntax " be supported ..    thanks, regards From: Michael Glaesemann [mailto:[EMAIL PROTECTED]Sent: Fri 11/25/2005 9:50 AMTo: surabhi.ahujaCc: pgsql-general@postgresql.orgSubject: Re:

Re: [GENERAL] regarding postmaster.pid file

2005-11-24 Thread Tom Lane
"surabhi.ahuja" <[EMAIL PROTECTED]> writes: > My question is that > while starting postmaster is there an option to specify the location of = > postmaster.pid file .. > i was thinking if i can keep the postmaster.pid file in a separate = > folder ..because that folder rarely gets full. You do real

Re: [GENERAL] New user questions

2005-11-24 Thread Chris Travers
Walter Dnes wrote: I'm running PostgreSQL 8.0.3, the latest stable ebuild, on Gentoo linux. 1) Am I inviting any problems in linux by moving the directory /var/lib/postgresql to /home/postgresql, and then symlinking /home/postgresql back to /var/lib/postgresql? The reason for this is to avoi

[GENERAL] Deadlock Detected (revisited)

2005-11-24 Thread Wes
I haven't seen anything to indicate that 8.x improves foreign key refererence locking and fixes the foreign key 'deadlock detected' issue. Has that been addressed in 8.1? I sort my records before loading, but am still getting 'deadlock detected' (still running 7.3.4). I have B references C B

Re: [GENERAL] postmaster does not come up

2005-11-24 Thread hubert depesz lubaczewski
On 11/25/05, surabhi.ahuja <[EMAIL PROTECTED]> wrote: if i try to start postmaster ...it times out. what can be the possible cause of it . I also have seen a core file being generated.i ll again copy paste the script i am using for starting up and shutting down postmasterPOSTGRES_LOG="$SDCHOME/nu