On 23/06/11 23:28, Tarlika Elisabeth Schmitz wrote:
Hello Gavin,
On Wed, 22 Jun 2011 20:53:19 +1200
Gavin Flower wrote:
[...]
This design ensures that: names of towns are unique within a given
country and>region.
Note you will still need business logic, in a trigger or some such, to
ensure
On 23/06/11 22.39, Tomas Vondra wrote:
Dne 23.6.2011 20:39, Edoardo Panfili napsal(a):
I Have the same problem: one ID must be unique.
Three tables inherits from the same parent table the id column, the ID
is is defined as:
id bigint DEFAULT nextval('sequence_name')
in the parent table.
Can I a
> On 22/06/11 18.30, David Johnston wrote:
> > The only (obvious to me) way to really solve the problem - invisibly -
> > is to allow for table-less unique indexes that multiple tables can
> > share and that have a pointer to the "source" table for any particular
entry
> in the index.
> > The other
Dne 23.6.2011 20:39, Edoardo Panfili napsal(a):
> I Have the same problem: one ID must be unique.
> Three tables inherits from the same parent table the id column, the ID
> is is defined as:
> id bigint DEFAULT nextval('sequence_name')
> in the parent table.
>
> Can I assume that a sequence ensure
On 22/06/11 18.30, David Johnston wrote:
The only (obvious to me) way to really solve the problem - invisibly - is to
allow for table-less unique indexes that multiple tables can share and that
have a pointer to the "source" table for any particular entry in the index.
The other method being disc
Hello Gavin,
On Wed, 22 Jun 2011 20:53:19 +1200
Gavin Flower wrote:
> [...]
>This design ensures that: names of towns are unique within a given
>country and >region.
>Note you will still need business logic, in a trigger or some such, to
>ensure that only one town within a given country and
On Wed, Jun 22, 2011 at 11:30 AM, David Johnston wrote:
>> yeah -- postgresql table inheritance [...] underpins the table inheritance
> feature [...]
>
> Thank you Master of the Obvious ;)
>
> I do think you meant to say it underpins the "Table Partitioning Feature"
> which, through the use of IN
> yeah -- postgresql table inheritance [...] underpins the table inheritance
feature [...]
Thank you Master of the Obvious ;)
I do think you meant to say it underpins the "Table Partitioning Feature"
which, through the use of INSERT triggers to at least propagate the inserts
to the proper tables
On Wed, Jun 22, 2011 at 8:34 AM, David Johnston wrote:
> Your statement is utterly false simply by virtue of the documentation.
>
>
>
> Inserts never propagate to other tables in a hierarchy
>
> Indexes/Constraints only apply to individual tables
>
>
>
> Since inserts do not propagate the base tab
general-ow...@postgresql.org [mailto:
> pgsql-general-ow...@postgresql.org] *On Behalf Of *Misa Simic
> *Sent:* Wednesday, June 22, 2011 8:49 AM
> *To:* Tarlika Elisabeth Schmitz
> *Cc:* pgsql-general@postgresql.org
> *Subject:* Re: [GENERAL] unique across two tables
>
> ** **
&g
-ow...@postgresql.org] On Behalf Of Misa Simic
Sent: Wednesday, June 22, 2011 8:49 AM
To: Tarlika Elisabeth Schmitz
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] unique across two tables
Hi Tarlika,
I think easy solution could be:
create baseTable with just one column as PK
Hi Tarlika,
I think easy solution could be:
create baseTable with just one column as PK
TableA inhertis baseTable, it will have inherited Column + additianl tables
for TableA
TableB inherits baseTable, it will aslo have inherited Column + additianl
tables for TableB
Insert in any table TableA o
Hi Tarlika,
I hope this approach is of interest.
This is how I would design a database to solve the problem -
unfortunately, this
may not be appropriate for your particular situation.
This design ensures that: names of towns are unique within a given
country and
region. plus it can support
On Mon, 20 Jun 2011 19:42:20 +0200
Alban Hertroys wrote:
>On 20 Jun 2011, at 17:03, Tarlika Elisabeth Schmitz wrote:
>
>> I have two tables, town and townalias, the latter containing
>> alternative town names.
>> I would like to ensure that a town name is unique per
>> country-region across the t
On 20 Jun 2011, at 17:03, Tarlika Elisabeth Schmitz wrote:
> I have two tables, town and townalias, the latter containing alternative
> town names.
> I would like to ensure that a town name is unique per
> country-region across the two tables.
>
> Can I do this with a constraint ot do I need to i
> I have two tables, town and townalias, the latter containing alternative
> town names.
> I would like to ensure that a town name is unique per
> country-region across the two tables.
>
> Can I do this with a constraint ot do I need to implement the logic via
> trigger?
You can't have a constrain
I have two tables, town and townalias, the latter containing alternative
town names.
I would like to ensure that a town name is unique per
country-region across the two tables.
Can I do this with a constraint ot do I need to implement the logic via
trigger?
=
PostgreSQl 8.4
CREATE TABL
17 matches
Mail list logo