Re: [SQL] restoring a dump

2001-06-28 Thread Wei Weng
Do not understand your question. On 28 Jun 2001 16:32:47 -0700, Phuong Ma wrote: > I tried using pg_restore, but it did not restore the dump successfully. > Maybe it is the syntax I'm using, but I remember reading that you cannot > use the pg_restore to restore a dump that uses INSERT. Does an

Re: [SQL] restoring a dump

2001-06-28 Thread Phuong Ma
Peter Eisentraut wrote: > > Phuong Ma writes: > > > pg_dump -C -D -F t > test.tar > > tar -xvf test.tar > > psql restore.sql > > psql test < 19.dat > > psql test < 20.dat .. and so on > > psql test < toc.dat > > I believe you're supposed to use pg_restore on the tar file itself. > > -- > Peter

[SQL] Still stuck on a left join

2001-06-28 Thread Ari Nepon
I've been stuck now on a left join for about two weeks. DB is MSaccess2K, language is ASP. I'm learning php and PgSQL now, and will be migrating everything soon. In the mean time. If anyone knows where I am going wrong, please let me know. Here is my current SQL query: SELECT T.ID, T.employee, T.

[SQL] restoring a dump

2001-06-28 Thread Phuong Ma
Hello, I have been trying to restore my dump and it seems like it is not working. I put the dump in a tar file and when I untarred it, there are several .dat files, a toc.dat file, and a restore.sql file. I used psql to restore these files into a database. I first started restoring the restor

Re: [SQL] Subquery error. Help please!!

2001-06-28 Thread Ross J. Reedstrom
I did something similar, but pu the subselect into a view, in the WHERE clause. SELECT * FROM modules m WHERE (m.module_ident = (SELECT max(modules.module_ident) AS max FROM modules WHERE (m.moduleid = modules.moduleid) GROUP BY modules.moduleid)); The equivalent for you would be something like:

Re: [SQL] Problems using a rule with the WHERE clause

2001-06-28 Thread Tom Lane
Luis Sousa <[EMAIL PROTECTED]> writes: >> that shouldn't happen, in any case. If this is the current release >> (7.1.2) > The version that I'm using is 7.1release-3.potato.1 I don't see any problem here when I run your script. I suspect you are seeing another consequence of the rewriter bug I

[SQL] examine the database

2001-06-28 Thread Ilan Fait
Title: examine the database   Hi, I need to know if in PostgerSQL DB has a utility like in Oracle Release 8.1.6 contains a new package called   STATSPACK that improves on the UTLBSTAT/UTLESTAT process (or like the UTLBSTAT/UTLESTAT).   This information is very important since we are

Re: [SQL] Subquery error. Help please!!

2001-06-28 Thread Tom Lane
"kakerjak" <[EMAIL PROTECTED]> writes: > If the subquery is placed before the JOIN, like it is above, then the error > i get says 'parse error at or near "select"' > If i flip the subquery around with the laboratory table then i get 'parse > error at or near "("' Are you using 7.1?

Re: [SQL] Link many attributes in one table to one attribute inanother??

2001-06-28 Thread Wei Weng
A easy way to handle this: create table marble ( id int4 primary key, color1 int4, color2 int4, color3 int4 ); create table color ( id int4, desc text ); color1, color2, and color3 point to the id in color table. This way you can expand your color table indefi

[SQL]

2001-06-28 Thread Ilan Fait
Title:         Hi, I need to know if in PostgerSQL DB has a utility like in Oracle Release 8.1.6 contains a new package called   STATSPACK that improves on the UTLBSTAT/UTLESTAT process (or like the UTLBSTAT/UTLESTAT).   This information is very important since we are testing Pos

Re: [SQL] Subquery error. Help please!!

2001-06-28 Thread Wei Weng
What version of postgresql are you using? On 27 Jun 2001 17:09:14 -0400, kakerjak wrote: > Hey all.. > > Here's the table definition. > CREATE TABLE "laboratory" ( > "id" "int4" NOT NULL, > "subid" "int2" NOT NULL, > "name" varchar(30) NOT NULL, > CONSTRAINT "laboratory_pkey" PRI