PostgreSQL: populate(reserve_jobs=True) fails below a native time key
I maintainer di solito rispondono entro 5 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 86/100
Direzione di ricerca
Start with the reproduction in jobs.py, where primary-key attributes are copied into the jobs table definition, then inspect PostgreSQL type reporting in declare.py around match_type. Run the reproduction to confirm that Done.populate(reserve_jobs=True) fails while plain populate() succeeds. Done means PostgreSQL time and affected timestamp type names can be declared again and reservation succeeds without regressing MySQL.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug
On PostgreSQL, populate(reserve_jobs=True) fails for a table whose primary key includes a native time attribute inherited from a parent:
DataJointError: Unsupported attribute type time without time zone
Reproduction
@schema
class Shift(dj.Manual):
definition = """
start_time : time
"""
@schema
class Done(dj.Computed):
definition = """
-> Shift
"""
def make(self, key):
self.insert1(key)
Shift.insert1({"start_time": "01:02:03"})
Done.populate(reserve_jobs=True) # raises on PostgreSQL; works on MySQL
Plain populate() works on both backends.
Cause
The jobs table copies each primary-key attribute's type into its definition (jobs.py, attr.original_type or attr.type). For a native attribute, that type comes from the server: PostgreSQL reports time without time zone, which the declaration parser does not accept (declare.py, match_type).
Fix
Normalize these names when PostgreSQL column information is read (time, time(p), timestamp, timestamp(p), using datetime_precision), so the heading's type can be declared again. timestamp attributes are likely affected the same way (timestamp without time zone); this was not checked.
- Lingua principale
- Python
- Stelle
- 198
- Fork
- 107
- Merge medio
- 4g 7h
- PR unite (30g)
- 12
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di datajoint/datajoint-python
-
bug triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
datajoint/datajoint-python#1775 ·
I maintainer di solito rispondono entro 5 giorni
-
MySQL: with use_tls=False, 2.3.6 needs the cryptography package to log in to MySQL 8Forse già presa @dimitri-yatsenko l’ha presa 5 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
datajoint/datajoint-python#1750 ·
I maintainer di solito rispondono entro 5 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
datajoint/datajoint-python#1747 ·
I maintainer di solito rispondono entro 5 giorni
-
Reject constant defaults on primary-key attributesForse già presa @godara-alt l’ha presa 4 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
datajoint/datajoint-python#1712 ·
I maintainer di solito rispondono entro 5 giorni
-
Decoding a <blob> value in an unknown format returns None instead of raising an errorForse già presa @godara-alt l’ha presa 9 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
datajoint/datajoint-python#1703 ·
I maintainer di solito rispondono entro 5 giorni
Tutte le issue di datajoint/datajoint-python
Issue simili
-
[Bug]: test_remote_realpath_uses_argument_vector fails on Windows with Python 3.13+ (ntpath.isabs)Forse già presa @gouyu-hou l’ha presa oggi. Apertatriage/confirmed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
agentscope-ai/agentscope#4397 ·
I maintainer di solito rispondono entro 2 giorni
-
area/profiles area/sessions comp/desktop desktop/chat desktop/sessions P2 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
NousResearch/hermes-agent#161712 ·
I maintainer di solito rispondono entro 1 giorno
-
[New Check]: postgresql_flexible_server_public_network_access_disabledForse già presa @pouria-l l’ha presa oggi. Apertafeature-request status/needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
prowler-cloud/prowler#13615 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
SACGF/variantgrid#2941 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
linkedin/Liger-Kernel#1730 ·
I maintainer di solito rispondono entro 3 giorni