Hi, all the below are for PostgreSQL 7.4.2.
I noticed that during
ALTER TABLE kid ADD CONSTRAINT "parcon" FOREIGN KEY (parid) on parent(id)
pgsql tries to acquire an AccessExclusiveLock on *both* kid
(which is pretty natural since it adheres with the docs, and it is an
alter command) *and* pare
I have a bunch of queries in a system I'm finishing, and I bumped with a
question on performace.
Which is the best way to solve this:
I need to know if there is at least one row in the relation that comes from a
determinated query. Which is the best way to do this:
(a) Build the query with "SEL
O Martin Marques έγραψε στις Sep 28, 2004 :
> I have a bunch of queries in a system I'm finishing, and I bumped with a
> question on performace.
> Which is the best way to solve this:
>
> I need to know if there is at least one row in the relation that comes from a
> determinated query. Which i
Hello,
Is it possible to set up a table CHECK, which ensures that column A is
NOT NULL if column B = 'x' ?
--
Regards/Gruß,
Tarlika Elisabeth Schmitz
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(s
Achilleus Mantzios <[EMAIL PROTECTED]> writes:
> Whats the purpose of the AccessExclusiveLock on parent table?
We're adding a trigger to it.
regards, tom lane
---(end of broadcast)---
TIP 8: explain analyze is your friend
El Mar 28 Sep 2004 11:02, T E Schmitz escribió:
> Hello,
>
> Is it possible to set up a table CHECK, which ensures that column A is
> NOT NULL if column B = 'x' ?
CONSTRAINT constraint_name ]
CHECK (expression)
CHECK (expression)
The CHECK clause specifies an expression producing a Boolean r
On Tue, Sep 28, 2004 at 03:02:02PM +0100, T E Schmitz wrote:
> Hello,
>
> Is it possible to set up a table CHECK, which ensures that column A is
> NOT NULL if column B = 'x' ?
Sure.
[EMAIL PROTECTED] CREATE TABLE test (
[EMAIL PROTECTED](# a integer check (case when b = 'x' then a is not null e
O Tom Lane έγραψε στις Sep 28, 2004 :
> Achilleus Mantzios <[EMAIL PROTECTED]> writes:
> > Whats the purpose of the AccessExclusiveLock on parent table?
>
> We're adding a trigger to it.
>From the docs:
Acquired by the ALTER TABLE, DROP TABLE, REINDEX, CLUSTER, and VACUUM FULL
commands. This i
Martin Marques <[EMAIL PROTECTED]> writes:
> I need to know if there is at least one row in the relation that comes from a
> determinated query. Which is the best way to do this:
> (a) Build the query with "SELECT * ..." and after executing the query see if
> numRows()>0
> (b) Build the query wi
Hola Martin!
Martin Marques wrote:
El Mar 28 Sep 2004 11:02, T E Schmitz escribió:
Is it possible to set up a table CHECK, which ensures that column A is
NOT NULL if column B = 'x' ?
CONSTRAINT somename CHECK (B <> 'x' OR A IS NOT NULL)
This is brilliant. Only detected this today. Don't know how I
Hello again,
Martin Marques wrote:
El Mar 28 Sep 2004 11:02, T E Schmitz escribió:
Is it possible to set up a table CHECK, which ensures that column A is
NOT NULL if column B = 'x' ?
CONSTRAINT somename CHECK (B <> 'x' OR A IS NOT NULL)
I noticed a table constraint can be added via ALTER TABLE. Is
On 22/09/2004 12:11 S.Sreejith wrote:
Sir,
I am new to PostgreSQL. I have a doubt. Now i am doing one project
in .NET technology with postgres(linux) as database. I am using pgADMIN
and pgManager as tools for database releted activities. Now i am able to
create functions with 'sql' language.
T E Schmitz <[EMAIL PROTECTED]> writes:
> I noticed a table constraint can be added via ALTER TABLE. Is it correct
> that a column constraint cannot be added via the ALTER TABLE other than
> by dropping and adding the column? (I am using psql 7.4.2.)
There is no difference between table and colu
O Tom Lane έγραψε στις Sep 28, 2004 :
> Achilleus Mantzios <[EMAIL PROTECTED]> writes:
> > Whats the purpose of the AccessExclusiveLock on parent table?
>
> We're adding a trigger to it.
>From the docs:
Acquired by the ALTER TABLE, DROP TABLE, REINDEX, CLUSTER, and VACUUM FULL
commands. This is
14 matches
Mail list logo