Re: [SQL] must I create the function check_primary_key ?

2001-04-25 Thread Stephan Szabo
On Wed, 25 Apr 2001, Peter J. Schoenster wrote: > I want to use this referential integrity etc. that I've never used in > mysql ... so I tried many things and looked here and there ... My > example below produces this error: > > > CreateTrigger: function check_primary_key() does not exist >

[SQL] must I create the function check_primary_key ?

2001-04-25 Thread Peter J. Schoenster
Hi, Thanks to many who clued me on on using "arrow keys" to traverse history. I just installed readline and 7.1 .. seems that mysql has its own readline. I want to use this referential integrity etc. that I've never used in mysql ... so I tried many things and looked here and there ... My ex

Re: [SQL] use of arrow keys to traverse history

2001-04-25 Thread Martín Marqués
On Jue 26 Abr 2001 01:08, Grant wrote: > I am finding that I can't use the cursor keys at all in psql after I > upgraded to v7.1. I have installed v7.1 on redhat 7.1, mandrake 7.2, > redhat 6.2 and none of them allow me to use the cursors keys, where as > v7.0.3 did. I haven't changed anything on

Re: [SQL] use of arrow keys to traverse history

2001-04-25 Thread Grant
I am finding that I can't use the cursor keys at all in psql after I upgraded to v7.1. I have installed v7.1 on redhat 7.1, mandrake 7.2, redhat 6.2 and none of them allow me to use the cursors keys, where as v7.0.3 did. I haven't changed anything on the system except upgrade postgresql to v7.1. A

Re: [SQL] use of arrow keys to traverse history

2001-04-25 Thread Grant
> That's because your version (talking about binaries) are not compiled with > readline support. :-) Which binaries are not compiled with readline support? Why did this change from 7.0.3 -> 7.1? Thanks. ---(end of broadcast)--- TIP 5: Have you

Re: [SQL] Error explaination?

2001-04-25 Thread Josh Berkus
Jan, Thanks for the quick response. > This is a known misbehaviour (not to call it a bug) that we > keep since having deferrable referential integrity. Some sort of "catch 22" I take it? Am I correct in understanding that my choices are to: a) do something oth

Re: [SQL] Error explaination?

2001-04-25 Thread Jan Wieck
Josh Berkus wrote: > Folks, > >I have a fuction that creates a record in a table called user_locks, > does a bunch of stuff, then deletes the record. However, when I try to > run it, I get the following error: > > ERROR: triggered data change violation on relation "user_locks" > >It appe

[SQL] problems with pl/pgsql

2001-04-25 Thread Mark Nielsen
hey guys, I am writing an article about using Perl inside sql commands. I am not having a problem with perl, but with pl/pgsql. The documentation for pl/pgsql isn't helping me out, although I am sure I will figure it out eventually. Here is the perl function, CREATE FUNCTION search_name(employee

Re: [SQL] RI permission problem

2001-04-25 Thread Peter Eisentraut
Kyle writes: > Peter Eisentraut wrote: > > > Kyle writes: > > > > > Is there a way to get this to work without granting update to table b? > > > > Update to 7.1.] > > I'm on 7.1. Should an RI trigger under 7.1 run as the DBA or as the current > user? Okay, we missed a few cases. Try the attach

Re: [SQL] RI permission problem

2001-04-25 Thread Stephan Szabo
On Wed, 25 Apr 2001, Kyle wrote: > Peter Eisentraut wrote: > > > Kyle writes: > > > > > Is there a way to get this to work without granting update to table b? > > > > Update to 7.1.] > > I'm on 7.1. Should an RI trigger under 7.1 run as the DBA or as the current > user? IIRC, only the checks

[SQL] Error explaination?

2001-04-25 Thread Josh Berkus
Folks, I have a fuction that creates a record in a table called user_locks, does a bunch of stuff, then deletes the record. However, when I try to run it, I get the following error: ERROR: triggered data change violation on relation "user_locks" It appears that the function ha

