Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPU0A-00017K-61 for pgsql-novice@arkaria.postgresql.org; Sun, 12 Sep 2021 18:14:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mPU08-0006S9-Ay for pgsql-novice@arkaria.postgresql.org; Sun, 12 Sep 2021 18:14:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPU07-0006Rz-VK for pgsql-novice@lists.postgresql.org; Sun, 12 Sep 2021 18:14:48 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mPTzz-0006mc-Er for pgsql-novice@lists.postgresql.org; Sun, 12 Sep 2021 18:14:46 +0000 Received: by mail-wr1-x430.google.com with SMTP id q11so11013695wrr.9 for ; Sun, 12 Sep 2021 11:14:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=Lp8WjMcpvuq+xMm0whJaJpnmeb9uTJ2ncyi48WEmoxE=; b=BgLxSOw6o+Di2+5OMKI4C8yYGOvAy6Q1BnuXYEyT5Fnp3N86MzzD9xOY3TYRpYtFoq tEwaNP67Hv2RLMmFe3FzSPQwhn3wo3J9V2IwvS4EmAqaKmqqd47v48zkqephpvIuEQSB OiSURNQhmiv8qtnIJeJ4fEv81qAMHhrC5zfR3LBQ7DQMWiD0Jgfbyd7FJJzWZJh6bo/P ldcbA+FKuBBvvcha0iwi/5MXDMDu+943eSbdBI0LCey3iePsauA/ym5v9abseSPUBx1K BHd2e0UoI3PFKesn9zCADQvuirlrooTnUt/zzflRCDSFlSAbfFefdA9nndONJ0F0CW6f Vjxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=Lp8WjMcpvuq+xMm0whJaJpnmeb9uTJ2ncyi48WEmoxE=; b=xcZNxu9Q93QpkJInk3912RTqtQdh1+4Pxri37Pbzq4bVF1qzo4NttWgMtfnkKduNgO 7O79//BGAm07Gn0jEeudQMo1v8vEPH1BuerNI835aw/f9cKEpOassawsVNsUFYGjs74o 9fUweyjrHfBTKvlrOIken3nrTwnNVijef0AbwZYhQZwoAXA84FZeFPuIl+a0BBeb6ZFs Tj4C9VQDmY3FMT3tBYbLpgcWIeJHKG8PEVSWCAHquAquqMkqHvxiFKRtvYKkDyPlj+98 c8oGyCke1ZULW/+RGamTRetuJuH/Arsd+tdnyvUdNbanmBnfBNPUYwpEGtDhpj8YixlA mVqQ== X-Gm-Message-State: AOAM533xVMjIJFApdEG50z+gZpyt9tNQriQarGrGhaY/i/iULhiMk4xR aBltC0uhWw5d355hXHu9XhwYSw== X-Google-Smtp-Source: ABdhPJw3y+PeuNjfHqav087WyMLam5YsL7JAMYuKy37IHqC60orL5TefFrHJELHnq4qX12zdT3XjDw== X-Received: by 2002:adf:916f:: with SMTP id j102mr8503039wrj.422.1631470478029; Sun, 12 Sep 2021 11:14:38 -0700 (PDT) Received: from localhost.localdomain (62-46-253-206.adsl.highway.telekom.at. [62.46.253.206]) by smtp.gmail.com with ESMTPSA id m1sm4518003wmq.10.2021.09.12.11.14.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 11:14:37 -0700 (PDT) Message-ID: <436206df17b541f0f42142cebb87fbbeabac8d36.camel@cybertec.at> Subject: Re: my server return OK with ALL, but QUERY.test from HOME http://postgis.net return ERROR From: Laurenz Albe To: cPanel cPanel , pgsql-novice@lists.postgresql.org Date: Sun, 12 Sep 2021 20:14:36 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, 2021-09-12 at 10:51 -0500, cPanel cPanel wrote: > I connect as USER postgres > > QUERY 1: > SELECT PostGIS_Version(); >  => 3.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1 > > > QUERY 2: > SELECT PostGIS_Full_Version(); > => POSTGIS="3.1.4 ded6c34" [EXTENSION] PGSQL="130" > GEOS="3.9.1-CAPI-1.14.2" SFCGAL="1.3.1" PROJ="7.2.1" GDAL="GDAL 3.3.1, > released 2021/06/28" LIBXML="2.9.1" LIBJSON="0.11" TOPOLOGY RASTER > > QUERY 3: > SELECT num, street, city, state, zip FROM parse_address('1 Devonshire > Place PH301, Boston, MA 02109'); >     [num] => 1 >     [street] => Devonshire Place PH301 >     [city] => Boston >     [state] => MA >     [zip] => 02109 > > now my problem in QUERY 4: > a// I open http://postgis.net/ > b// I copy exactly "the command test" from home page: > QUERY = SELECT superhero.name FROM city, superhero WHERE > ST_Contains(city.geom, superhero.geom) AND city.name = 'Gotham'; > c// I run QUERY in my server > d// result is: > > ---------------------------------------------------------------------------------------------------------------------- >     [pg_last_error()] => ERROR:  relation "city" does not exist > LINE 1: SELECT superhero.name FROM city, superhero WHERE ST_Contains... > ---------------------------------------------------------------------------------------------------------------------- > > why this error? > how I can fix? Initially, PostgreSQL databases are empty and contain no data (except metadata). There is certainly no table like "city" or "superhero". Before you can query these tables, you have to create them and fill them with data. If you follow a tutorial, that tutorial should tell you how to get these data and how to load them into your database. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com