Re: Renaming sequences

Justin <[email protected]> Wed, 18 Dec 2019 19:01:39 -0500
Newsgroups gmane.comp.db.postgresql.novice
Message-ID <CALL-XeMhtNXRH-eLC1NEHKKYHOPmjv5_s87YzW+y8OAwWH-6wg@mail.gmail.com>
--00000000000097a7d2059a0344e9
Content-Type: text/plain; charset="UTF-8"

as the saying goes "can not see it from house", or "when it breaks you keep
both pieces".    (hope my humor comes across)

ORM  has to know the name of the sequence or it can not pre-fetch the
sequence, or modify its values

i went and looked  to double check  ORM does control the naming  see
https://github.com/django/django/blob/master/django/db/backends/postgresql/schema.py

lines 10 -13 and line 96,

Postgresql auto naming  for indexes and sequences is
tabel_column_type(idx,seq..) the ORM follows a similar logic

changing names outside of the ORM will bugger the app

--00000000000097a7d2059a0344e9
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><br></div><div>as the saying goes &quot;can not see i=
t from house&quot;, or &quot;when it breaks you keep both pieces&quot;.=C2=
=A0=C2=A0=C2=A0 (hope my humor comes across)<br></div><div><br></div><div>O=
RM=C2=A0 has to know the name of the sequence or it can not pre-fetch the s=
equence, or modify its values<br></div><div><br></div><div>i went and looke=
d=C2=A0 to double check=C2=A0 ORM does control the naming=C2=A0 see</div><d=
iv><a href=3D"https://github.com/django/django/blob/master/django/db/backen=
ds/postgresql/schema.py">https://github.com/django/django/blob/master/djang=
o/db/backends/postgresql/schema.py</a></div><div><br></div><div>lines 10 -1=
3 and line 96, <br></div><div><br></div><div> Postgresql auto naming=C2=A0 =
for indexes and sequences is tabel_column_type(idx,seq..) the ORM follows a=
 similar logic <br></div><div><br></div><div>changing names outside of the =
ORM will bugger the app<br></div></div>

--00000000000097a7d2059a0344e9--