Re: [SQL] RI permission problem

2001-04-25 Thread Kyle
Peter Eisentraut wrote: > Kyle writes: > > > Is there a way to get this to work without granting update to table b? > > Update to 7.1.] I'm on 7.1. Should an RI trigger under 7.1 run as the DBA or as the current user? > > > > Tom, I understand someone was working on setuid functions. Is that

Re: [SQL] use of arrow keys to traverse history

2001-04-25 Thread Dorin Grunberg
You need to install Readline library. I know I used readline 4.1 and it works great. Dorin At 12:42 PM 4/25/2001 -0600, Peter J. Schoenster wrote: >Hi, > >Not sure where this question belongs ... I thought postgresql was >running under the bash shell where I can use up and down arrow >keys to

Re: [SQL] use of arrow keys to traverse history

2001-04-25 Thread Andrew Perrin
These do suggest (although not require) that the *user* postgres will be running bash when logged in. To check for sure, do: finger postgres which will give you the current shell among other things. However, this doesn't speak to what I think you're asking, which is command history and completi

Re: [SQL] RI permission problem

2001-04-25 Thread Peter Eisentraut
Kyle writes: > Is there a way to get this to work without granting update to table b? Update to 7.1. > Tom, I understand someone was working on setuid functions. Is that a > long way off? It would be nifty if triggers could execute with the > privileges of the user that created them rather th

[SQL] use of arrow keys to traverse history

2001-04-25 Thread Peter J. Schoenster
Hi, Not sure where this question belongs ... I thought postgresql was running under the bash shell where I can use up and down arrow keys to traverse my command history. I can do this in mysql but oddly not in oracle or postgresql. /home/postgres -rw-r--r-- 1 postgres postgres 1422 F

Re: [SQL] Table corrupted and data lost (second time in one month!!)

2001-04-25 Thread Tom Lane
"J.Fernando Moyano" <[EMAIL PROTECTED]> writes: > The postgres version is 7.0.2 ... I'd suggest an update to 7.1 ... regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[SQL] RI permission problem

2001-04-25 Thread Kyle
Here's an interesting security problem:  Suppose I create two tables: create table a (    pk    int4 primary key,    aval    text ); create table b (     fk    int4 references a (pk) on update cascade,     bval ); Then I grant a user update to table a but not to table b.  He should be able to mod

Re: [SQL] MySql 'REPLACE'

2001-04-25 Thread Alessio Bragadini
Thomas Swan wrote: > You should be able to do this with two separate queries inside a > transaction. Yes, sorry, I was not clear enough. Unfortunately, the function I need to write is a "generic" one that takes a number of fields/values and generate a SQL instruction. So, there is no previous in

[SQL] MySql 'REPLACE'

2001-04-25 Thread Alessio Bragadini
I am working in porting the Slash software from MySql to PostgreSQL. I stepped in MySql's REPLACE command (a SQL command) that to my knowledge is not supported by PostgreSQL and it's not standard SQL. According to MySql's manual: "REPLACE works exactly like INSERT, except that if an old record in

Re: [SQL] MySql 'REPLACE'

2001-04-25 Thread Thomas Good
On Wed, 25 Apr 2001, Alessio Bragadini wrote: > I am working in porting the Slash software from MySql to PostgreSQL. I > stepped in MySql's REPLACE command (a SQL command) that to my knowledge > is not supported by PostgreSQL and it's not standard SQL. According to > MySql's manual: > > "REPLACE

Re: [SQL] RE:Table corrupted and data lost (second time in onemonth!!)

2001-04-25 Thread Antti Linno
Hm, about memory exhausting I don't know, but the other day I tested the limits of the text field in Postgres 6.5.(2 or 3). When ppl inserted text in windows environment through html forms, then they got no more than 5000+a bit more symbols. Ok, I decided to test and inserted 8000+bit more from li