Tom Lane wrote:
I would think UNIQUE => one row is pretty obvious - what am I
missing? (Unless it's that I'm still stuck in 7.4.)
That would be the problem :-( ... a look at the code suggests that the
ability to do anything intelligent with expression indexes was added
in 8.0.
Whaa. Okay,
I have a unique function index on one of my tables:
create table allWords (
wordIDserial PRIMARY KEY,
word textNOT NULL
);
create unique index ix_allWords_lower on allWords (lower(word));
To my surprise, the planner does not seem to realize that only one
row can resul
Gregory Stark wrote:
I guess a generalization of my question is whether the FK-
checking machinery
simply does a SELECT against the referencing column.
It does
Actually the query is (effectively, assuming your equality
operators are named
"=" and the columns match in type)
SELECT 1
F
Scott Marlowe wrote:
As a secondary question, is there any way I could have answered this
myself, using analyze, the system catalogs, etc? ANALYZE DELETE
doesn't seem to show the FK checking that must go on behind the
scenes.
You could have coded up an example to see if it worked I guess.
H
Hi -
I know that the foreign key machinery will use an index on the
referring column if one exists. My question is whether it will use a
composite index? For instance:
create table allLemmaSenseMap (
wordID integer references allLemmas,
senseIDinteger references allSenses,
p
I don't have personal experience with this, but I thought it was fairly
common to DEFER constraint checking until after a restore completed,
for exactly this reason.
- John Burger
MITRE
---(end of broadcast)---
TIP 9: the planner will i
ample, on the Mac I'm using now, long long ints max out at about
10^19, while long doubles can represent 10^308.
- John Burger
MITRE
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
lieve. You could get what you want by
using another NULL-like value, e.g., an empty string ''. You might be
able to use a trigger, too. - I have little experience with those.
- John Burger
MITRE
---(end of broadcast)---
TIP 3: if
Howdy Gents-
Howdy to everyone else.
I am multiplying two columns it doesn't matter what their data type is
not does it seem to matter if I explicitly cast these values to some
other data type every time they are multiplied I am getting an
incorrect result.
col1 = 213.1086
col2 = 0.833
If I per
Hi -
This has been covered elsewhere, but the typical answers seem to
involve using triggers, etc.
What's the best way to insert a row into a table providing it's not
already there? In my client (Python) program, I can do two separate
interactions with the server, the first a query:
select
If it were me, and someone proposed a model where two-way replication
was needed, I would tell them to rethink their model. It's broken.
I would respectfully disagree that the requirement for two-way
replication
indicates a broken design.
I agree with your disagreement. This design is present in
11 matches
Mail list logo