jrgemignani commented on PR #1286:
URL: https://github.com/apache/age/pull/1286#issuecomment-1775574613

   @muhammadshoaib Unfortunately, your PR does not build locally -
   
   ```
   ============== creating database "contrib_regression" ==============
   CREATE DATABASE
   ALTER DATABASE
   ALTER DATABASE
   ALTER DATABASE
   ALTER DATABASE
   ALTER DATABASE
   ALTER DATABASE
   ============== installing age                         ==============
   ERROR:  type agtype does not exist
   command failed: 
"/home/jgemignani/POSTGRESQL/postgresql-15.4/psql-15.4-5432-pgsql/bin/psql" -X 
-c "CREATE EXTENSION IF NOT EXISTS \"age\"" "contrib_regression"
   make: *** [installcheck] Error 2
   [jgemignani@cent7nuc7i5bnk incubator-age]$
   ```
   
   When I looked at `age--1.4.0.sql` I noticed the order was not correct, 
`agtype` was being defined well after it was being referenced -
   
   ```
     20 --
     21 -- Scalar Functions
     22 --
     23
     24 CREATE FUNCTION ag_catalog.age_id(agtype)
     25     RETURNS agtype
     26     LANGUAGE c
     27     IMMUTABLE
     28 RETURNS NULL ON NULL INPUT
     29 PARALLEL SAFE
     30 AS 'MODULE_PATHNAME';
     31
   ```
   ```
   2384  --
   2385 -- agtype type and its support functions
   2386 --
   2387
   2388 -- define agtype as a shell type first
   2389 CREATE TYPE agtype;
   2390
   ```
   I believe `age--1.4.0.sql` needs to be built in a specific order and we need 
to keep the dependencies in mind.
   
   Additionally, the license block was included multiple times in the finished 
file. While it is just a comment block, we may want to have just one file, 
template?, that contains the top of `age--x.x.x.sql` and then all the other 
files are appended to that file.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to