[SQL] How to change database owner in PostgreSQL 7.4?

2005-11-26 Thread frank church
Hi guys, What is the command change database owner in PostgreSQL 7.4? This message was sent using IMP, the Internet Messaging Program. ---(end of broadcast)--- TIP 9: In versions b

Re: [SQL] How to change database owner in PostgreSQL 7.4?

2005-11-26 Thread Andreas Kretschmer
frank church <[EMAIL PROTECTED]> schrieb: > Hi guys, > > What is the command change database owner in PostgreSQL 7.4? ALTER DATABASE foo OWNER TO blob; In general: start psql and type '\h alter database', and, more general, '\h' and '\?' HTH, Andreas -- Really, I'm not out to destroy Micros

Re: [SQL] Is it possible to redirect an update/insert/delete to a different table?

2005-11-26 Thread JuanCri
I don't know what do you mean... because if you want to insert to other table.. you can create a rule like this CREATE RULE myrule AS ON INSERT TO mytable DO INSTEAD INSERT INTO myothertable VALUES (NEW.col1, NEW.col2, NEW.col3); that will work for all inserts.. I think the problem will be the SE

Re: [SQL] query

2005-11-26 Thread JuanCri
First, INSERT statements are 1 to 1 with table rows... (unless you use a insert/select). Second, if you want to probe that.. it is better to create an UNIQUE index.. isn't it? Ok, if that's not enough for you... you can create a trigger that perform a SELECT COUNT(*) with the criteria and if it's

[SQL] Storing HTML in table

2005-11-26 Thread Rob
Hi: I need to store markup in a database to control how the browser renders the page information. I would like complete control over this information -- so if sometime in the future it's decided to totally redesign the layout. Also, at some point a tool will be created so novice computer users ca

Re: [SQL] A Not Join

2005-11-26 Thread stig erikson
L van der Walt wrote: > I have three table: > Users - Contains username, ID etc... > Permissions - A permission name and ID > Link up table - The user.id and permission.id > > If a user.id and a permission.id row exists in the linkuptable the user > have that permission granted. > > With the stat

[SQL] Drop functions

2005-11-26 Thread Wim Audenaert
Hello, I want to drop all functions from my data base. Is their an easy way to do this? Or did somebody wrote a function, or a sql script that deletes all functions? Thanks a lot for your help. Best regards, Wim ---(end of broadcast)--- TIP

[SQL] join if all matches

2005-11-26 Thread Sim Zacks
I am trying to figure out an sql statement and I was hoping someone could help. I'm having brainfreeze right now. Table Rules RuleID RuleName Table RuleAgents RuleAgentID RuleID Agent Table RuleActions RuleActionID RuleID Action I am passing in an array of agents

[SQL] MAX, MIN and arrays

2005-11-26 Thread Colton A Smith
Hi: Let's say I have a table with a column of one-dimensional arrays. What exactly is returned when the database is queried for a maximum from that particular column? The array was the greatest average value? Let's say I have a table with a column of two-dimensional arrays. What then? T