Re: [SQL] Before/After Trigger User Switching

2003-08-20 Thread Aasmund Midttun Godal
I have upgraded to 7.3.4 and the problem persists. Aasmund Midttun Godal writes: When an operation is done throug a SECURITY DEFINER style function and causes a trigger the current_user depends on whether it is executed BEFORE or AFTER. I currently run 7.3.2. I believe the BEFORE behavior

[SQL] Suggestion: md5/crypt functions in sql

2002-10-06 Thread Aasmund Midttun Godal
It would be very usefull to have these in sql, so that it is even easier to create tables with encrypted passwords. Regards, Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46 ---(end of broadcast)--- TIP 4: Don't

Re: [SQL] transposing data for a view

2001-10-31 Thread Aasmund Midttun Godal
organizations. San Francisco ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46 ---(end of broadcast

Re: [SQL] autoincrement

2001-10-25 Thread Aasmund Midttun Godal
: subscribe and unsubscribe commands go to [EMAIL PROTECTED] Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46 ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[SQL] Error codes as numbers or in other languages etc.

2001-10-23 Thread Aasmund Midttun Godal
postgres great? reverse regular expression searches :) my $s = execute($dbh-errstr); then we exploit perl's ability: $dbh-errstr =~ /$s-{'errorstring'}/$s-{'message'}/e; Hopes someone else find it usefull, Getting out numbers is offcourse even easier. Aasmund Midttun Godal [EMAIL PROTECTED

Re: [SQL] PL/pgSQL triggers ON INSERT OR UPDATE

2001-10-23 Thread Aasmund Midttun Godal
; ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46 ---(end of broadcast)--- TIP 1: subscribe and unsubscribe

Re: [SQL] CREATE RULE ON UPDATE/DELETE

2001-10-22 Thread Aasmund Midttun Godal
: Surely you'd need something like CREATE RULE dbl_update AS ON UPDATE TO dbl DO INSTEAD UPDATE raw SET id = NEW.id / 2, name = NEW.name WHERE OLD.id = id * 2; (untested...) regards, tom lane Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20

Re: [SQL] CREATE RULE ON UPDATE/DELETE

2001-10-22 Thread Aasmund Midttun Godal
: Surely you'd need something like CREATE RULE dbl_update AS ON UPDATE TO dbl DO INSTEAD UPDATE raw SET id = NEW.id / 2, name = NEW.name WHERE OLD.id = id * 2; (untested...) regards, tom lane Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20

Re: [SQL] oid's in views.

2001-10-22 Thread Aasmund Midttun Godal
That is what i did... Regards, Aasmund On Sat, 20 Oct 2001 23:34:44 -0400 (EDT), Joel Burton [EMAIL PROTECTED] wrote: On Sun, 21 Oct 2001, Aasmund Midttun Godal wrote: Aasmund -- If your problem is that you want to update VIEWs and aren't sure what the PK for the view is, could you

[SQL] CREATE RULE ON UPDATE/DELETE

2001-10-20 Thread Aasmund Midttun Godal
| th 50 | tgh (5 rows) envisity=# UPDATE bar SET id = id + 10 where id 10; UPDATE 0 envisity=# select * from foo; id | name +-- 1 | t 2 | tr 22 | tg 24 | th 25 | tgh (5 rows) envisity=# UPDATE bar SET id = id + 10 where id 10; UPDATE 0 -- Here it doesn't work. Aasmund Midttun

Re: [SQL] oid's in views.

2001-10-19 Thread Aasmund Midttun Godal
of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46 ---(end of broadcast)--- TIP

Re: [SQL] Need a VIEW without SUB-SELECT

2001-10-19 Thread Aasmund Midttun Godal
Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

[SQL] oid's in views.

2001-10-18 Thread Aasmund Midttun Godal
column will always be blank. The oid column can never be used for anything usefull. There are many workarounds to this problem - and I appreciate that altering this behaviour might be contradictory to some design philosophy you may have. Just my comment that's all! Aasmund Midttun Godal [EMAIL

[SQL] Access to functions

2001-10-18 Thread Aasmund Midttun Godal
looked through the todo, and albeit being a lot of new features in the grant section I cannot find any info regarding these issues. Sincerely, Aasmund. Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46 ---(end of broadcast

Re: [SQL] Triggers do not fire

2001-10-16 Thread Aasmund Midttun Godal
of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED]) Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46 ---(end

[SQL] Variables.

2001-10-16 Thread Aasmund Midttun Godal
that there is some sort of SESSION_ID environment variable. Some of the uses: * Store things like personal preferences * Parameters from a webserver * Client application name * etc. Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46 ---(end

Re: [SQL] Indexes

2001-10-15 Thread Aasmund Midttun Godal
On Sat, 13 Oct 2001 14:17:48 GMT, Aasmund Midttun Godal [EMAIL PROTECTED] wrote: On Fri, 12 Oct 2001 19:33:46 -0700 (PDT), Stephan Szabo [EMAIL PROTECTED] wrote: Well, then another question; will a function be only evaluated once inside a query with the specific arguments? i.e.will

[SQL] Restricting access to Large objects

2001-10-15 Thread Aasmund Midttun Godal
I sent with the wrong email first. sorry. I can't find any docs / mails on this subject. How can I restrict access to large objects. 1.) Based on users. 2.) Rules/triggers? Thanx. Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46 -- End Forwarded

[SQL] Restricting access to Large objects

2001-10-15 Thread Aasmund Midttun Godal
I can't find any docs / mails on this subject. How can I restrict access to large objects. 1.) Based on users. 2.) Rules/triggers? Thanx. Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46 ---(end of broadcast

Re: [SQL] problem w/plpgsql proc

2001-10-15 Thread Aasmund Midttun Godal
-lounge/docs/faq.html Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46 ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[SQL] Indexes

2001-10-12 Thread Aasmund Midttun Godal
the source...) I would be glad to know. Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46 ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[SQL] Restricting access to large objects.

2001-10-10 Thread Aasmund Midttun Godal
I sent with the wrong email first. sorry. I can't find any docs / mails on this subject. How can I restrict access to large objects. 1.) Based on users. 2.) Rules/triggers? Thanx. Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46

[SQL] VARCHAR vs TEXT

2001-10-10 Thread Aasmund Midttun Godal
. Or am I correct to assume that if you need a place to store some text, and you are not sure how much (like an email address or a name) you are best off using text? Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46 ---(end of broadcast

[SQL] PlPerl

2001-10-07 Thread Aasmund Midttun Godal
1. Is there a plperlu? ... unsafe version of perl? 2. Is it possible to select which packages the plperl should have access to? 3. What exactly can you and can't you do. Thank you for your attention. Aasmund Midttun Godal [EMAIL PROTECTED] - http://www.godal.com/ +47 40 45 20 46