Re: [GENERAL] self referencing table.

2012-01-20 Thread Craig Ringer
On 19/01/2012 12:57 AM, David Salisbury wrote: Think I'll answer myself on this. I'll join in whatever rows I get from the self referential query above to the base table, and include the rank column, and then figure out some sort of post processing on the resultant view ( I hope ). Usually

Re: [GENERAL] self referencing table.

2012-01-18 Thread David Salisbury
On 1/17/12 6:00 PM, Chris Travers wrote: On Tue, Jan 17, 2012 at 4:31 PM, David Salisburysalisb...@globe.gov wrote: I've got a table: Taxa Column |Type +- id | integer |

Re: [GENERAL] self referencing table.

2012-01-18 Thread David Salisbury
On 1/18/12 9:46 AM, David Salisbury wrote: On 1/17/12 6:00 PM, Chris Travers wrote: On Tue, Jan 17, 2012 at 4:31 PM, David Salisburysalisb...@globe.gov wrote: I've got a table: Taxa Column | Type +- id | integer | parent_id | integer |

[GENERAL] self referencing table.

2012-01-17 Thread David Salisbury
I've got a table: Taxa Column |Type +- id | integer | parent_id | integer | taxonomic_rank | character varying(32) | latin_name | character

Re: [GENERAL] self referencing table.

2012-01-17 Thread David Johnston
On Jan 17, 2012, at 19:31, David Salisbury salisb...@globe.gov wrote: I've got a table: Taxa Column |Type +- id | integer | parent_id | integer |

Re: [GENERAL] self referencing table.

2012-01-17 Thread Ondrej Ivanič
Hi, On 18 January 2012 11:31, David Salisbury salisb...@globe.gov wrote: I've got a table: Taxa Column |Type +- id | integer | parent_id | integer |

[GENERAL] self referencing table structure and constraints

2004-09-23 Thread Matthew Hixson
I have a categories table that contains a FK to another category in the same table, creating a hierarchy. At the very top is this row: category_id | name | description | parent_id -+--+-+--- 1 | ROOT | The top level

Re: [GENERAL] self referencing table structure and constraints

2004-09-23 Thread Stephan Szabo
On Thu, 23 Sep 2004, Matthew Hixson wrote: I have a categories table that contains a FK to another category in the same table, creating a hierarchy. At the very top is this row: category_id | name | description | parent_id

Re: [GENERAL] self referencing table structure and constraints

2004-09-23 Thread Matthew Hixson
On Sep 23, 2004, at 6:36 PM, Stephan Szabo wrote: On Thu, 23 Sep 2004, Matthew Hixson wrote: I have a categories table that contains a FK to another category in the same table, creating a hierarchy. At the very top is this row: category_id | name | description | parent_id