Re: AutoFields, legacy databases and non-standard sequence names.

2010-10-08 Thread akaariai
On 8 loka, 10:41, Hanne Moa wrote: > You can't necessarily do this with a legacy database, as other systems > also using that database expect the existing names. alter sequence owned by does not change the sequnce name, just what pg_get_serial_sequence will return for given table, column combi

Re: AutoFields, legacy databases and non-standard sequence names.

2010-10-08 Thread Hanne Moa
On 7 October 2010 19:14, akaariai wrote: > Django doesn't expect the sequence name to be tablename_columname_seq, > at least not in trunk. The last_insert_id method in backends/ > postgresql/operations.py uses select > currval(pg_get_serial_sequence(tablename, columname)). > pg_get_serial_sequence

Re: AutoFields, legacy databases and non-standard sequence names.

2010-10-07 Thread akaariai
> Sorry, I should have been more clear. > > What I'm trying to do is solicit suggestions from django developers as > to how I *can* move ticket #1946 forward. I can find a way to work > around it in my own project, but it would be ideal to solve it on the > Django side, for everybody. > > I mention

Re: AutoFields, legacy databases and non-standard sequence names.

2010-10-06 Thread Hanne Moa
On 6 October 2010 04:02, Tom Eastman wrote: > I'm using Django to create an interface for a legacy PostgresQL database. >  The primary keys for my tables use sequences that aren't named the way > django expects them to be (i.e. '__seq'), this means I can't > call them AutoFields. > >> http://code.

Re: AutoFields, legacy databases and non-standard sequence names.

2010-10-05 Thread Tom Eastman
On 06/10/10 16:02, Russell Keith-Magee wrote: Yes - questions of usage and requests for design guidance should be directed to Django-users. Unless you have a specific suggestion for how to move ticket #1946 forward, this isn't a topic for django-developers. Sorry, I should have been more clear

Re: AutoFields, legacy databases and non-standard sequence names.

2010-10-05 Thread Russell Keith-Magee
On Wednesday, October 6, 2010, Tom Eastman wrote: > Hey guys, > > I'm using Django to create an interface for a legacy PostgresQL database.   > The primary keys for my tables use sequences that aren't named the way django > expects them to be (i.e. '__seq'), this means I can't call > them AutoFi

AutoFields, legacy databases and non-standard sequence names.

2010-10-05 Thread Tom Eastman
Hey guys, I'm using Django to create an interface for a legacy PostgresQL database. The primary keys for my tables use sequences that aren't named the way django expects them to be (i.e. '__seq'), this means I can't call them AutoFields. Essentially, my problem is identical to that describe