[SQL] Trigger

2000-09-06 Thread Craig May
Could someone send me a quick example of a trigger.

Re: [SQL] Trigger

2000-09-06 Thread Chris Ryan
Craig May wrote: > > Could someone send me a quick example of a trigger. Hope this helps. Chris Ryan <<< Clip below and execute to create example >>> -- -- FUNCTION: trigger_last_updated -- -- DESCRIPTION: -- This is a function called by the table triggers to update the last_updated -- field o

Re: [SQL] Trigger

2000-09-06 Thread Chris Ryan
Chris Ryan wrote: > > Craig May wrote: > > > > Could someone send me a quick example of a trigger. > > Hope this helps. > > Chris Ryan > -- snipped code -- I am so sorry but you may have noticed my email client wrapped lines it shouldn't have. I have attached the file this time. Chris Ryan

Re: [SQL] Protection of tables by group and not by users

2000-09-06 Thread Jie Liang
Hi there, I don't quite know what really want to do, however, postgres support group , so you can create a group one time, then grant or revoke this group of people from an object just need the group name. see CREATE GROUP groupname [EMAIL PROTECTED] wrote: > > Hello, > > Is it possible t

Re: [SQL] Cascading Deletes

2000-09-06 Thread Stephan Szabo
I think a references constraint on ID referencing _ID with ON DELETE CASCADE should do what you want. Stephan Szabo [EMAIL PROTECTED] On Wed, 6 Sep 2000, Craig May wrote: > Hi, > > I have a tables having this structure: > > ID (int) | _ID (int) | Name (String) > > > _ID is the parent of ID

Re: [SQL] Cascading Deletes

2000-09-06 Thread Jie Liang
Hi, there, 2 ways may resolve you problem, I believe: 1. re_create your table set _ID as primary key and ID as foreign key with option ON DELETE CASCADE if _ID is unique key. 2. create a rule bind this table, for each row deleting(or create a trigger). Craig May wrote: > Hi, > > I have a ta

[SQL] Re: Auto increment

2000-09-06 Thread Mads Jensen
> 1: Haven't been able to find the officiel manual to pgsql. What's the > complete URL? > 2: How can I make an auto increment with PostGreSQL? is it "inherit"? > 3: The "SHOW TABLE FROM pcfocus" statement, does it work in pgsql? never mind, i found out myself: 1: not officiel, but anyway: http://

[SQL] crypt function

2000-09-06 Thread Francisco André Barbosa Neto
                Hi, my name is Andrew and I'm new to PostgreSQL.             Nowadays I'm using PostgreSQL version 7.02, and I have a table like this:   name varchar(8) password varchar(16)               How can I put the password into the table in a encrypted form, i try to do it:   INSERT

Re: [SQL] Re: [ADMIN] 7.0.2 questions on encoding and compilation

2000-09-06 Thread Igor N. Avtaev
Max Pyziur wrote: > On Thu, 31 Aug 2000, Igor N. Avtaev wrote: > > > [EMAIL PROTECTED] wrote: > > > > > Currently, I'm using the the 7.0.2 rpms from the postgresql.org > > > on a RH6.2 install. > > > > > > I have a few questions on it and the use of the -E flag. > > > > > > 1 - can 7.0.2 be optim

[SQL] Re: Cascading Deletes

2000-09-06 Thread K Parker
> 1. re_create your table set _ID as primary key This is not going to work unless a parent is prohibited from having more than one child. From the brief sample data supplied, this is clearly not the case. Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at htt

Re: [SQL] crypt function

2000-09-06 Thread Ian Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > INSERT INTO TABLE users VALUES ('test',crypt('passtest')); AFAIK there is no builtin crypt function. If you want one, use PL/perl to call the perl crypt function. Ian Turner -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.1 (GNU/Linux) Comment:

Re: [SQL] Re: [ADMIN] 7.0.2 questions on encoding and compilation

2000-09-06 Thread Dana Hudes
RTFM for gcc -mcpu=i686 On Wed, 6 Sep 2000, Max Pyziur wrote: > > > On Thu, 31 Aug 2000, Igor N. Avtaev wrote: > > > [EMAIL PROTECTED] wrote: > > > > > Currently, I'm using the the 7.0.2 rpms from the postgresql.org > > > on a RH6.2 install. > > > > > > I have a few questions on it and the u

Re: [SQL] Re: [ADMIN] 7.0.2 questions on encoding and compilation

2000-09-06 Thread Max Pyziur
On Thu, 31 Aug 2000, Igor N. Avtaev wrote: > [EMAIL PROTECTED] wrote: > > > Currently, I'm using the the 7.0.2 rpms from the postgresql.org > > on a RH6.2 install. > > > > I have a few questions on it and the use of the -E flag. > > > > 1 - can 7.0.2 be optimized for i686 architecture or is >

[SQL] RE: [ADMIN] 7.0.2 questions on encoding and compilation

2000-09-06 Thread Max Pyziur
On Wed, 6 Sep 2000, vijayendra mohan agrawal wrote: > 2. createdb -E option can be used, but it seems it needs a re-compilation > which will make "pg_encoding" in your pgsql/bin directory. configure > with --enable-multibyte option and re-install postgreSQL... it should serve > the purpose. Wh