[SQL] how to check presence of a function and set permissions?

2001-05-21 Thread Bruno Boettcher
hello! since i am now destroying and recreating my functions at every request (due to the fact that pl/psql can't cope with dynamic table names, and i didn't found anywhere a decent doc about pl/perl) i have now the problem, that a psql error is displayed if i try to drop a nonexistent function,

Re: [SQL] how to check presence of a function and set permissions?

2001-05-21 Thread Tod McQuillin
On Mon, 21 May 2001, Bruno Boettcher wrote: > since i am now destroying and recreating my functions at every request > (due to the fact that pl/psql can't cope with dynamic table names, I don't know about the rest of your question but I believe PostgreSQL supports dynamic queries in plpgsql sinc

[SQL] sequence problem

2001-05-21 Thread gabi munteanu
I have the following problem. I have a table [friends] and it looks like this: id serial name varchar(25) phone varchar(15) After I created it tehre is also a sequence that generates me the ids friens_id_seq Let's say I have 5 records. If I remove the 3th my ids

[SQL] how to set ownership of tables?

2001-05-21 Thread Bruno Boettcher
Hello! how can i change the ownership of a table? i have the problem that i create table with CONSTRAINTS on other tables, those others have a different owner... and thus the creation of the table is refused is it possible to make constraints on tables whithout having their ownership? is it

Re: [SQL] sequence problem

2001-05-21 Thread Stephan Szabo
On Mon, 21 May 2001, gabi munteanu wrote: > I have the following problem. > > I have a table [friends] and it looks like this: >id serial >name varchar(25) >phone varchar(15) > After I created it tehre is also a sequence that generates me the ids > friens_id_s

[SQL] Define timestamp with no timezone

2001-05-21 Thread Sandhya Bellave
Hi, I have defined a table with a column of type timestamp. The value that I insert into this column is automatically appended with the timezone offset. How do I prevent this? Can I define a column as timestamp with no timezone? Thanks, -Sandhya. ---(end of broadcast)

[SQL] RULES

2001-05-21 Thread J.Fernando Moyano
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I need something like this . CREATE RULE piezas_add AS ON insert TO piezas DO update materia_prima set usadas=(usadas+1) where n_material=new.n_material; CREATE RULE piezas_delete AS ON delete TO piezas D