You probably didn't quite understand the suggestion. You should create a
unique index like:
create unique index your_index_name on your_table (companyID,
associationID) where ysnDefault;
This will restrict the uniqueness checks to the records where ysnDefault
is true (and not null, of course).
H
One solution is to create partial index:
create unique index indice on emails(direccion) where estado = 'A'
_
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
-
Hi,
is there a document available describing the changes / additions in 7.4 ?
Thanks
Alex
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
On Wed, 5 Nov 2003 02:58:28 +0900, Michael Glaesemann
<[EMAIL PROTECTED]> wrote:
>> UPDATE ordercharges
>>SET orderchargeasbilled = 0.065 * sale.orderchargeasbilled
>> FROM orders AS o, ordercharges AS sale
>> WHERE ordercharges.orderchargecode = 'S&H'
>>AND ordercharges.orderid = o.orde
Bjørn T Johansen wrote:
I need to maintain a manually counter for an id-field, but I can do this
two ways. Either make a counter table (which means one select and one
update) or just selecting the largest id from existing table and
increment by one (just one select + one table lock). Which one is
f
On Wednesday 05 November 2003 09:49, Bjørn T Johansen wrote:
> Yes, but the table in question have 3 PK and only one that needs this
> "sequence" so I just thought instead of getting holes in the IDs I just
> manually handle this counter somehow.. Not a big deal but... :)
Do you mean a 3-column pr
On Tuesday 04 November 2003 16:50, Alexandr S wrote:
> Hi
> There is question. I have column name_my varchar (not array) in table1,
> and column name_my_ref varchar[] (array) in other table2. I want set
> Foreign Key on name_my_ref and every element in the same row of array
> must match any
Bjørn T Johansen wrote:
Yes, but the table in question have 3 PK and only one that needs this
"sequence" so I just thought instead of getting holes in the IDs I just
manually handle this counter somehow.. Not a big deal but... :)
You'd only get holes if you keep making nextval requests without usin
Ok you all, I cave... I will use sequences :)
BTJ
On Wed, 2003-11-05 at 11:46, Rob Fielding wrote:
> Bjørn T Johansen wrote:
> > Yes, but the table in question have 3 PK and only one that needs this
> > "sequence" so I just thought instead of getting holes in the IDs I just
> > manually handl
Hi,
I have got an error with PostgreSQL-7.4Beta4 :
ERROR SET AUTOCOMMIT TO OFF is no longer supported
I used these option to load huge Database as i can save time with it. Is
there an other option in PG 7.4 to do the same ?
Regards
Thierry Missimilly
begin:vcard
n:Missimilly;Thierry
tel;fax:+33
On Wed, Nov 05, 2003 at 13:27:15 +0900,
Alex <[EMAIL PROTECTED]> wrote:
> Hi,
> is there a document available describing the changes / additions in 7.4 ?
>
> Thanks
> Alex
The release notes in the 7.4 documentation cover what has changed.
---(end of broadcast)--
I need to maintain a manually counter for an id-field, but I can do this
two ways. Either make a counter table (which means one select and one
update) or just selecting the largest id from existing table and
increment by one (just one select + one table lock). Which one is
fastest?
Regards,
BTJ
Yes, but the table in question have 3 PK and only one that needs this
"sequence" so I just thought instead of getting holes in the IDs I just
manually handle this counter somehow.. Not a big deal but... :)
BTJ
On Wed, 2003-11-05 at 10:42, Rob Fielding wrote:
> Bjørn T Johansen wrote:
> > I need
You are buying yourself trouble. The holes in the IDs are the least
problem, and a generated sequence should not have any business meaning
anyway. BTW, what happens when you delete a record ? That would surely
leave you a hole in the IDs...
Just a quick thought: if you are going to handle manually
ljb <[EMAIL PROTECTED]> writes:
> I sent in a revised patch which removes the loss of Tcl8.0.x compatibility.
When? I don't recall having seen any such patch.
regards, tom lane
---(end of broadcast)---
TIP 3: if posting/rea
After a abnormal system shutdown I am trying to run a
vacuum full verbose ANALYZE and getting the following error.
NOTICE: Analyzing classification
NOTICE: RelationBuildDesc: can't open pg_temp_5821_0: No such file or
directory
NOTICE: --Relation pg_temp_5821_0--
ERROR: _mdfd_getrelnfd: canno
Manfred,
Thanks for taking the time to walk me through this. You've pointed out
things I've noticed when writing queries and wondered about. (More
specific comments—and commentary—below.
What I came up with was deleting and reinserting the relevant
ordercharges rows
This might have unwanted sid
Yup that's what happened. Dropped them and all is good. I really should
get a list of all of the underling files for each index and table and
see if any others are missing.
On Wed, 2003-11-05 at 11:30, Tom Lane wrote:
> Dave Smith <[EMAIL PROTECTED]> writes:
> > After a abnormal system shutdown I
On Wednesday, November 5, 2003, at 06:26 AM, Tom Lane wrote:
If you are satisfied with only a one-directional constraint (apply the
check just when the constrained table is modified), you can have it
today.
Just put the SELECT into a function that's called by the CHECK
expression.
Tom, you've just
Michael Glaesemann <[EMAIL PROTECTED]> writes:
> On Wednesday, November 5, 2003, at 06:26 AM, Tom Lane wrote:
>> Just put the SELECT into a function that's called by the CHECK
>> expression.
> Tom, you've just provided the solution to something I've been thinking
> about a lot. I really have to s
Hallo,
we runs PostgreSQL 7.3.4 on RedHat 9. I initialized dbcluster with
--locale=cs_CZ.UTF-8 and created database with --encoding=unicode. But
following script generates error:
-- -*- coding: iso-8859-2 -*-
set client_encoding to LATIN2;
create table t (txt text);
begin;
--inserted character is
On Thursday, November 6, 2003, at 02:38 AM, Tom Lane wrote:
Michael Glaesemann <[EMAIL PROTECTED]> writes:
On Wednesday, November 5, 2003, at 06:26 AM, Tom Lane wrote:
Just put the SELECT into a function that's called by the CHECK
expression.
Tom, you've just provided the solution to something I'
On Thursday, November 6, 2003, at 03:12 AM, Tom Lane wrote:
Michael Glaesemann <[EMAIL PROTECTED]> writes:
On Thursday, November 6, 2003, at 02:38 AM, Tom Lane wrote:
IIRC we check that it is labeled IMMUTABLE.
Thanks for the clarification. Is this in the documentation somewhere?
[digs...] No, be
Michael Glaesemann <[EMAIL PROTECTED]> writes:
> On Thursday, November 6, 2003, at 02:38 AM, Tom Lane wrote:
>> IIRC we check that it is labeled IMMUTABLE.
> Thanks for the clarification. Is this in the documentation somewhere?
[digs...] No, because my recollection is wrong: there's no such chec
Dave Smith <[EMAIL PROTECTED]> writes:
> After a abnormal system shutdown I am trying to run a
> vacuum full verbose ANALYZE and getting the following error.
> NOTICE: Analyzing classification
> NOTICE: RelationBuildDesc: can't open pg_temp_5821_0: No such file or
> directory
> NOTICE: --Relat
Tom Lane <[EMAIL PROTECTED]> writes:
> You should be able to DROP that table even though it doesn't have an
> underlying file. My guess is that you are running atop a non-crash-safe
> filesystem and it lost the directory entry for the just-created file.
> You might want to think about switching
Thierry Missimilly <[EMAIL PROTECTED]> writes:
> I have got an error with PostgreSQL-7.4Beta4 :
> ERROR SET AUTOCOMMIT TO OFF is no longer supported
> I used these option to load huge Database as i can save time with it. Is
> there an other option in PG 7.4 to do the same ?
psql has a \set command
Dave Smith <[EMAIL PROTECTED]> writes:
> Yup that's what happened. Dropped them and all is good. I really should
> get a list of all of the underling files for each index and table and
> see if any others are missing.
If VACUUM ran to completion without complaints then there aren't any
other miss
All,
New to the list and a relative newbie to PostgreSQL. Please forgive stupid
questions.
Designing an application server for a work order processing (et al)
database. I have a good handle on sequences, referencial integrity, views,
& the basics. What books/documentation would you recommend t
On Wed, 5 Nov 2003, Chris M. Gamble wrote:
> My company has just finished a simple replication system in java. We are
> now interested in sharing our work under the GPL license so that we can
> hopefully work with others in improving this product.
>
> Would such a thing be useful, or simply over
Do you mean that, this doesn't work any more ??
from jdbc
connextion.setAutoCommit(false)
Tom Lane wrote:
> Thierry Missimilly <[EMAIL PROTECTED]> writes:
> > I have got an error with PostgreSQL-7.4Beta4 :
> > ERROR SET AUTOCOMMIT TO OFF is no longer supported
> > I used these option to load hu
31 matches
Mail list logo