473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

create synopsis wrong ?


Synopsis

CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE /table_name/ (
{ /column_name/ /data_type/ [ DEFAULT /default_expr/ ] [ /column_constraint/ [, ... ] ]
| /table_constraint/ } [, ... ]
)
[ INHERITS ( /parent_table/ [, ... ] ) ]
[ WITH OIDS | WITHOUT OIDS ]
...
...
so this will mean that every column's constraint will be separated by a `,' !

but when I try to create:
sysobs=# CREATE TABLE person ( person_id SERIAL CONSTRAINT pk__person__person_id PRIMARY KEY
sysobs(# , guarantor integer CONSTRAINT fk__person__person_id REFERENCES person(person_id)
sysobs(# , firstname varchar(32) CONSTRAINT nn__person__firstname NOT NULL , CONSTRAINT u__person__firstname UNIQUE
sysobs(# , lastname varchar(32) CONSTRAINT nn__person__lastname NOT NULL
sysobs(# , email varchar(64) CONSTRAINT u__person__email UNIQUE
sysobs(# , phone varchar(32) CONSTRAINT u__person__phone UNIQUE);
ERROR: parser: parse error at or near ","
this is what I've got !
So I've I removed the `,' between the two column's constraint :
sysobs=# CREATE TABLE person ( person_id SERIAL CONSTRAINT pk__person__person_id PRIMARY KEY
sysobs(# , guarantor integer CONSTRAINT fk__person__person_id REFERENCES person(person_id)
sysobs(# , firstname varchar(32) CONSTRAINT nn__person__firstname NOT NULL CONSTRAINT u__person__firstname UNIQUE
sysobs(# , lastname varchar(32) CONSTRAINT nn__person__lastname NOT NULL
sysobs(# , email varchar(64) CONSTRAINT u__person__email UNIQUE
sysobs(# , phone varchar(32) CONSTRAINT u__person__phone UNIQUE);
...
...
CREATE
and !bam! it works !

So is my interpretation of the synopsis wrong or is'it the synopsis itself which is wrong ?

Regards

Cédric BRINER

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #1
0 1084

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: banon | last post by:
I am trying to write code to create and delete a virtual directory with ASP 3. If it is not possible, then how could I do the same with a physical folder. any help is appreciated. Thanks in...
5
by: Ken Fine | last post by:
I want my application to maintain a directory tree based on months and years, e.g.: 2004 January file file file February file
2
by: Steven T. Hatton | last post by:
Remember about a year ago when I got flamed for suggesting something like this on c.l.c++? http://synopsis.fresco.org -- If our hypothesis is about anything and not about some one or more...
6
by: Mabden | last post by:
Suggestion to group: Let's have Dan and Keith summarize the month's "going's on" and write a synopsis. I have to work so much more lately, that I can't keep up. Can we just have a "Point -...
3
by: Miguel Dias Moura | last post by:
Hello, I am calling an ASP.NET / VB as follows: search.aspx?search=asp%20book%20london Then I create a string with the keywords like this: Dim keywords() As String =...
0
by: BRINER Cedric | last post by:
Synopsis CREATE { TEMPORARY | TEMP } ] TABLE /table_name/ ( { /column_name/ /data_type/ ] | /table_constraint/ } ) ) ] ... ...
2
by: Jake Barnes | last post by:
Using javascript closures to create singletons to ensure the survival of a reference to an HTML block when removeChild() may remove the last reference to the block and thus destory the block is...
9
by: mvsguy | last post by:
I'm a Notes admin tasked with fixing an Access problem. I hope someone will be gracious enough to help. The database is getting a 3420, object not defined, and I need to find all the places...
4
by: Alan Mailer | last post by:
Again, I'm new to VB.net and there is something I need help with: Like (I assume) many of us, over time I want to be able to create some VB.net classes that I might want to use in more than one...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.