473,549 Members | 2,935 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

create synopsis wrong ?


Synopsis

CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE /table_name/ (
{ /column_name/ /data_type/ [ DEFAULT /default_expr/ ] [ /column_constrai nt/ [, ... ] ]
| /table_constrain t/ } [, ... ]
)
[ 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__per son_id PRIMARY KEY
sysobs(# , guarantor integer CONSTRAINT fk__person__per son_id REFERENCES person(person_i d)
sysobs(# , firstname varchar(32) CONSTRAINT nn__person__fir stname NOT NULL , CONSTRAINT u__person__firs tname UNIQUE
sysobs(# , lastname varchar(32) CONSTRAINT nn__person__las tname NOT NULL
sysobs(# , email varchar(64) CONSTRAINT u__person__emai l UNIQUE
sysobs(# , phone varchar(32) CONSTRAINT u__person__phon e 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__per son_id PRIMARY KEY
sysobs(# , guarantor integer CONSTRAINT fk__person__per son_id REFERENCES person(person_i d)
sysobs(# , firstname varchar(32) CONSTRAINT nn__person__fir stname NOT NULL CONSTRAINT u__person__firs tname UNIQUE
sysobs(# , lastname varchar(32) CONSTRAINT nn__person__las tname NOT NULL
sysobs(# , email varchar(64) CONSTRAINT u__person__emai l UNIQUE
sysobs(# , phone varchar(32) CONSTRAINT u__person__phon e 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 1101

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

Similar topics

3
4486
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 advance
5
3330
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
1747
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 particular things, then our deductions constitute mathematics. Thus mathematics may be defined as the subject in which we never know what we
6
1658
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 - Counterpoint" once a fortnight, to keep me up on "important" issues?
3
1323
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 = Request.QueryString("search").Split(CChar("")) It's not working. What am I doing wrong?
0
774
by: BRINER Cedric | last post by:
Synopsis CREATE { TEMPORARY | TEMP } ] TABLE /table_name/ ( { /column_name/ /data_type/ ] | /table_constraint/ } ) ) ] ... ...
2
3043
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 what I'm hoping to achieve. I've never before had to use Javascript closures, but now I do, so I'm making an effort to understand them. I've been...
9
1780
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 where the object is referenced. In Notes, I'd just get a synopsis which shows all executable lines of code in the entire database. Does Access have...
4
4447
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 Project. So let's say I've created a Folder called "MyVBNet Classes" to hold these general-use VB.Net class files that I will eventually associate...
0
7518
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7715
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7956
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7808
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1057
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.