2

I am trying to install age with pg12 but couldnt set age path

postgres=# LOAD 'age';

LOAD postgres=# SET search_path = ag_catalog, "$user", public;

Output:

HINT: No function matches the given name and argument types. You might need to add explicit type casts.
postgres=# LOAD 'age';
LOAD
postgres=# SET search_path = ag_catalog, "$user", public;
ERROR: syntax error at or near "ag_catalog"
ERROR: function cypher (unknown, unknown) does not exist
LINE 1: SELECT * FROM cypher('', $$ SET search_path = ag_catalog, "S$...
A

HINT: No function matches the given name and argument types. You might need to add explicit type casts.
postgres=#

Screenshot

  • 1
    15 answers?? Is it [astroturfing](https://en.wikipedia.org/wiki/Astroturfing)? [One was](https://stackoverflow.com/questions/76679360/cannot-set-path-in-apache-age/76679379#76679379) posted 2 minutes and 6 seconds after the question was posted. [It is not human](https://www.youtube.com/watch?v=SRKjf8b4f2E&t=1m52s) (or prepared in advance). – Peter Mortensen Sep 01 '23 at 13:14
  • cont' - Possibly related (meta): *[Apache AGE (of Despair)](https://meta.stackoverflow.com/questions/426241/apache-age-of-despair)*. And [this](https://meta.stackoverflow.com/questions/418569/oceanbase-tag-is-being-used-for-fake-questions-and-answers/425403#comment964018_425403): *"...astroturfing, [which is forbidden on the SE network](https://meta.stackexchange.com/questions/8323/astroturfing-on-stack-overflow)"* – Peter Mortensen Sep 01 '23 at 13:35

11 Answers11

0

It should be in the following way to achieve that

SET search_path = ag_catalog, "$user", public;

not wrapped in a cypher call

0

The command SET search_path = ag_catalog, "$user", public; should work after loading AGE, but it seems that there was a command you issued earlier that was buffered and it tried to execute along with SET. Just restart and try again.

Or maybe you will get luckier with this command:

LOAD 'age';
SET search_path TO ag_catalog;
Marco Souza
  • 296
  • 7
0

Your SET query seems to be running inside the cypher function. Restart your Postgres instance and reload AGE, then try again.

0

I have had this happen to me as well but I just restarted and it resolved. Probably some other commands are being cached from before. Although, I believe a faulty installation may cause this too. You can try a couple of things to debug this:

  • Firstly, check if the extension has been correctly loaded by the following query SELECT * FROM pg_extension WHERE extname = 'age'; It should return a row with the name age.

  • Check if the ag_catalog schema exists by the following query SELECT * FROM pg_namespace WHERE nspname = 'ag_catalog';

  • Lastly, you can try this alternative syntax to SET SET search_path TO ag_catalog, "$user", public; maybe this might work!

Hassoo
  • 85
  • 11
0

Restart your postgres instance, connect to your database with the right credentials and reload age as follows;

LOAD 'age';

then you can set search_path as follows;

SET search_path = ag_catalog, "$user", public;

it should work fine now.

Peter
  • 43
  • 4
0

It appears that the installation of the AGE extension might not be complete. To address this, you should remove the previous AGE extension and obtain a new and updated version. Afterwards, perform a fresh installation.

Additionally, rather than repeatedly using LOAD and SET when starting your server, modify the appropriate parameters directly in the postgresql.conf file. This way, the configuration changes will be applied automatically upon startup.

I hope this could solve the problem!

-1

I noticed you're setting the search_path inside a cypher query, that's one reason for the error. As for the previous error, citing the previous statements would be great to aid help.

However, the following steps should help setup AGE post installation with no issues:

CREATE EXTENSION age;
LOAD ‘age’;
SET search_path = ag_catalog, “$user”, public;

Setting the search_path can also be done in the postgresql.conf file, this saves the stress of redoing this everytime.

Reference: Getting Started with Apache AGE: A Comprehensive Guide (Part 1)

Tito
  • 289
  • 8
-1

The error message which you are getting shows that the PG server is not able the understand the SET search_path command. The rationale behind this is the invalid ag_catalog schema in PG12.

One way to resolve this error is to follow the instructions on the Apache AGE website to install the Apache AGE extension after which you would be able to set the search_path to ag_catalog seamlessly without facing any sort of errors.

-1

There seems to be a problem with the AGE installation. You should try to reinstall Apache AGE, and if that still does not work, try a different version.

To load AGE extension correctly first remove the previous extension using

DROP EXTENSION age CASCADE;

And to load it, use

CREATE EXTENSION age;
LOAD 'age';
SET search_path = ag_catalog, "$user", public;

If the installation is correct, files with names similar to age.control, age--1.1.1.sql should be created in <postgress dir>/share/extension.

abhishek2046
  • 312
  • 1
  • 11
-1

This may be due to incomplete installation of AGE. Reclone the repo compatible with your postgreSQl version and reinstall it. After maing sure all your test cases pass start your server and then use these commands

CREATE EXTENSION age;
LOAD ‘age’;
SET search_path = ag_catalog, “$user”, public;
-1

It seems that the AGE installation might be incomplete. To resolve this consider reinstalling AGE with the latest version.

Also, It is recommended to directly modify the relevant parameters in the postgresql.conf file instead of repeatedly using LOAD and SET commands every time you start the server, this will ensure that the configuration changes will be automatically applied during startup.