Re: [Django] #30369: Creating database tables from queries based on ORM API

2019-04-24 Thread Django
#30369: Creating database tables from queries based on ORM API
-+-
 Reporter:  Markus Elfring   |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  database tables, | Triage Stage:
  queries, ORM, API, SQL, storage|  Unreviewed
  management, object-relational  |
  mapping, computation results,  |
  CTAS   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 Please start a new thread on
 [https://groups.google.com/forum/?utm_source=digest_medium=email#!forum
 /django-developers `django-developers`] if you really think that support
 for `CREATE TABLE AS SELECT` should be added to the Django ORM. IMO use
 case is really narrow because even if you will create such table in ORM it
 will be tricky to make it accessible via ORM.

 We can reopen this ticket if we reach consensus on `django-developers`.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.671a8fc7c115863e4c1102cd8a6062fd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30369: Creating database tables from queries based on ORM API

2019-04-24 Thread Django
#30369: Creating database tables from queries based on ORM API
-+-
 Reporter:  Markus Elfring   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  database tables, | Triage Stage:
  queries, ORM, API, SQL, storage|  Unreviewed
  management, object-relational  |
  mapping, computation results,  |
  CTAS   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Markus Elfring):

 * status:  closed => new
 * resolution:  wontfix =>


Comment:

 Replying to [comment:3 felixxm]:
 > I'm not sure, but I don't think so.

 I would find the support for the SQL standard statement “CREATE TABLE AS
 SELECT” (CTAS) nicer (while working with materialized views can be
 similarly useful).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.b917b14be48e7882abaf4d22a6e3194b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30369: Creating database tables from queries based on ORM API

2019-04-23 Thread Django
#30369: Creating database tables from queries based on ORM API
-+-
 Reporter:  Markus Elfring   |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  database tables, | Triage Stage:
  queries, ORM, API, SQL, storage|  Unreviewed
  management, object-relational  |
  mapping, computation results,  |
  CTAS   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 > * Does the functionality “materialized view” provide run time
 characteristics which are similar to the CTAS command?

 Yes it is quite similar, db will recognize column types.

 > * Does it belong to the SQL standard?

 I'm not sure, but I don't think so.

 > * The support for it varied between databases over time.

 Materialized views are supported on PostgreSQL and Oracle.

 > * How will the software evolve further in this area?

 Do you mean by databases? I don't know answer for such existential
 question :)

 Please use one of
 [https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels
 support channels] if you have other support questions related with Django.
 If you have questions about databases you should probably ask somewhere
 else e.g. on StackOverflow.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.5ad98f43424e684082abcc87b772091c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30369: Creating database tables from queries based on ORM API

2019-04-23 Thread Django
#30369: Creating database tables from queries based on ORM API
-+-
 Reporter:  Markus Elfring   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  database tables, | Triage Stage:
  queries, ORM, API, SQL, storage|  Unreviewed
  management, object-relational  |
  mapping, computation results,  |
  CTAS   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Markus Elfring):

 Replying to [comment:1 felixxm]:
 * Does the functionality “materialized view” provide run time
 characteristics which are similar to the CTAS command?
 * Does it belong to the SQL standard?
 * The support for it varied between databases over time. How will the
 software evolve further in this area?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.4061bf00a24196208769c32948c78bf8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30369: Creating database tables from queries based on ORM API

2019-04-23 Thread Django
#30369: Creating database tables from queries based on ORM API
-+-
 Reporter:  Markus Elfring   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  database tables, | Triage Stage:
  queries, ORM, API, SQL, storage|  Unreviewed
  management, object-relational  |
  mapping, computation results,  |
  CTAS   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * version:  2.2 => master


Comment:

 I don't think that we will support `CREATE TABLE AS SELECT`. In your use
 case I would create `MATERIALIZED VIEW` (or `VIEW`) in a migrations with
 raw SQL. Such views can be introspected automatically (see
 [https://docs.djangoproject.com/en/2.2/ref/django-admin/#database-
 specific-notes inspectdb]) and  used via Django ORM (see
 
[https://docs.djangoproject.com/en/2.2/ref/models/options/#django.db.models.Options.managed
 managed option]).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.a902270d0852b28ce97a150018b03718%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #30369: Creating database tables from queries based on ORM API

2019-04-15 Thread Django
#30369: Creating database tables from queries based on ORM API
-+-
   Reporter:  elfring|  Owner:  nobody
   Type:  New| Status:  new
  feature|
  Component:  Database   |Version:  2.2
  layer (models, ORM)|   Keywords:  database tables,
   Severity:  Normal |  queries, ORM, API, SQL, storage
 |  management, object-relational
   Triage Stage: |  mapping, computation results, CTAS
  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Value combinations can be counted in records also together with the
 software “Django 2.2” by
 [https://docs.djangoproject.com/en/2.2/ref/databases/ database services].
 I am looking for ways to store a computation result into a dynamically
 generated table.
 * How should such table creation be achieved by the programming interface
 “object-relational mapping”?
 * Would you like to support
 [https://en.wikipedia.org/wiki/Data_definition_language#CREATE_TABLE_statement
 the SQL command “CREATE TABLE AS SELECT” (CTAS)]?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.06f4efef5c65d79ac6326592321311e0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.