Re: [SQL] Permissions for foreign keys

2001-02-01 Thread Ross J. Reedstrom
Rick - Thanks for checking that. I should've done it myself. Sorry I didn't respond when you asked for confirmation. Ross On Thu, Feb 01, 2001 at 05:38:12PM -0500, Rick Delaney wrote: > Rick Delaney wrote: > > > > "Ross J. Reedstrom" wrote: > > > > > > This is a bug that was fixed in 7.1beta f

Re: [SQL] how to create this trigger?

2001-02-01 Thread Albert REINER
Don't know much, but couldn't you let increment_value take an argument and run it on new.code? But maybe I am completely off. Albert. On Thu, Feb 01, 2001 at 04:48:28PM -0500, Ramiro Arenas Ramírez wrote: > I need to create a trigger that increment a value in a column > of table1 where a row

Re: [SQL] Permissions for foreign keys

2001-02-01 Thread Rick Delaney
Rick Delaney wrote: > > "Ross J. Reedstrom" wrote: > > > > This is a bug that was fixed in 7.1beta for sure, but also 7.0.3, > > I believe. So it's as simple as upgrading. > > Thanks, I'll upgrade. I couldn't find this listed in any changes files > so can you (or anyone) confirm that this is fi

[SQL] RE: how to create this trigger?

2001-02-01 Thread Michael Davis
Did you insert a row into table2? What happens if there is no row in table 1 where id = code (of the newly inserted row in table2). Seems to me you many need to consider expanding increment_value() to check table1 to see if code exists. If not insert a new value, else update. -Original

[SQL] how to create this trigger?

2001-02-01 Thread Ramiro Arenas Ramírez
I need to create a trigger that increment a value in a column of table1 where a row is inserted in table 2 I have tried whit this but it just does nothing. CREATE FUNCTION increment_value () RETURNS opaque AS 'DECLARE code int4; BEGIN code := new.code; UPDATE table1 SET value =

[SQL] PL/pgSQL: possible parsing or documentation bug?

2001-02-01 Thread Albert REINER
Saluton, plpgsql seems to get confused when using variable names that coincide with, e.g., column names: create Function IdOfPossiblyNewAuthor(text) returns int4 as ' declare id int4; begin select id into id from author where name = $1; raise notice ''ID found: %'', id; if id

Re: [SQL] Image insertion by using BLOB

2001-02-01 Thread Peter T Mount
Quoting Som <[EMAIL PROTECTED]>: > Hi ALL, > I am trying to insert the image from the client to database by > spicifying the Windows NT machine filepath. > The server(postgresql 7.0) is situated at the linux. > If filepath is linux m/c's then i can ... > If filepath is winNT then i have Exceptio

[SQL] usage of lo_import

2001-02-01 Thread Padmajha Raghunathan
Hi all, Thru psql , when i try to insert into the table with the a large object as insert into some_table values('pp','lo_import('easi.gif')); it gives an error message as ERROR: You must have Postgres superuser privilege to use server-side lo_import(). Anyone can use the