Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</a>
&nbsp;
<a href="https://www.postgresql.org/docs/14/index.html">
<img src="https://img.shields.io/badge/Version-PostgreSQL 14-00008B?labelColor=gray&style=flat&link=https://www.postgresql.org/docs/14/index.html"/>
<img src="https://img.shields.io/badge/Version-Postgresql 15-00008B?labelColor=gray&style=flat&link=https://www.postgresql.org/docs/14/index.html"/>
</a>
&nbsp;
<a href="https://github.com/apache/age/issues">
Expand Down
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

Release Notes for Apache AGE release 0.0.0 for PG 14
Release Notes for Apache AGE release 0.0.0 for PG 15

Apache AGE 0.0.0 - Release Notes

Expand Down
28 changes: 20 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,29 @@
# limitations under the License.
#

FROM postgres:14
FROM postgres:15

RUN apt-get update
RUN apt-get install --assume-yes --no-install-recommends --no-install-suggests \
bison \
build-essential \
flex \
postgresql-server-dev-14
RUN apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
bison \
build-essential \
flex \
postgresql-server-dev-15 \
locales

ENV LANG=en_US.UTF-8
ENV LC_COLLATE=en_US.UTF-8
ENV LC_CTYPE=en_US.UTF-8

RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \
&& update-locale LANG=en_US.UTF-8

COPY . /age
RUN cd /age && make install

WORKDIR /age

RUN make && make install

COPY docker/docker-entrypoint-initdb.d/00-create-extension-age.sql /docker-entrypoint-initdb.d/00-create-extension-age.sql

Expand Down
12 changes: 10 additions & 2 deletions docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,23 @@
#


FROM postgres:14-buster
FROM postgres:14

RUN apt-get update
RUN apt-get install --assume-yes --no-install-recommends --no-install-suggests \
bison \
build-essential \
flex \
postgresql-server-dev-14
postgresql-server-dev-15 \
locales

ENV LANG=en_US.UTF-8
ENV LC_COLLATE=en_US.UTF-8
ENV LC_CTYPE=en_US.UTF-8

RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \
&& update-locale LANG=en_US.UTF-8
COPY . /age

# Set current working directory to /age/ and build.
Expand Down
4 changes: 2 additions & 2 deletions src/backend/catalog/ag_catalog.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ static bool is_age_drop(PlannedStmt *pstmt)

if (IsA(obj, String))
{
Value *val = (Value *)obj;
char *str = val->val.str;
String *val = (String *)obj;
char *str = val->sval;

if (!pg_strcasecmp(str, "age"))
return true;
Expand Down
4 changes: 2 additions & 2 deletions src/backend/commands/graph_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static Oid create_schema_for_graph(const Name graph_name)
integer = SystemTypeName("int4");
data_type = makeDefElem("as", (Node *)integer, -1);
maxvalue = makeDefElem("maxvalue", (Node *)makeInteger(LABEL_ID_MAX), -1);
cycle = makeDefElem("cycle", (Node *)makeInteger(true), -1);
cycle = makeDefElem("cycle", (Node *)makeBoolean(true), -1);
seq_stmt->options = list_make3(data_type, maxvalue, cycle);
seq_stmt->ownerId = InvalidOid;
seq_stmt->for_identity = false;
Expand Down Expand Up @@ -198,7 +198,7 @@ Datum drop_graph(PG_FUNCTION_ARGS)
static void drop_schema_for_graph(char *graph_name_str, const bool cascade)
{
DropStmt *drop_stmt;
Value *schema_name;
String *schema_name;
List *label_id_seq_name;
DropBehavior behavior;

Expand Down
12 changes: 6 additions & 6 deletions src/backend/commands/label_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,12 +516,12 @@ static FuncCall *build_id_default_func_expr(char *graph_name, char *label_name,
label_id_func_name = list_make2(makeString("ag_catalog"),
makeString("_label_id"));
graph_name_const = makeNode(A_Const);
graph_name_const->val.type = T_String;
graph_name_const->val.val.str = graph_name;
graph_name_const->val.sval.type = T_String;
graph_name_const->val.sval.sval = graph_name;
graph_name_const->location = -1;
label_name_const = makeNode(A_Const);
label_name_const->val.type = T_String;
label_name_const->val.val.str = label_name;
label_name_const->val.sval.type = T_String;
label_name_const->val.sval.sval = label_name;
label_name_const->location = -1;
label_id_func_args = list_make2(graph_name_const, label_name_const);
label_id_func = makeFuncCall(label_id_func_name, label_id_func_args, COERCE_SQL_SYNTAX, -1);
Expand All @@ -530,8 +530,8 @@ static FuncCall *build_id_default_func_expr(char *graph_name, char *label_name,
nextval_func_name = SystemFuncName("nextval");
qualified_seq_name = quote_qualified_identifier(schema_name, seq_name);
qualified_seq_name_const = makeNode(A_Const);
qualified_seq_name_const->val.type = T_String;
qualified_seq_name_const->val.val.str = qualified_seq_name;
qualified_seq_name_const->val.sval.type = T_String;
qualified_seq_name_const->val.sval.sval = qualified_seq_name;
qualified_seq_name_const->location = -1;
regclass_cast = makeNode(TypeCast);
regclass_cast->typeName = SystemTypeName("regclass");
Expand Down
4 changes: 2 additions & 2 deletions src/backend/executor/cypher_delete.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,13 @@ static void process_delete_list(CustomScanState *node)
ResultRelInfo *resultRelInfo;
HeapTuple heap_tuple;
char *label_name;
Value *pos;
Integer *pos;
int entity_position;

item = lfirst(lc);

pos = item->entity_position;
entity_position = pos->val.ival;
entity_position = pos->ival;

/* skip if the entity is null */
if (scanTupleSlot->tts_isnull[entity_position - 1])
Expand Down
10 changes: 9 additions & 1 deletion src/backend/parser/cypher_analyze.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,11 +756,19 @@ static Query *analyze_cypher_and_coerce(List *stmt, RangeTblFunction *rtfunc,

pnsi = addRangeTableEntryForSubquery(pstate, subquery, makeAlias("_", NIL),
lateral, true);

rtindex = list_length(pstate->p_rtable);
Assert(rtindex == 1); // rte is the only RangeTblEntry in pstate
if (rtindex !=1 )
{
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("invalid value for rtindex")));
}


addNSItemToQuery(pstate, pnsi, true, true, true);
query->targetList = expandNSItemAttrs(pstate, pnsi, 0, -1);
query->targetList = expandNSItemAttrs(pstate, pnsi, 0, true, -1);

markTargetListOrigins(pstate, query->targetList);

Expand Down
Loading