Is it possible to have a single trigger on multiple tables
simultaneously? Example:
CREATE TRIGGER emp_cust_stamp BEFORE INSERT OR UPDATE ON employees, customers
FOR EACH ROW EXECUTE PROCEDURE last_updated_stamp();
I tried something like the above but get an error message at the comma. I tri
Richard Huxton wrote:
Jim C. Nasby wrote:
Is there some reason why the SERIAL data type doesn't
automatically have a UNIQUE CONSTRAINT.
It used to, and then we decoupled it.
[snip]
Arguably it would have been better to make the default case add either
UNIQUE or PRIMARY KEY with a way to over
Jim C. Nasby wrote:
On Tue, Sep 27, 2005 at 10:33:14AM -0500, Scott Marlowe wrote:
On Mon, 2005-09-26 at 20:03, Tom Lane wrote:
Ferindo Middleton Jr <[EMAIL PROTECTED]> writes:
Is there some reason why the SERIAL data type doesn't automatically have
a UNIQUE
Is there a way to change the position attribute of a column in a table?
I have data that I need to import into various tables in my db on a
consistent basis... I usually us e the COPY ... FROM query but I can't
control the -order- of the fields my client dumps the data so I would
like to be abl
w more of a one-size-fits-all philosophy. And hey, how hard can
it be to add the word UNIQUE when I'm creating tables?
Ferindo
Tom Lane wrote:
Ferindo Middleton Jr <[EMAIL PROTECTED]> writes:
Is there some reason why the SERIAL data type doesn't automatically have
a UNIQU
Is there some reason why the SERIAL data type doesn't automatically have
a UNIQUE CONSTRAINT. It seems that the main reason for using it is so
that the value for this field keeps changing automatically and is never
null so any one record can be identified using it- So why not imply that
it is a
refer to them. Thank you.
Ferindo
Tom Lane wrote:
Ferindo Middleton Jr <[EMAIL PROTECTED]> writes:
I have the following table:
CREATE TABLE gyuktnine (
id SERIAL,
intsystem INTEGER NOT NULL REFERENCES yuksystems(id) CONSTRAINT
int_canno
I have the following table:
CREATE TABLE gyuktnine (
id SERIAL,
intsystem INTEGER NOT NULL REFERENCES yuksystems(id) CONSTRAINT
int_cannot_equal_ext
CHECK (intsystem != extsystem),
extsystem INTEGER NOT NULL REFERENCES yuksystems(id) CONSTR
I have a table which has two id fields which REFERENCE data back at
another table. It's setup like this:
class_prerequisite_bindings(id SERIAL, class_id INTEGER REFERENCES
classes(id), prerequisiteINTEGER REFERENCES classes(id))
The classes table is like this:
classes(idSE
I have a table (table_one) with two columns, both of which are integers
which reference the same column (on a one-to-many relationship) row back
at another table (table_two) which has more detailed info on these
integer columns:
table_one has the following columns:
id (SERIAL), column_one (INT
On 8/17/05, Premsun Choltanwanich <[EMAIL PROTECTED]> wrote:
Dear All,
I need to distribute my application that use PostgreSQL as database to
my customer. But I still have some questions in my mind on database
security. I understand that everybody who get my application database will
Yeah, I guess so. I just didn't want the compiler to think I was
trying to assign the value. And I also figured out that instead of
the &&, I needed to just say AND Thanks.
Ferindo
John DeSoi wrote:
On Aug 6, 2005, at 10:52 PM, Ferindo Middleton Jr wrote:
ERR
I'm trying to write a function and trigger to validate that user data
entry for boolean values makes sense before being inserted or updated
into my database. I have the following trigger:
CREATE TRIGGER trigger_registration_and_attendance
BEFORE INSERT OR UPDATE
ON registration_and_attendance
F
ssary for backwards-compatibility
--
www.sleekcollar.com
Ferindo Middleton, Jr.
Chief Architect
Sleekcollar Internet Application & Artistic Visualizations
[EMAIL PROTECTED]
Is it possible for an UPDATE/INSERT query string to function in such a way
that it requires two like fields in different tables to be equal to/'in sync
with' one another:
Example: I have two tables: registration & schedules
they both record a class_id, start_date, end_date... I want to make su
I am trying to write a Perl Function for one of the databases I'm
building a web application for. This function is triggered to occur
BEFORE INSERT OR UPDATE. This function is complex in that it involves
fields in two different tables which need to be updated, where the
updates one receives depend
16 matches
Mail list logo