2
votes
2answers
116 views

Is there a way to avoid duplicating the definition of a foreign key?

I was wondering about this example CREATE TABLE cities ( city varchar(80) primary key, location point ); CREATE TABLE weather ( city varchar(80) references ...
1
vote
1answer
197 views

What is the purpose of the keyword “ID” in PostgreSQL?

I'm new to PostgreSQL and I ran into problems using the following query: SELECT * FROM table1 WHERE ID = 1 ERROR: column "id" does not exist LINE 2: WHERE ID = 1 where ID is a column I ...
3
votes
2answers
766 views

How does pgAdmin III build CREATE statements?

In PostgreSQL, there is no SHOW CREATE statement, known for example from MySQL. But when you use the pgAdmin III client program and go to object details, you see the corresponding CREATE statement. ...