Re: [SQL] Old "Feature" - Copy table ignores column defaults

2002-11-13 Thread Tom Lane
I said: > 7.3 does have the ability to COPY a subset of a column's tables and > insert default values for the omitted columns. s/column's tables/table's columns/ Must be time to go to bed ... regards, tom lane ---(end of broadcast)

Re: [SQL] Old "Feature" - Copy table ignores column defaults

2002-11-13 Thread Tom Lane
Tim Perdue <[EMAIL PROTECTED]> writes: > I see there are a handful of reports of this, but it does seem broken to > me. If I am copying a table and a column is blank, surely it makes sense > to substitute the column default from the table? There is no such concept as "blank" in SQL. 7.3 does ha

[SQL] Old "Feature" - Copy table ignores column defaults

2002-11-13 Thread Tim Perdue
I see there are a handful of reports of this, but it does seem broken to me. If I am copying a table and a column is blank, surely it makes sense to substitute the column default from the table? Right now, it is substituting 0 for a null column, instead of -99 as I wished, and here I was compla

Re: [SQL] RE: [SQL] System´s database table

2002-11-13 Thread Jean-Luc Lachance
Thanks, I know about that. I was just hoping for a nice diagram. I guess I will have to wait for 7.3 anyhow if I do not want to waste my time doing one for 7.2 JLL Paul Ogden wrote: > > It's not ERD but I've found the information in the Developer's Guide > regarding system catalogs to be use

[SQL] RE: [SQL] System´s database table

2002-11-13 Thread Paul Ogden
It's not ERD but I've found the information in the Developer's Guide regarding system catalogs to be useful in the past. This http://www.postgresql.org/idocs/index.php?catalogs.html will get you started. Thanks, Paul Ogden Claresco Corporation > -Original Message- > From: [EMAIL PROTECT

Re: [SQL] System´s database table

2002-11-13 Thread Josh Berkus
Jean-Luc, > While we are on the subject, > is there any ERD of the system's table somewhere? Don't know ... but the system tables are about to change in 7.3. -- -Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)--- TIP

Re: [SQL] System´s database table

2002-11-13 Thread Jean-Luc Lachance
While we are on the subject, is there any ERD of the system's table somewhere? JLL Josh Berkus wrote: > > Pedro, > > > I´m looking for the name of the table that contains all databases in my > system. I already see this in the postgre manual, but i´m forgot where > > pg_database > > --

Re: [SQL] System´s database table

2002-11-13 Thread Josh Berkus
Pedro, > I´m looking for the name of the table that contains all databases in my system. I already see this in the postgre manual, but i´m forgot where pg_database -- -Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)-

[SQL] System´s database table

2002-11-13 Thread Pedro Igor Craveiro e Silva
I´m looking for the name of the table that contains all databases in my system. I already see this in the postgre manual, but i´m forgot where   Tanks ...   Pedro Igor

Re: [SQL] Permission on insert rules

2002-11-13 Thread Bruno Wolff III
On Wed, Nov 13, 2002 at 10:44:19 +, Luis Sousa <[EMAIL PROTECTED]> wrote: > > I have a table, whose primary key is a serial, that is connected to a > few tables. In this view, I want to insert data, in the main table, and > also in the "child" tables. My idea was to create a rule, that fi

Re: [SQL] Permission on insert rules

2002-11-13 Thread Josh Berkus
Luis, > There's any way to insert data inside the tables, using the > functions, called by the rules, without giving direct access to the > user ? > I don't know, using a trigger or any kind of structure !!?? Not until 7.3. Which is due out soon ... a couple of weeks, likely. -Josh Berkus

Re: [SQL] Permission on insert rules

2002-11-13 Thread Luis Sousa
Tom Lane wrote: Luis Sousa <[EMAIL PROTECTED]> writes: When inserting, using the rule, the insert that's defined on the rule works fine, but the insert defined inside the function, doesn't (that's the one that gives permssion denied). Right. As of 7.3 you can fix this by making the fu

Re: [SQL] SET DEFAULT

2002-11-13 Thread Achilleus Mantzios
On Wed, 13 Nov 2002, Archibald Zimonyi wrote: > > Hi everyone, > > I have a problem with adding a column to an existing table. I want to add > a column named modified which is of datatype TIMESTAMP and has a DEFAULT > CURRENT_TIMESTAMP as it's initial value. I cannot do this with ALTER > TABLE, it

[SQL] SET DEFAULT

2002-11-13 Thread Archibald Zimonyi
Hi everyone, I have a problem with adding a column to an existing table. I want to add a column named modified which is of datatype TIMESTAMP and has a DEFAULT CURRENT_TIMESTAMP as it's initial value. I cannot do this with ALTER TABLE, it tells me to user ALTER TABLE SET DEFAULT instead but I can

Re: [SQL] Passing OLD/NEW as composite type PL/PGSQL

2002-11-13 Thread Christoph Haller
> >Can I pass the the variables OLD and NEW (type > OPAQUE) to another function is expecting a composite > type as parameter? > >Are opaque considered as composite type? > Did you receive any other response? Did you check if it works by simply trying? As far as I understand the documentatio

Re: [SQL] Permission on insert rules

2002-11-13 Thread Luis Sousa
Hi again, I already know what's the problem. Actually, everything works fine in the example posted by Robert. Part of my rule is as simple as that example, but I'm also calling functions inside the rule. I have a table, whose primary key is a serial, that is connected to a few tables. In this v