I have a table with a uniqueness constraint on three columns:
# \d bobtest
Table "public.bobtest"
Column | Type | Modifiers
+-+--
id | integer | not null default nextval('bob
A. Kretschmer wrote:
In response to Robert Edwards :
Can anyone suggest a way that I can impose uniqueness on a and b when
c is NULL?
Sure, use a functional index:
test=# create table bobtest (a int, b int, c int);
CREATE TABLE
test=*# create unique index idx_bobtest on
bobtest(a,b,coalesce
Thanks for all these great ideas!
Craig Ringer wrote:
On Mon, 2009-06-29 at 15:42 +1000, Robert Edwards wrote:
Can anyone suggest a way that I can impose uniqueness on a and b when
c is NULL?
One way is to add an additional partial index on (a,b):
CREATE INDEX bobtest_ab_unique ON bobtest
On 14/06/12 18:39, Achilleas Mantzios wrote:
dynacom=# SELECT id from items_tmp WHERE id=1261319 AND
xid=currval('xadmin_xid_seq');
id
(0 rows)
dynacom=# -- THIS IS INSANE
Have you tried:
SELECT id from items_tmp WHERE id=1261319 AND
xid=currval('xadmin_xid_seq'::text)
or even:
SE
(this is my first post to this list...)
I am wondering if Postgres, and/or SQL in general, has a facility to
run a function at connection set-up time (after a successful connection
attempt) and/or at session completion (or disconnect)?
I want to pre-populate a table (actually an INSERT rule on a
rotocol is that this
is not allowed.
Anyway, I still need to know if running functions during connection
setup and tear-down, or change of user, is possible or not.
Cheers,
Bob Edwards.
Aaron Bono wrote:
On 9/10/06, *Robert Edwards* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> w
Markus Schaber wrote:
Hi, Robert,
Robert Edwards wrote:
(this is my first post to this list...)
Welcome here. :-)
I am wondering if Postgres, and/or SQL in general, has a facility to
run a function at connection set-up time (after a successful connection
attempt) and/or at session
Can you give us the actual delete command you are issuing?
You need to specify the types of the function arguments when deleting
functions, for example:
DELETE FUNCTION my_sum (int, int);
etc.
Cheers,
Bob Edwards.
Penchalaiah P. wrote:
Hi good morning to all….
I created some functions in
Hi Louis-David,
I also have written a forum application using PostgreSQL.
My schema has a "threadid" for each posting, which is actually also the
"messageid" of the first posting in the thread, but that is irrelevant.
I can then just select all messages belonging to that thread. The actual
hie
Medi Montaseri wrote:
Hi,
I am learning my way into Accounting and was wondering how Accounting
applications are designed. perhaps you could point the way
On one hand, accountants talk about a sacret equation A = L + OE (Asset
= Libility + Owner Equity) and then under each categories the
You could:
INSERT INTO REGION VALUES (33, 'New Dar');
UPDATE DISTRICT SET region_id = 33 WHERE region_id = 99;
DELETE FROM REGION WHERE region_id = 99;
UPDATE REGION SET region_name = 'Dar es Salaam' WHERE region_id = 33;
Of course, if there is no uniqueness constraint on region_name then
yo
Looks like you are missing the php_pgsql extension (I assume you
are running on a Windows server). On Debian GNU/Linux, it is called
php5-pgsql (or php4-pgsql, as appropriate). Not sure what it would
be called for Windows, but something similar.
Simply enabling it (by uncommenting the line in yo
12 matches
Mail list logo