Triggers: options besides compiled code?

Started by Roland Robertsalmost 28 years ago6 messagesgeneral
Jump to latest
#1Roland Roberts
roberts@panix.com

I started to look at the triggers documentation and was immediately
dismayed to discover that I would have compile code to create a
trigger. I have been using the old "rules" mechanism to automatically
put a sequence number into a tuple when inserting new rows. Are my
choices limited to just (1) compiled code, and (2) the old rules
mechanism?

roland
--
Roland B. Roberts
roberts@panix.com

#2Brian
signal@shreve.net
In reply to: Roland Roberts (#1)
Re: [GENERAL] Triggers: options besides compiled code?

On 9 Jul 1998, Roland Roberts wrote:

I started to look at the triggers documentation and was immediately
dismayed to discover that I would have compile code to create a
trigger. I have been using the old "rules" mechanism to automatically
put a sequence number into a tuple when inserting new rows. Are my
choices limited to just (1) compiled code, and (2) the old rules
mechanism?

if you insert a new row, isn't the sequence automatically inserted?

roland
--
Roland B. Roberts
roberts@panix.com

/-------------------------- signal@shreve.net -----------------------------\
| Brian Feeny | USR TC Hubs | ShreveNet Inc. (318)222-2638 |
| Network Administrator | Perl, Linux | Web hosting, online stores, |
| ShreveNet Inc. | USR Pilot | Dial-Up 14.4-56k, ISDN & LANs |
| 89 CRX DX w/MPFI, lots of |-=*:Quake:*=-| http://www.shreve.net/ |
| mods/Homepage coming soon |LordSignal/SN| Quake server: 208.206.76.47 |
\-------------------------- 318-222-2638 x109 -----------------------------/

#3Jackson, DeJuan
djackson@cpsgroup.com
In reply to: Brian (#2)
RE: [GENERAL] Triggers: options besides compiled code?

I started to look at the triggers documentation and was immediately
dismayed to discover that I would have compile code to create a
trigger. I have been using the old "rules" mechanism to

automatically

put a sequence number into a tuple when inserting new rows. Are my
choices limited to just (1) compiled code, and (2) the old rules
mechanism?

if you insert a new row, isn't the sequence automatically inserted?

It is if you use table defaults. (see 'create table', and 'netval()')
-DEJ

#4Roland Roberts
roberts@panix.com
In reply to: Jackson, DeJuan (#3)
Re: [GENERAL] Triggers: options besides compiled code?

"dej" == Jackson, DeJuan <djackson@cpsgroup.com> writes:

if you insert a new row, isn't the sequence automatically
inserted?

dej> It is if you use table defaults. (see 'create table', and
dej> 'netval()')

Thanks for the tip; Richard Lynch <lynch@lscorp.com> had sent me the
same information via email. I was unaware of the "default" clause
which certainly makes this piece easier.

I guess I'm still stuck with writing C-code to get cascading deletes,
but I can probably postpone that requirement for a while....

Thanks,

roland
--
Roland B. Roberts
roberts@panix.com

#5Anton St�ckl
tony@cys.de
In reply to: Jackson, DeJuan (#3)
howto insert german umlaute into DB

Hi there,

Please see subject.
I guess the problem is, that my unix shell doesn't accept them.
Are there any escape sequences I could use?

regards, Tony
--
----------C-Y-B-E-R-S-O-L-U-T-I-O-N-S----------------
Anton St�ckl mailto:tony@cys.de
CyberSolutions GmbH http://www.cys.de
Frankfurter Ring 193A Phone +49 89 32369223
80807 Muenchen Fax +49 89 32369220
------W-E----M-A-K-E----I-T----P-O-S-S-I-B-L-E-------

#6Jackson, DeJuan
djackson@cpsgroup.com
In reply to: Roland Roberts (#4)
RE: [GENERAL] Triggers: options besides compiled code?

Check out the contrib/refint.* in the distribution. I believe it
handles CASCADE DELETE.
-DEJ

Show quoted text

-----Original Message-----
From: Roland Roberts [SMTP:roberts@panix.com]
Sent: Sunday, July 12, 1998 3:00 PM
To: pgsql-general@postgreSQL.org
Subject: Re: [GENERAL] Triggers: options besides compiled code?

"dej" == Jackson, DeJuan <djackson@cpsgroup.com> writes:

if you insert a new row, isn't the sequence automatically
inserted?

dej> It is if you use table defaults. (see 'create table', and
dej> 'netval()')

Thanks for the tip; Richard Lynch <lynch@lscorp.com> had sent me the
same information via email. I was unaware of the "default" clause
which certainly makes this piece easier.

I guess I'm still stuck with writing C-code to get cascading deletes,
but I can probably postpone that requirement for a while....

Thanks,

roland
--
Roland B. Roberts
roberts@panix.com