Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hsrV6-0005h8-HW for pgsql-sql@arkaria.postgresql.org; Wed, 31 Jul 2019 16:30:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hsrV5-0000jb-9e for pgsql-sql@arkaria.postgresql.org; Wed, 31 Jul 2019 16:30:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hsrV5-0000j3-1C for pgsql-sql@lists.postgresql.org; Wed, 31 Jul 2019 16:30:51 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hsrUy-0004ba-Aw for pgsql-sql@lists.postgresql.org; Wed, 31 Jul 2019 16:30:50 +0000 Received: by mail-pf1-x444.google.com with SMTP id t16so32134968pfe.11 for ; Wed, 31 Jul 2019 09:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=a67RIGxRExesncVfDWvFUeG9LFuhYjOEf+j1WeldAVc=; b=kAIONPMMnjLStcAGvuv36SXKvW1WHF52UfzwoYTZ8VS0xV3luxjW2gFTdLJ6hjw9Uk c8Fyi5LZwOPoX/IP5dxcvXcHDdKwhT1wtmFOCj8r8oW0h38xVKRgVHK76KLP2ZjQfMSQ 7GXaoO0W9vMYcd1+r47evK6izESL9Ak8jiQZg8jCC0Rucl0u2aisll/4CqRvKNRRPGfJ rxXzo7Dgl0gMJs/SwKbwzqhAmCm26h/uErGU40qsZMzumUWdr7ywMGQyXRQcOWl9K1I9 OjmSwXh+0+rlnXilhf7NRMz9GfZt+JQz8+uPY0b66Obj7yVDfwdruPXxacgpyYERjp/B 9UoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=a67RIGxRExesncVfDWvFUeG9LFuhYjOEf+j1WeldAVc=; b=uXCp5kOYAQT2B7HNEO3bAA8GGQmnzWCOdGEY08QNZFEEx5gq6/xDsRR82fPn83POfl 4Lm9rNeYqos+j5I1dAkh8gh6XyxSrv2r/WMQc3crtIbdvHYijdlJzMsPMmwdJScIvuI+ Fspf+1U+eSbj3MsJ5CUPXVxDqMdb+n/rOBPftc98z5i03kQqAe8yfJjj5h6AViQZfI9T NF2DEmPEUervXIEJRJq4LO8dPeB+gE+1v39mx+23ulcf2165IbSJMPVi3HgGyd6tJzPr 02eRdIi8JS7ZssWSpLF1geD7kOiWkhH3T9FXU72Z+0zoQIdIKrAe80i2elUs4thZpVbf EN8g== X-Gm-Message-State: APjAAAXL04QS03T5GKnr+VM61X1mxsAFZzKh2zAWgCu62w0dhWzc3S4R NTl91shL86Ks4pv3I9XHAeY/4ecx X-Google-Smtp-Source: APXvYqwK24y0wcu9gVlu3QcrZk92+EqH69St05oiiGpYquaW8+yFbf9SbcgU/coLGot+cEGpJZfJKw== X-Received: by 2002:a63:714a:: with SMTP id b10mr82651257pgn.25.1564590640658; Wed, 31 Jul 2019 09:30:40 -0700 (PDT) Received: from [10.104.134.41] ([155.100.47.1]) by smtp.gmail.com with ESMTPSA id y22sm80458843pfo.39.2019.07.31.09.30.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Jul 2019 09:30:39 -0700 (PDT) Subject: Re: install sample database error To: pgsql-sql@lists.postgresql.org References: <3728498d-fc28-4cc1-2fad-37f716eaad60@gmx.net> From: Rob Sargent Message-ID: <0ee28f8d-727e-c99b-30d5-022f558e17d2@gmail.com> Date: Wed, 31 Jul 2019 10:30:38 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk /usr/bin/unzip some.zip On 7/31/19 10:28 AM, Cao, Xiaowei wrote: > Thanks, yes, I tried to install that sample database from ubuntu terminal. The file I downloaded for the sample database is a .zip file. > The link in your email seems for windows version. > > What command should I use to achieve : "you only need to unzip the ZIP archive, that gives you a .tar file which you do NOT need to unpack." > > > Thanks > > -----Original Message----- > From: Thomas Kellerer > Sent: Tuesday, July 30, 2019 11:16 PM > To: pgsql-sql@lists.postgresql.org > Subject: Re: install sample database error > > Cao, Xiaowei schrieb am 31.07.2019 um 01:27: >> I tried to download the postgresql sample database dvdrental to install on ubuntu. This is a test environment. >> >> I got some errors while running the restore.sql in the downloaded file. >> >> Psql : restore.sql 1015: Error: could not open file $$PATH$$/3077.dat for reading: NO such file or directory. >> >> And the same error for all other dat files… >> >> >> I guessed first the permission issue, I tried to give the file directory the widest privilege like 777, but still has this error. >> >> Database and tables are created, but there are no rows in table. >> >> What could be wrong, what does $$PATH$$ mean? > I assume you are referring to the sample database from: > > https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.postgresqltutorial.com%2Fload-postgresql-sample-database%2F&data=02%7C01%7Cxicao%40seattleschools.org%7C91fbd502a1ac43b8617008d7157eaa0e%7Cd431d15860744832878351ea6f6dd227%7C0%7C1%7C637001506086033723&sdata=tlSyRXLjr1UnKZWBUh2H7qCr8%2F1u9Fv17yEavKMKmSE%3D&reserved=0 > > You can't restore that sample database using psql, you need to use pg_restore. > > As described in the link above, you only need to unzip the ZIP archive, that gives you a .tar file which you do NOT need to unpack. > > Assuming you did already create the dvdrental database, you can restore the backup using: > > pg_restore -U postgres -d dvdrental /path/to/dvdrental.tar > > Thomas > > > CAUTION: This email originated from outside of the organization. Please don't click links, open attachments, or reply with confidential details unless you are certain you know the sender and are expecting the content. >