Re: crash with sql language partition support function - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: crash with sql language partition support function
Date
Msg-id 20180413180830.rxi7gpsireq7wuu6@alvherre.pgsql
Whole thread Raw
In response to Re: crash with sql language partition support function  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: crash with sql language partition support function
List pgsql-hackers
I think this is a good improvement.  On top of that, I propose a new
file partitioning/partdefs.h with the following approximate contents.
This reduces cross-inclusion of headers to the minimum.  I'm dealing
with the fallout from this now, will post a complete patch shortly.


/*-------------------------------------------------------------------------
 *
 * partdefs.h
 *        Base definitions for partitioned table handling
 *
 * Copyright (c) 2007-2018, PostgreSQL Global Development Group
 *
 * src/include/partitioning/partdefs.h
 *
 *-------------------------------------------------------------------------
 */
#ifndef PARTDEFS_H
#define PARTDEFS_H

typedef enum PartitionRangeDatumKind
{
    PARTITION_RANGE_DATUM_MINVALUE = -1,    /* less than any other value */
    PARTITION_RANGE_DATUM_VALUE = 0,    /* a specific (bounded) value */
    PARTITION_RANGE_DATUM_MAXVALUE = 1    /* greater than any other value */
} PartitionRangeDatumKind;

typedef struct PartitionBoundInfoData *PartitionBoundInfo;

typedef struct PartitionKeyData *PartitionKey;

typedef struct PartitionBoundSpec PartitionBoundSpec;

typedef struct PartitionDescData *PartitionDesc;

#endif                            /* PARTDEFS_H */


-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Garym
Date:
Subject: Re: Interesting paper: Contention-Aware Lock Scheduling
Next
From: Andres Freund
Date:
Subject: Re: Postgres stucks in deadlock detection