[SQL] Relation 0 does not exist

2006-02-24 Thread Yasuhiro Furuse
Hi. When I run SQL command, I've got the error messe 'Relation 0 doesn't exist' and following log messages were generated. After this error happens, I can not access database at all. Could you kindly advise why this kind of error happens? Regards, y.furuse --

Re: [SQL] After Trigger assignment to NEW

2006-02-24 Thread Achilleus Mantzios
O Owen Jacobson έγραψε στις Feb 24, 2006 : > Achilleus Mantzios wrote: > > > O Tom Lane έγραψε στις Feb 24, 2006 : > > > > > By definition, an AFTER trigger is too late to change what was > > > stored. Use a BEFORE trigger. > > > > Too late if someone wants to store it. > > I wanna store the in

Re: [SQL] CREATE TABLE AS and tablespaces

2006-02-24 Thread Bruce Momjian
Markus Schaber wrote: > Hello, > > Recently, I wanted to create a table from a complex query in a specific > tablespace, but CREATE TABLE name AS SELECT ... does not accept a > tablespace argument. > > I worked around it by CREATE TABLE name AS SELECT ... LIMIT 0, then > moving the generated tabl

Re: [SQL] Obtaining client IP address

2006-02-24 Thread Michael Fuhr
On Sat, Feb 25, 2006 at 12:16:31AM +0100, Alexis Paul Bertolini wrote: > The client has no idea what public IP it has. The server ought to > know... however I haven't found how I could get this info into my query. What version of PostgreSQL are you running? In 8.0 and later you can use inet_clie

[SQL] Obtaining client IP address

2006-02-24 Thread Alexis Paul Bertolini
Hi, I need to have a db table containing all connected clients (of a distributed application) and among other info, their IP. If both the client and the server are on the same LAN, no problem, the client can supply it's own info. But if they are connected via some sort of bridge/router/NAT?

Re: [SQL] Can't connect to the db

2006-02-24 Thread Andrew Sullivan
Looks like your database didn't start up. You should look at your server logs to see why. A On Fri, Feb 24, 2006 at 04:17:14PM -0600, Judith wrote: > Hello every one I was using my db with an application in perl, but > something occurs with the application and the pc got frozen and I had > to

[SQL] Can't connect to the db

2006-02-24 Thread Judith
Hello every one I was using my db with an application in perl, but something occurs with the application and the pc got frozen and I had to restart my PC, when it boot again I coudn't restart the psql service when I do the psql mydb it shows me the next error, the error is in spanish but it sa

Re: [SQL] After Trigger assignment to NEW

2006-02-24 Thread Owen Jacobson
Achilleus Mantzios wrote: > O Tom Lane έγραψε στις Feb 24, 2006 : > > > By definition, an AFTER trigger is too late to change what was > > stored. Use a BEFORE trigger. > > Too late if someone wants to store it. > I wanna store the intented original values, thats why i use > AFTER trigger. > Bu

Re: [SQL] After Trigger assignment to NEW

2006-02-24 Thread Achilleus Mantzios
O Tom Lane έγραψε στις Feb 24, 2006 : > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> Achilleus Mantzios <[EMAIL PROTECTED]> writes: > >>> Is there a reason that the NEW values should remain unchanged in AFTER > >>> row triggers? > >> > >> By definition, an AFTER trigger is

Re: [SQL] After Trigger assignment to NEW

2006-02-24 Thread Achilleus Mantzios
O Tom Lane έγραψε στις Feb 24, 2006 : > Achilleus Mantzios <[EMAIL PROTECTED]> writes: > > Is there a reason that the NEW values should remain unchanged in AFTER > > row triggers? > > By definition, an AFTER trigger is too late to change what was stored. > Use a BEFORE trigger. Too late if some

Re: [SQL] Missing fields on Query result.

2006-02-24 Thread Daniel Hernandez
Never Mind, it's solved now,Thanx any way, regards,Daniel Hernández.Tijuana, BC, México."More you learn, more you earn". --- On Fri 02/24, Daniel Hernandez < [EMAIL PROTECTED] > wrote:From: Daniel Hernandez [mailto: [EMAIL PROTECTED]To: pgsql-sql@postgresql.orgDate: Fri, 24 Feb 2006 13:08:51 -050

[SQL] Missing fields on Query result.

2006-02-24 Thread Daniel Hernandez
Hi Guys,   I have another question, but in this time is regarding to a query that supose to return son char fields, but they don't show up, I'm using ODBC Driver 7.03.02.00 with Delphi 6.Thanks in advanced, and regards,Daniel Hernández.Tijuana, BC, México."More you learn, more you earn".Join Exci

Re: [SQL] After Trigger assignment to NEW

2006-02-24 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Achilleus Mantzios <[EMAIL PROTECTED]> writes: >>> Is there a reason that the NEW values should remain unchanged in AFTER >>> row triggers? >> >> By definition, an AFTER trigger is too late to change what was stored. >> Use a BEFORE

Re: [SQL] After Trigger assignment to NEW

2006-02-24 Thread Alvaro Herrera
Tom Lane wrote: > Achilleus Mantzios <[EMAIL PROTECTED]> writes: > > Is there a reason that the NEW values should remain unchanged in AFTER > > row triggers? > > By definition, an AFTER trigger is too late to change what was stored. > Use a BEFORE trigger. But a BEFORE trigger would alter the st

Re: [SQL] After Trigger assignment to NEW

2006-02-24 Thread Tom Lane
Achilleus Mantzios <[EMAIL PROTECTED]> writes: > Is there a reason that the NEW values should remain unchanged in AFTER > row triggers? By definition, an AFTER trigger is too late to change what was stored. Use a BEFORE trigger. regards, tom lane

[SQL] After Trigger assignment to NEW

2006-02-24 Thread Achilleus Mantzios
Hi, i am currently on 7.4.12, and i what i try to do is having an AFTER row trigger nullify one NEW column, so as to prevent a subsequent (AFTER row) trigger from using this column's data. Unfortunately this nullification (assignment) does not have any effect on the next AFTER trigger. The fi

Re: [SQL] "Installing" dbLink

2006-02-24 Thread A. Kretschmer
am 24.02.2006, um 11:48:44 + mailte Richard C folgendes: > Hi > > When I execute the query: > > SELECT * > FROM dblink('dbname=Bas','SELECT id FROM person') AS t(a int) > WHERE t.a > 9000 AND T.a < 9050; > > I receive the error message > > ERROR: function dblink("unkn

[SQL] "Installing" dbLink

2006-02-24 Thread Richard C
Hi   When I execute the query:   SELECT *FROM dblink('dbname=Bas','SELECT id FROM person') AS t(a int)WHERE t.a > 9000 AND T.a < 9050;   I receive the error message   ERROR:  function dblink("unknown", "unknown") does not exist   How do I install or setup the function dbLink so that I ca

[SQL] CREATE TABLE AS and tablespaces

2006-02-24 Thread Markus Schaber
Hello, Recently, I wanted to create a table from a complex query in a specific tablespace, but CREATE TABLE name AS SELECT ... does not accept a tablespace argument. I worked around it by CREATE TABLE name AS SELECT ... LIMIT 0, then moving the generated table to the other tablespace using ALTER