Re: [GENERAL] Unique key with nulls and copying databases across computers - Mailing list pgsql-general

From Vadim Mikheev
Subject Re: [GENERAL] Unique key with nulls and copying databases across computers
Date
Msg-id 35D39BDD.319F2518@krs.ru
Whole thread Raw
In response to Unique key with nulls and copying databases across computers  ("Wim Ceulemans" <wim.ceulemans@pophost.eunet.be>)
List pgsql-general
Wim Ceulemans wrote:
>
> Hi
>
> I have a few questions:
>
> 1. Is there a simple way in postgresql 6.3.2 to implement a unique index on
> one
> field with null's allowed. So if the field is null it's ok else the value
> must be unique?

This is exactly what postgresql does!
Did you see any problems?

>
> 2. I have copied the contents of a database ( ../data/base/name/* ) from one
> computer to another computer. Is this in fact the way to copy databases?
> After copying everything works except for example \dt , \di which gives the
> following
> error:
>
> ERROR: cache lookup for userid 1003 failed
>
> What does this mean?

Create user (createuser) with id 1003 in new database.

Vadim

pgsql-general by date:

Previous
From: Dimitri
Date:
Subject: Re: [GENERAL] More details on Database corruption
Next
From:
Date:
Subject: ...