Closed kimmoda closed 7 years ago
Can you provide the full error, and on which .sql file you get it on?
Also, which version of PGSQL are you using?
SQL hatası:
ERROR: syntax error at or near "CREATE" LINE 5: CREATE TABLE subscribers ^ Üstteki hata, aşağıdaki ifade içinde oluştu:
SELECT COUNT(*) AS total FROM (-- Table: subscribers
-- DROP TABLE subscribers;
CREATE TABLE subscribers ( host_account text NOT NULL, subscriber text NOT NULL, CONSTRAINT subscribers_pk PRIMARY KEY (host_account, subscriber), CONSTRAINT host_account_fk FOREIGN KEY (host_account) REFERENCES users (email) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE ) WITH ( OIDS=FALSE ); ALTER TABLE subscribers OWNER TO pg_sql_account_here; COMMENT ON TABLE subscribers IS 'Table for managing subscribers for channels') AS sub
PostgreSQL 8.4.20
You need to change pg_sql_account_here to your local PostgreSQL account.
editing , but still this error
CREATE TABLE subscribers ( host_account text NOT NULL, subscriber text NOT NULL, CONSTRAINT subscribers_pk PRIMARY KEY (host_account, subscriber), CONSTRAINT host_account_fk FOREIGN KEY (host_account) REFERENCES users (email) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE ) WITH ( OIDS=FALSE )
MySQL çıktısı: Belgeler
OIDS=FALSE )' at line 10
my sql
-- Table: subscribers
-- DROP TABLE subscribers;
CREATE TABLE subscribers ( host_account text NOT NULL, subscriber text NOT NULL, CONSTRAINT subscribers_pk PRIMARY KEY (host_account, subscriber), CONSTRAINT host_account_fk FOREIGN KEY (host_account) REFERENCES users (email) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE ) WITH ( OIDS=FALSE ); ALTER TABLE subscribers OWNER TO admin_1; COMMENT ON TABLE subscribers IS 'Table for managing subscribers for channels';
I've just tested creating a new table using this exact query with no errors.
It looks like whatever editor/administration tool that you're using is causing the problem. I would recommend trying to import directly from CLI or pgAdmin III if possible.
this is my line
-- Table: subscribers
-- DROP TABLE subscribers;
host_account text NOT NULL, subscriber text NOT NULL, CONSTRAINT subscribers_pk PRIMARY KEY (host_account, subscriber), CONSTRAINT host_account_fk FOREIGN KEY (host_account) REFERENCES users (email) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE
WITH ( OIDS=FALSE
ALTER TABLE subscribers admin_test COMMENT ON TABLE subscribers IS 'Table for managing subscribers for channels';
and ı get this error:
You're missing a lot of () and ; from the original command if that's exactly what you're putting in. Syntax is very important, you can't remove the command characters.
Closing as this is an install issue and not a problem with the site itself.
Hello , ı some sql import error.