yugabyte-db icon indicating copy to clipboard operation
yugabyte-db copied to clipboard

[YSQL] Feature Support - CREATE TABLE

Open nocaway opened this issue 5 years ago • 12 comments

Jira Link: DB-1307 The following features and options are not yet supported in CREATE TABLE command.

  • TABLESPACE (#1153)
  • UNLOGGED
  • INHERITS
  • LIKE
  • PARTITION BY (#1126)
  • Constraints: UNIQUE (#1022), GENERATED (#1267), REFERENCES, EXCLUDE(#997), FOREIGN KEY(#997)
  • WITH clause (#870)
  • CHECK NO INHERIT

nocaway avatar Apr 04 '19 19:04 nocaway

Encounter WITH clause not supported error when running pg_bench. [root@yb-tserver-0 yugabyte]# pgbench -i -c 10 -p 5433 -d postgres -h yb-tserver-0.yb-tservers.yb-9115-ysql.svc.sv-gcdb.edge.equinix.com -U postgres NOTICE: table "pgbench_branches" does not exist, skipping ERROR: WITH clause not supported yet LINE 1: ...es(bid int not null,bbalance int,filler char(88)) with (fill... ^ HINT: See https://github.com/YugaByte/yugabyte-db/issues/1129. Click '+' on the description to raise its priority

louissheng avatar Jun 24 '19 19:06 louissheng

@louissheng: thank you for reporting this. The WITH support got committed recently ( https://github.com/YugaByte/yugabyte-db/issues/870 , https://github.com/YugaByte/yugabyte-db/commit/de50449611d1f16189e9578d346a9a641460e118 ) -- we should be able to publish a new build including that commit in the next couple of days.

mbautin avatar Jun 24 '19 19:06 mbautin

django.db.utils.NotSupportedError: DEFERRABLE constraint not supported yet
LINE 1: ...type_id") REFERENCES "django_content_type" ("id") DEFERRABLE...
                                                             ^
HINT:  See https://github.com/YugaByte/yugabyte-db/issues/1129. Click '+' on the description to raise its priority

obeleh avatar Jan 05 '20 23:01 obeleh

django.db.utils.NotSupportedError: DEFERRABLE constraint not supported yet
LINE 1: ...type_id") REFERENCES "django_content_type" ("id") DEFERRABLE...
                                                             ^
HINT:  See https://github.com/YugaByte/yugabyte-db/issues/1129. Click '+' on the description to raise its priority

Hi @obeleh,

Could you also add which version you tried?

cc @m-iancu @ndeodhar

rkarthik007 avatar Jan 06 '20 05:01 rkarthik007

I've used the helm chart. But running this command gives me:

[root@yb-master-0 yugabyte]# /home/yugabyte/bin/yb-master --version
version 2.0.5.2 build 3 revision 67110c85a716c6c642aaf4adea1797544c69544f build_type RELEASE built at 16 Nov 2019 18:41:52 UTC

Is there a newer helm chart I can try? Perhaps in the incubator repo?

obeleh avatar Jan 06 '20 07:01 obeleh

Hi @obeleh , we don't support DEFERRABLE constraints yet and plan to add support for it in Feb/March timeframe. Is there a way for you to work around without using the DEFERRABLE constraint?

ndeodhar avatar Jan 06 '20 17:01 ndeodhar

I was trying to see if Django would work with Yugagbyte. The command that failed was when I was trying to initialize the migrations. So at the moment I think it's best I use Postgres.

obeleh avatar Jan 07 '20 06:01 obeleh

Same issue with DEFERRABLE here, breaks Django support, attempting to use as the postgres db with https://github.com/getsentry/sentry FYI

keeganmccallum avatar Jan 22 '20 22:01 keeganmccallum

@ndeodhar ?

I have the same problem: "Hi @obeleh , we don't support DEFERRABLE constraints yet and plan to add support for it in Feb/March timeframe. Is there a way for you to work around without using the DEFERRABLE constraint?"

Now March and I want to start a new project on Django. Tell me, when will the correction be?

wolrd avatar Mar 17 '20 10:03 wolrd

Hi, thanks for opening up this issue and working on these features. I was wondering if there is a separate issue for tracking INHERITS and a potential timeline for this feature? Thank you.

p-null avatar Aug 11 '20 19:08 p-null

Trying with odoo to create an empty database : got error from psycopg2 : NotSupportedError: INHERITS not supported yet

ERROR: INHERITS not supported yet
app_1         | LINE 9: CREATE TABLE ir_act_window (primary key(id)) INHERITS (ir_actions);

could be nice to add support of INHERITS for CREATE/ALTER TABLE

agaldemas avatar Sep 22 '20 07:09 agaldemas

I'm on Django 3.1.7 and I get: Applying auth.0008_alter_user_username_max_length...Traceback (most recent call last): File "/Users/save/.virtualenvs/esadash/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) psycopg2.errors.FeatureNotSupported: TABLESPACE not supported yet HINT: See https://github.com/YugaByte/yugabyte-db/issues/1129. Click '+' on the description to raise its priority

I'm thinking to move from Postgresql to YugabyteDB, but right now seems to be very difficult. Thank you for your work, guys.

savex83 avatar May 01 '21 09:05 savex83