Giter VIP home page Giter VIP logo

Comments (11)

Fenrirthviti avatar Fenrirthviti commented on May 27, 2024

Can you provide the full error, and on which .sql file you get it on?

Also, which version of PGSQL are you using?

from stream-site.

kimmoda avatar kimmoda commented on May 27, 2024

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

from stream-site.

kimmoda avatar kimmoda commented on May 27, 2024

PostgreSQL 8.4.20

from stream-site.

Fenrirthviti avatar Fenrirthviti commented on May 27, 2024

You need to change pg_sql_account_here to your local PostgreSQL account.

from stream-site.

kimmoda avatar kimmoda commented on May 27, 2024

editing , but still this error

ss6

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

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(
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';

from stream-site.

kimmoda avatar kimmoda commented on May 27, 2024

error

from stream-site.

Fenrirthviti avatar Fenrirthviti commented on May 27, 2024

I've just tested creating a new table using this exact query with no errors.

success

from stream-site.

Fenrirthviti avatar Fenrirthviti commented on May 27, 2024

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.

from stream-site.

kimmoda avatar kimmoda commented on May 27, 2024

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:

admin

from stream-site.

Fenrirthviti avatar Fenrirthviti commented on May 27, 2024

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.

from stream-site.

Fenrirthviti avatar Fenrirthviti commented on May 27, 2024

Closing as this is an install issue and not a problem with the site itself.

from stream-site.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.