commit generated files so doltgresql can be consumed as a dependency

This commit is contained in:
coffeegoddd☕️✨
2026-07-29 16:37:11 -07:00
parent 4c7a4e67f3
commit fb61b6b1c1
15 changed files with 46345 additions and 40 deletions
+5
View File
@@ -0,0 +1,5 @@
postgres/parser/parser/sql.go linguist-generated=true
postgres/parser/parser/help_messages.go linguist-generated=true
postgres/parser/lex/tokens.go linguist-generated=true
postgres/parser/lex/reserved_keywords.go linguist-generated=true
postgres/parser/lex/keywords.go linguist-generated=true
+47
View File
@@ -45,6 +45,53 @@ jobs:
env:
BRANCH_NAME: ${{ github.head_ref }}
CHANGE_TARGET: ${{ github.base_ref }}
- name: Check generated parser sources
shell: bash
run: |
generated=(
postgres/parser/parser/sql.go
postgres/parser/parser/help_messages.go
postgres/parser/lex/tokens.go
postgres/parser/lex/reserved_keywords.go
postgres/parser/lex/keywords.go
)
if ! git diff --quiet -- "${generated[@]}"; then
echo "ERROR: Generated parser sources differ from the checked in version."
echo "Run ./postgres/parser/build.sh and commit the result."
git diff --stat -- "${generated[@]}"
git diff -- "${generated[@]}"
exit 1
fi
for f in "${generated[@]}"; do
if ! git ls-files --error-unmatch -- "$f" > /dev/null 2>&1; then
echo "ERROR: $f is generated but not tracked by git."
echo "Consumers of this repo as a Go module need it in the module zip."
echo "Check that no .gitignore rule matches it, then git add it."
exit 1
fi
done
echo "generated parser sources are up to date"
- name: Check consumers do not need ungenerated artifacts
shell: bash
env:
CGO_ENABLED: "0"
run: |
rc=0
for goos in windows darwin linux; do
while IFS='|' read -r dir pat; do
[ -z "$pat" ] && continue
rel="${dir#$PWD/}"
if [ -z "$(git ls-files -- "$rel/$pat")" ]; then
echo "ERROR: GOOS=$goos embeds '$rel/$pat', which matches no git-tracked file."
echo "Consumers building for $goos from a module zip cannot run generators first,"
echo "so an embedded artifact must be committed or put behind a build tag."
rc=1
fi
done < <(GOOS=$goos go list -e -f '{{$d := .Dir}}{{range .EmbedPatterns}}{{$d}}|{{.}}{{"\n"}}{{end}}' ./...)
done
if [ "$rc" -ne 0 ]; then exit 1; fi
GOOS=windows go build -mod=readonly ./postgres/parser/parser ./postgres/parser/lex
echo "no embedded artifact depends on running a generator"
format:
needs: verify
if: ${{ needs.verify.outputs.format == 'true' }}
-1
View File
@@ -25,7 +25,6 @@ scripts/mini_sysbench
# ignore doltgres db created
doltgres
postgres
auth.db
# ignore extensions output
@@ -19,7 +19,7 @@ package pg_extension
import (
"bytes"
"crypto/sha256"
_ "embed"
"errors"
"fmt"
"io"
"os"
@@ -33,17 +33,17 @@ import (
// PLATFORM specifies which platform applies to the current library loader. This will always be a three-letter string.
const PLATFORM = "WIN"
//go:embed output/postgres.exe
var libDefBytes []byte
//go:embed output/pg_extension.dll
var dllBytes []byte
var ErrExtensionSupportUnavailable = errors.New("extension support is unavailable: this binary was built without " +
"the Windows extension support artifacts embedded, and pg_extension.dll was not found alongside the executable. " +
"Rebuild with the `pg_extension_embed` build tag, after running " +
"core/extensions/pg_extension/library/build_library.sh on Windows to produce them")
// winLib is the Windows-specific implementation of InternalLoadedLibrary.
type winLib struct{ dll syscall.Handle }
var _ InternalLoadedLibrary = (*winLib)(nil)
var addPGBinDir = &sync.Once{}
var addPGBinDirErr error
// loadLibraryInternal handles the loading of an extension's DLL.
func loadLibraryInternal(path string) (InternalLoadedLibrary, error) {
@@ -68,30 +68,37 @@ func loadLibraryInternal(path string) (InternalLoadedLibrary, error) {
panic(fmt.Errorf("cannot find where the executable was launched:\n%s", err.Error()))
}
dllDir = filepath.Dir(currentBinaryLocation)
shouldWriteFiles := false
if _, err := os.Stat(filepath.Join(dllDir, "postgres.exe")); err != nil {
shouldWriteFiles = true
if len(libDefBytes) == 0 || len(dllBytes) == 0 {
if _, err := os.Stat(filepath.Join(dllDir, "pg_extension.dll")); err != nil {
addPGBinDirErr = ErrExtensionSupportUnavailable
return
}
} else {
func() {
// If the DLL hash doesn't match our hash, then we overwrite it
extDll, err := os.Open(filepath.Join(filepath.Dir(currentBinaryLocation), "pg_extension.dll"))
if err != nil {
shouldWriteFiles = true
return
}
defer func() {
_ = extDll.Close()
shouldWriteFiles := false
if _, err := os.Stat(filepath.Join(dllDir, "postgres.exe")); err != nil {
shouldWriteFiles = true
} else {
func() {
// If the DLL hash doesn't match our hash, then we overwrite it
extDll, err := os.Open(filepath.Join(filepath.Dir(currentBinaryLocation), "pg_extension.dll"))
if err != nil {
shouldWriteFiles = true
return
}
defer func() {
_ = extDll.Close()
}()
dllSha := sha256.Sum256(dllBytes)
extDllSha := sha256.New()
_, _ = io.Copy(extDllSha, extDll)
shouldWriteFiles = !bytes.Equal(extDllSha.Sum(nil), dllSha[:])
}()
dllSha := sha256.Sum256(dllBytes)
extDllSha := sha256.New()
_, _ = io.Copy(extDllSha, extDll)
shouldWriteFiles = !bytes.Equal(extDllSha.Sum(nil), dllSha[:])
}()
}
if shouldWriteFiles {
writeLocation := filepath.Dir(currentBinaryLocation)
_ = os.WriteFile(filepath.Join(writeLocation, "postgres.exe"), libDefBytes, 0755)
_ = os.WriteFile(filepath.Join(writeLocation, "pg_extension.dll"), dllBytes, 0755)
}
if shouldWriteFiles {
writeLocation := filepath.Dir(currentBinaryLocation)
_ = os.WriteFile(filepath.Join(writeLocation, "postgres.exe"), libDefBytes, 0755)
_ = os.WriteFile(filepath.Join(writeLocation, "pg_extension.dll"), dllBytes, 0755)
}
}
}
dirPtr, err := syscall.UTF16PtrFromString(dllDir)
@@ -101,6 +108,9 @@ func loadLibraryInternal(path string) (InternalLoadedLibrary, error) {
_, _, _ = syscall.MustLoadDLL("kernel32.dll").MustFindProc("SetDllDirectoryW").Call(uintptr(unsafe.Pointer(dirPtr)))
_, _ = syscall.LoadLibrary(filepath.Join(dllDir, "pg_extension.dll"))
})
if addPGBinDirErr != nil {
return nil, addPGBinDirErr
}
d, err := syscall.LoadLibrary(path)
if err != nil {
return nil, err
@@ -0,0 +1,25 @@
// Copyright 2025 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build windows && pg_extension_embed
package pg_extension
import _ "embed"
//go:embed output/postgres.exe
var libDefBytes []byte
//go:embed output/pg_extension.dll
var dllBytes []byte
@@ -0,0 +1,21 @@
// Copyright 2025 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build windows && !pg_extension_embed
package pg_extension
var libDefBytes []byte
var dllBytes []byte
+1 -1
View File
@@ -51,7 +51,7 @@ gofmt -s -w parser/help_messages.go
cat parser/gen/sql.go.tmp | \
sed -E 's/^const ([A-Z][_A-Z0-9]*) =.*$/const \1 = lex.\1/g') > parser/sql.go.tmp || rm parser/sql.go.tmp
mv -f parser/sql.go.tmp parser/sql.go
go run golang.org/x/tools/cmd/goimports -w parser/sql.go
go run golang.org/x/tools/cmd/goimports -local github.com/dolthub/doltgresql -w parser/sql.go
# Build extension support
../../core/extensions/pg_extension/library/build_library.sh
-4
View File
@@ -1,4 +0,0 @@
# These are specific to this directory, and are generated by ../build.sh
keywords.go
reserved_keywords.go
tokens.go
+2564
View File
File diff suppressed because it is too large Load Diff
+170
View File
@@ -0,0 +1,170 @@
// Code generated by reserved_keywords.awk. DO NOT EDIT.
// GENERATED FILE DO NOT EDIT
package lex
var reservedKeywords = map[string]struct{}{
"all": {},
"analyse": {},
"analyze": {},
"and": {},
"annotate_type": {},
"any": {},
"array": {},
"as": {},
"asc": {},
"asymmetric": {},
"authorization": {},
"between": {},
"bigint": {},
"bit": {},
"boolean": {},
"both": {},
"box2d": {},
"bpchar": {},
"case": {},
"cast": {},
"char": {},
"character": {},
"characteristics": {},
"check": {},
"coalesce": {},
"cockroachdb_extra_reserved_keyword": {},
"collate": {},
"collation": {},
"column": {},
"concurrently": {},
"connect": {},
"constraint": {},
"create": {},
"cross": {},
"current_catalog": {},
"current_date": {},
"current_role": {},
"current_schema": {},
"current_time": {},
"current_timestamp": {},
"current_user": {},
"dec": {},
"decimal": {},
"default": {},
"deferrable": {},
"desc": {},
"describe": {},
"distinct": {},
"do": {},
"element": {},
"else": {},
"end": {},
"except": {},
"exists": {},
"extract": {},
"extract_duration": {},
"false": {},
"fetch": {},
"float": {},
"for": {},
"foreign": {},
"freeze": {},
"from": {},
"full": {},
"geography": {},
"geometry": {},
"grant": {},
"greatest": {},
"group": {},
"grouping": {},
"having": {},
"hint": {},
"if": {},
"iferror": {},
"ifnull": {},
"ilike": {},
"in": {},
"index": {},
"initially": {},
"inner": {},
"inout": {},
"int": {},
"integer": {},
"intersect": {},
"interval": {},
"into": {},
"is": {},
"iserror": {},
"isnull": {},
"join": {},
"lateral": {},
"leading": {},
"least": {},
"left": {},
"like": {},
"limit": {},
"localtime": {},
"localtimestamp": {},
"natural": {},
"none": {},
"not": {},
"nothing": {},
"notnull": {},
"null": {},
"nullif": {},
"numeric": {},
"offset": {},
"on": {},
"only": {},
"or": {},
"order": {},
"out": {},
"outer": {},
"overlaps": {},
"overlay": {},
"placing": {},
"point": {},
"polygon": {},
"position": {},
"precision": {},
"primary": {},
"real": {},
"references": {},
"returning": {},
"right": {},
"row": {},
"select": {},
"session_user": {},
"setof": {},
"similar": {},
"smallint": {},
"some": {},
"string": {},
"substring": {},
"symmetric": {},
"table": {},
"then": {},
"time": {},
"timestamp": {},
"timestamptz": {},
"timetz": {},
"to": {},
"trailing": {},
"treat": {},
"trim": {},
"true": {},
"union": {},
"unique": {},
"user": {},
"using": {},
"values": {},
"varbit": {},
"varchar": {},
"variadic": {},
"verbose": {},
"virtual": {},
"volatile": {},
"when": {},
"where": {},
"window": {},
"with": {},
"work": {},
"wrapper": {},
}
+701
View File
@@ -0,0 +1,701 @@
// GENERATED FILE DO NOT EDIT
package lex
const IDENT = 57346
const SCONST = 57347
const BCONST = 57348
const BITCONST = 57349
const ICONST = 57350
const FCONST = 57351
const PLACEHOLDER = 57352
const TYPECAST = 57353
const TYPEANNOTATE = 57354
const DOT_DOT = 57355
const LESS_EQUALS = 57356
const GREATER_EQUALS = 57357
const NOT_EQUALS = 57358
const NOT_REGMATCH = 57359
const REGIMATCH = 57360
const NOT_REGIMATCH = 57361
const TEXTSEARCHMATCH = 57362
const ERROR = 57363
const ABORT = 57364
const ACCESS = 57365
const ACTION = 57366
const ADD = 57367
const ADMIN = 57368
const AFTER = 57369
const AGGREGATE = 57370
const ALIGNMENT = 57371
const ALL = 57372
const ALLOW_CONNECTIONS = 57373
const ALTER = 57374
const ALWAYS = 57375
const ANALYSE = 57376
const ANALYZE = 57377
const AND = 57378
const AND_AND = 57379
const ANY = 57380
const ANNOTATE_TYPE = 57381
const ARRAY = 57382
const AS = 57383
const ASC = 57384
const ASSIGNMENT = 57385
const ASYMMETRIC = 57386
const AT = 57387
const ATOMIC = 57388
const ATTACH = 57389
const ATTRIBUTE = 57390
const AUTHORIZATION = 57391
const AUTO = 57392
const AUTOMATIC = 57393
const BACKUP = 57394
const BACKUPS = 57395
const BASETYPE = 57396
const BEFORE = 57397
const BEGIN = 57398
const BETWEEN = 57399
const BIGINT = 57400
const BIGSERIAL = 57401
const BINARY = 57402
const BIT = 57403
const FORMAT = 57404
const CSV = 57405
const HEADER = 57406
const BUCKET_COUNT = 57407
const BOOLEAN = 57408
const BOTH = 57409
const BOX2D = 57410
const BUFFER_USAGE_LIMIT = 57411
const BUNDLE = 57412
const BY = 57413
const BYPASSRLS = 57414
const CACHE = 57415
const CHAIN = 57416
const CALL = 57417
const CALLED = 57418
const CANCEL = 57419
const CANCELQUERY = 57420
const CANONICAL = 57421
const CASCADE = 57422
const CASCADED = 57423
const CASE = 57424
const CAST = 57425
const CATEGORY = 57426
const CBRT = 57427
const CHANGEFEED = 57428
const BPCHAR = 57429
const CHAR = 57430
const CHARACTER = 57431
const CHARACTERISTICS = 57432
const CHECK = 57433
const CHECK_OPTION = 57434
const CLASS = 57435
const CLOSE = 57436
const CLUSTER = 57437
const COALESCE = 57438
const COLLATABLE = 57439
const COLLATE = 57440
const COLLATION = 57441
const COLLATION_VERSION = 57442
const COLUMN = 57443
const COLUMNS = 57444
const COMBINEFUNC = 57445
const COMMENT = 57446
const COMMENTS = 57447
const BLOCK_COMMENT = 57448
const HINT = 57449
const COMMIT = 57450
const COMMITTED = 57451
const COMPACT = 57452
const COMPLETE = 57453
const COMPRESSION = 57454
const CONCAT = 57455
const CONCURRENTLY = 57456
const CONFIGURATION = 57457
const CONFIGURATIONS = 57458
const CONFIGURE = 57459
const CONFLICT = 57460
const CONNECT = 57461
const CONNECTION = 57462
const CONSTRAINT = 57463
const CONSTRAINTS = 57464
const CONTAINS = 57465
const CONTROLCHANGEFEED = 57466
const CONTROLJOB = 57467
const CONVERSION = 57468
const CONVERT = 57469
const COPY = 57470
const COST = 57471
const CREATE = 57472
const CREATEDB = 57473
const CREATELOGIN = 57474
const CREATEROLE = 57475
const CROSS = 57476
const CUBE = 57477
const CURRENT = 57478
const CURRENT_CATALOG = 57479
const CURRENT_DATE = 57480
const CURRENT_SCHEMA = 57481
const CURRENT_ROLE = 57482
const CURRENT_TIME = 57483
const CURRENT_TIMESTAMP = 57484
const CURRENT_USER = 57485
const CYCLE = 57486
const DATA = 57487
const DATABASE = 57488
const DATABASES = 57489
const DATE = 57490
const DAY = 57491
const DEALLOCATE = 57492
const DEC = 57493
const DECIMAL = 57494
const DECLARE = 57495
const DEFAULT = 57496
const DEFAULTS = 57497
const DEFERRABLE = 57498
const DEFERRED = 57499
const DEFINER = 57500
const DELETE = 57501
const DELIMITER = 57502
const DEPENDS = 57503
const DESC = 57504
const DESCRIBE = 57505
const DESERIALFUNC = 57506
const DESTINATION = 57507
const DETACH = 57508
const DETACHED = 57509
const DICTIONARY = 57510
const DISABLE = 57511
const DISABLE_PAGE_SKIPPING = 57512
const DISCARD = 57513
const DISTINCT = 57514
const DO = 57515
const DOMAIN = 57516
const DOUBLE = 57517
const DROP = 57518
const EACH = 57519
const ELEMENT = 57520
const ELSE = 57521
const ENABLE = 57522
const ENCODING = 57523
const ENCRYPTION_PASSPHRASE = 57524
const ENCRYPTED = 57525
const END = 57526
const ENUM = 57527
const ENUMS = 57528
const ESCAPE = 57529
const EVENT = 57530
const EXCEPT = 57531
const EXCLUDE = 57532
const EXCLUDING = 57533
const EXISTS = 57534
const EXECUTE = 57535
const EXECUTION = 57536
const EXPERIMENTAL = 57537
const EXPERIMENTAL_FINGERPRINTS = 57538
const EXPERIMENTAL_REPLICA = 57539
const EXPERIMENTAL_AUDIT = 57540
const EXPIRATION = 57541
const EXPLAIN = 57542
const EXPORT = 57543
const EXPRESSION = 57544
const EXTENDED = 57545
const EXTENSION = 57546
const EXTERNAL = 57547
const EXTRACT = 57548
const EXTRACT_DURATION = 57549
const FALSE = 57550
const FAMILY = 57551
const FETCH = 57552
const FETCHVAL = 57553
const FETCHTEXT = 57554
const FETCHVAL_PATH = 57555
const FETCHTEXT_PATH = 57556
const FILES = 57557
const FILTER = 57558
const FINALFUNC = 57559
const FINALFUNC_EXTRA = 57560
const FINALFUNC_MODIFY = 57561
const FINALIZE = 57562
const FIRST = 57563
const FLOAT = 57564
const FLOAT4 = 57565
const FLOAT8 = 57566
const FLOORDIV = 57567
const FOLLOWING = 57568
const FOR = 57569
const FORCE = 57570
const FORCE_INDEX = 57571
const FOREIGN = 57572
const FREEZE = 57573
const FROM = 57574
const FULL = 57575
const FUNCTION = 57576
const FUNCTIONS = 57577
const GENERATED = 57578
const GEOGRAPHY = 57579
const GEOMETRY = 57580
const GEOMETRYM = 57581
const GEOMETRYZ = 57582
const GEOMETRYZM = 57583
const GEOMETRYCOLLECTION = 57584
const GEOMETRYCOLLECTIONM = 57585
const GEOMETRYCOLLECTIONZ = 57586
const GEOMETRYCOLLECTIONZM = 57587
const GLOBAL = 57588
const GRANT = 57589
const GRANTED = 57590
const GRANTS = 57591
const GREATEST = 57592
const GROUP = 57593
const GROUPING = 57594
const GROUPS = 57595
const HANDLER = 57596
const HASH = 57597
const HAVING = 57598
const HIGH = 57599
const HISTOGRAM = 57600
const HOUR = 57601
const HYPOTHETICAL = 57602
const ICU_LOCALE = 57603
const ICU_RULES = 57604
const IDENTITY = 57605
const IF = 57606
const IFERROR = 57607
const IFNULL = 57608
const IGNORE_FOREIGN_KEYS = 57609
const ILIKE = 57610
const IMMEDIATE = 57611
const IMPLICIT = 57612
const IMMUTABLE = 57613
const IMPORT = 57614
const IN = 57615
const INCLUDE = 57616
const INCLUDING = 57617
const INCREMENT = 57618
const INCREMENTAL = 57619
const INET = 57620
const INET_CONTAINED_BY_OR_EQUALS = 57621
const INET_CONTAINS_OR_EQUALS = 57622
const INDEX = 57623
const INDEX_CLEANUP = 57624
const INDEXES = 57625
const INHERIT = 57626
const INHERITS = 57627
const INITCOND = 57628
const INJECT = 57629
const INLINE = 57630
const INPUT = 57631
const INTERLEAVE = 57632
const INITIALLY = 57633
const INNER = 57634
const INOUT = 57635
const INSERT = 57636
const INSTEAD = 57637
const INT = 57638
const INTEGER = 57639
const INTERNALLENGTH = 57640
const INTERSECT = 57641
const INTERVAL = 57642
const INTO = 57643
const INTO_DB = 57644
const INVERTED = 57645
const INVOKER = 57646
const IS = 57647
const ISERROR = 57648
const ISNULL = 57649
const ISOLATION = 57650
const IS_TEMPLATE = 57651
const JOB = 57652
const JOBS = 57653
const JOIN = 57654
const JSON = 57655
const JSONB = 57656
const JSON_SOME_EXISTS = 57657
const JSON_ALL_EXISTS = 57658
const KEY = 57659
const KEYS = 57660
const KMS = 57661
const KV = 57662
const LANGUAGE = 57663
const LARGE = 57664
const LAST = 57665
const LATERAL = 57666
const LATEST = 57667
const LC_CTYPE = 57668
const LC_COLLATE = 57669
const LEADING = 57670
const LEAKPROOF = 57671
const LEASE = 57672
const LEAST = 57673
const LEFT = 57674
const LESS = 57675
const LEVEL = 57676
const LIKE = 57677
const LIMIT = 57678
const LINESTRING = 57679
const LINESTRINGM = 57680
const LINESTRINGZ = 57681
const LINESTRINGZM = 57682
const LIST = 57683
const LOCAL = 57684
const LOCALE = 57685
const LOCALE_PROVIDER = 57686
const LOCALTIME = 57687
const LOCALTIMESTAMP = 57688
const LOCKED = 57689
const LOGGED = 57690
const LOGIN = 57691
const LOOKUP = 57692
const LOW = 57693
const LSHIFT = 57694
const MAIN = 57695
const MATCH = 57696
const MATERIALIZED = 57697
const MAXVALUE = 57698
const MERGE = 57699
const METHOD = 57700
const MFINALFUNC = 57701
const MFINALFUNC_EXTRA = 57702
const MFINALFUNC_MODIFY = 57703
const MINITCOND = 57704
const MINUTE = 57705
const MINVALUE = 57706
const MINVFUNC = 57707
const MODIFYCLUSTERSETTING = 57708
const MODULUS = 57709
const MONTH = 57710
const MSFUNC = 57711
const MSPACE = 57712
const MSSPACE = 57713
const MSTYPE = 57714
const MULTILINESTRING = 57715
const MULTILINESTRINGM = 57716
const MULTILINESTRINGZ = 57717
const MULTILINESTRINGZM = 57718
const MULTIPOINT = 57719
const MULTIPOINTM = 57720
const MULTIPOINTZ = 57721
const MULTIPOINTZM = 57722
const MULTIPOLYGON = 57723
const MULTIPOLYGONM = 57724
const MULTIPOLYGONZ = 57725
const MULTIPOLYGONZM = 57726
const MULTIRANGE_TYPE_NAME = 57727
const NAN = 57728
const NAME = 57729
const NAMES = 57730
const NATURAL = 57731
const NEVER = 57732
const NEW = 57733
const NEXT = 57734
const NO = 57735
const NOCANCELQUERY = 57736
const NOCONTROLCHANGEFEED = 57737
const NOCONTROLJOB = 57738
const NOBYPASSRLS = 57739
const NOCREATEDB = 57740
const NOCREATELOGIN = 57741
const NOCREATEROLE = 57742
const NOINHERIT = 57743
const NOLOGIN = 57744
const NOMODIFYCLUSTERSETTING = 57745
const NOREPLICATION = 57746
const NOSUPERUSER = 57747
const NO_INDEX_JOIN = 57748
const NONE = 57749
const NORMAL = 57750
const NOT = 57751
const NOTHING = 57752
const NOTNULL = 57753
const NOVIEWACTIVITY = 57754
const NOWAIT = 57755
const NULL = 57756
const NULLIF = 57757
const NULLS = 57758
const NUMERIC = 57759
const YES = 57760
const OBJECT = 57761
const OF = 57762
const OFF = 57763
const OFFSET = 57764
const OID = 57765
const OIDS = 57766
const OIDVECTOR = 57767
const OLD = 57768
const ON = 57769
const ONLY = 57770
const ONLY_DATABASE_STATS = 57771
const OPT = 57772
const OPTION = 57773
const OPTIONS = 57774
const OR = 57775
const ORDER = 57776
const ORDINALITY = 57777
const OTHERS = 57778
const OUT = 57779
const OUTER = 57780
const OUTPUT = 57781
const OVER = 57782
const OVERLAPS = 57783
const OVERLAY = 57784
const OWNED = 57785
const OWNER = 57786
const OPERATOR = 57787
const PARALLEL = 57788
const PARAMETER = 57789
const PARENT = 57790
const PARSER = 57791
const PARTIAL = 57792
const PARTITION = 57793
const PARTITIONS = 57794
const PASSEDBYVALUE = 57795
const PASSWORD = 57796
const PAUSE = 57797
const PAUSED = 57798
const PHYSICAL = 57799
const PLACING = 57800
const PLAIN = 57801
const PLAN = 57802
const PLANS = 57803
const POINT = 57804
const POINTM = 57805
const POINTZ = 57806
const POINTZM = 57807
const POLICY = 57808
const POLYGON = 57809
const POLYGONM = 57810
const POLYGONZ = 57811
const POLYGONZM = 57812
const POSITION = 57813
const PRECEDING = 57814
const PRECISION = 57815
const PREFERRED = 57816
const PREPARE = 57817
const PRESERVE = 57818
const PRIMARY = 57819
const PRIORITY = 57820
const PRIVILEGES = 57821
const PROCEDURAL = 57822
const PROCEDURE = 57823
const PROCEDURES = 57824
const PROCESS_MAIN = 57825
const PROCESS_TOAST = 57826
const PUBLIC = 57827
const PUBLICATION = 57828
const QUERIES = 57829
const QUERY = 57830
const RANGE = 57831
const RANGES = 57832
const READ = 57833
const READ_ONLY = 57834
const READ_WRITE = 57835
const REAL = 57836
const RECEIVE = 57837
const RECURSIVE = 57838
const RECURRING = 57839
const REF = 57840
const REFERENCES = 57841
const REFERENCING = 57842
const REFRESH = 57843
const REGCLASS = 57844
const REGPROC = 57845
const REGPROCEDURE = 57846
const REGNAMESPACE = 57847
const REGTYPE = 57848
const REINDEX = 57849
const RELEASE = 57850
const REMAINDER = 57851
const REMOVE_PATH = 57852
const RENAME = 57853
const REPEATABLE = 57854
const REPLACE = 57855
const REPLICA = 57856
const REPLICATION = 57857
const RESET = 57858
const RESTART = 57859
const RESTORE = 57860
const RESTRICT = 57861
const RESTRICTED = 57862
const RESUME = 57863
const RETRY = 57864
const RETURN = 57865
const RETURNING = 57866
const RETURNS = 57867
const REVISION_HISTORY = 57868
const REVOKE = 57869
const RIGHT = 57870
const ROLE = 57871
const ROLES = 57872
const ROUTINE = 57873
const ROUTINES = 57874
const ROLLBACK = 57875
const ROLLUP = 57876
const ROW = 57877
const ROWS = 57878
const RSHIFT = 57879
const RULE = 57880
const RUNNING = 57881
const SAFE = 57882
const SAVEPOINT = 57883
const SCATTER = 57884
const SCHEDULE = 57885
const SCHEDULES = 57886
const SCHEMA = 57887
const SCHEMAS = 57888
const SCRUB = 57889
const SEARCH = 57890
const SECOND = 57891
const SECURITY = 57892
const SECURITY_BARRIER = 57893
const SECURITY_INVOKER = 57894
const SEED = 57895
const SELECT = 57896
const SEND = 57897
const SERIALFUNC = 57898
const SERIALIZABLE = 57899
const SERVER = 57900
const SESSION = 57901
const SESSIONS = 57902
const SESSION_USER = 57903
const SET = 57904
const SETOF = 57905
const SETTING = 57906
const SETTINGS = 57907
const SEQUENCE = 57908
const SEQUENCES = 57909
const SFUNC = 57910
const SHARE = 57911
const SHAREABLE = 57912
const SHOW = 57913
const SIMILAR = 57914
const SIMPLE = 57915
const SKIP = 57916
const SKIP_LOCKED = 57917
const SKIP_DATABASE_STATS = 57918
const SKIP_MISSING_FOREIGN_KEYS = 57919
const SKIP_MISSING_SEQUENCES = 57920
const SKIP_MISSING_SEQUENCE_OWNERS = 57921
const SKIP_MISSING_VIEWS = 57922
const SMALLINT = 57923
const SMALLSERIAL = 57924
const SNAPSHOT = 57925
const SOME = 57926
const SORTOP = 57927
const SPLIT = 57928
const SQL = 57929
const SQRT = 57930
const SSPACE = 57931
const STABLE = 57932
const START = 57933
const STATEMENT = 57934
const STATISTICS = 57935
const STATUS = 57936
const STDIN = 57937
const STRATEGY = 57938
const STRICT = 57939
const STRING = 57940
const STORAGE = 57941
const STORE = 57942
const STORED = 57943
const STYPE = 57944
const SUBSCRIPT = 57945
const SUBSCRIPTION = 57946
const SUBSTRING = 57947
const SUBTYPE = 57948
const SUBTYPE_DIFF = 57949
const SUBTYPE_OPCLASS = 57950
const SUPERUSER = 57951
const SUPPORT = 57952
const SYMMETRIC = 57953
const SYNTAX = 57954
const SYSID = 57955
const SYSTEM = 57956
const TABLE = 57957
const TABLES = 57958
const TABLESPACE = 57959
const TEMP = 57960
const TEMPLATE = 57961
const TEMPORARY = 57962
const TEXT = 57963
const THEN = 57964
const TIES = 57965
const TIME = 57966
const TIMETZ = 57967
const TIMESTAMP = 57968
const TIMESTAMPTZ = 57969
const TO = 57970
const THROTTLING = 57971
const TRAILING = 57972
const TRACE = 57973
const TRACING = 57974
const TRANSACTION = 57975
const TRANSACTIONS = 57976
const TRANSFORM = 57977
const TREAT = 57978
const TRIGGER = 57979
const TRIM = 57980
const TRUE = 57981
const TRUNCATE = 57982
const TRUSTED = 57983
const TYPE = 57984
const TYPES = 57985
const TYPMOD_IN = 57986
const TYPMOD_OUT = 57987
const UNBOUNDED = 57988
const UNCOMMITTED = 57989
const UNION = 57990
const UNIQUE = 57991
const UNKNOWN = 57992
const UNLOGGED = 57993
const UNSAFE = 57994
const UNSPLIT = 57995
const UPDATE = 57996
const UPSERT = 57997
const UNTIL = 57998
const USAGE = 57999
const USE = 58000
const USER = 58001
const USERS = 58002
const USING = 58003
const UUID = 58004
const VACUUM = 58005
const VALID = 58006
const VALIDATE = 58007
const VALIDATOR = 58008
const VALUE = 58009
const VALUES = 58010
const VERBOSE = 58011
const VARBIT = 58012
const VARCHAR = 58013
const VARIABLE = 58014
const VARIADIC = 58015
const VARYING = 58016
const VERSION = 58017
const VIEW = 58018
const VIEWACTIVITY = 58019
const VIRTUAL = 58020
const VOLATILE = 58021
const WHEN = 58022
const WHERE = 58023
const WINDOW = 58024
const WITH = 58025
const WITHIN = 58026
const WITHOUT = 58027
const WORK = 58028
const WRAPPER = 58029
const WRITE = 58030
const XML = 58031
const YAML = 58032
const YEAR = 58033
const ZONE = 58034
const NOT_LA = 58035
const WITH_LA = 58036
const AS_LA = 58037
const GENERATED_ALWAYS = 58038
const CONTAINED_BY = 58039
const POSTFIXOP = 58040
const UMINUS = 58041
const HELPTOKEN = 58042
-5
View File
@@ -1,7 +1,2 @@
# These are specific to this directory
helpmap_test.go
help_messages.go
sql.go
y.output
gen
File diff suppressed because it is too large Load Diff
+41088
View File
File diff suppressed because it is too large Load Diff
+11 -1
View File
@@ -72,8 +72,18 @@ for tuple in $OS_ARCH_TUPLES; do
cp -r ./licenses "$o/licenses"
cp LICENSE "$o/licenses"
bin="doltgres"
tags="icu_static"
if [ "$os" = windows ]; then
bin="$bin.exe"
tags="$tags,pg_extension_embed"
for f in postgres.exe pg_extension.dll; do
if [ ! -f "core/extensions/pg_extension/output/$f" ]; then
echo "ERROR: core/extensions/pg_extension/output/$f is missing." >&2
echo "It is built by core/extensions/pg_extension/library/build_library.sh on a Windows host," >&2
echo "and is required by the pg_extension_embed build tag." >&2
exit 1
fi
done
fi
echo Building "$o/bin/$bin"
CGO_ENABLED=1 \
@@ -85,7 +95,7 @@ for tuple in $OS_ARCH_TUPLES; do
CGO_LDFLAGS="${platform_cgo_ldflags[${tuple}]}" \
go build -buildvcs=false -trimpath \
-ldflags="${platform_go_ldflags[${tuple}]}" \
-tags icu_static -o "$o/bin/$bin" \
-tags "$tags" -o "$o/bin/$bin" \
./cmd/doltgres
if [ "$os" = windows ]; then
(cd out && 7z a "doltgresql-$os-$arch.zip" "doltgresql-$os-$arch" && 7z a "doltgresql-$os-$arch.7z" "doltgresql-$os-$arch")