forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpgsql.stub.php
1006 lines (851 loc) · 26.8 KB
/
pgsql.stub.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/** @generate-class-entries */
namespace {
/* libpq version */
/**
* @var string
* @cvalue pgsql_libpq_version
*/
const PGSQL_LIBPQ_VERSION = UNKNOWN;
/**
* @var string
* @cvalue pgsql_libpq_version
* @deprecated
*/
const PGSQL_LIBPQ_VERSION_STR = UNKNOWN;
/* For connection option */
/**
* @var int
* @cvalue PGSQL_CONNECT_FORCE_NEW
*/
const PGSQL_CONNECT_FORCE_NEW = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_CONNECT_ASYNC
*/
const PGSQL_CONNECT_ASYNC = UNKNOWN;
/* For pg_fetch_array() */
/**
* @var int
* @cvalue PGSQL_ASSOC
*/
const PGSQL_ASSOC = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_NUM
*/
const PGSQL_NUM = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_BOTH
*/
const PGSQL_BOTH = UNKNOWN;
/* For pg_last_notice() */
/**
* @var int
* @cvalue PGSQL_NOTICE_LAST
*/
const PGSQL_NOTICE_LAST = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_NOTICE_ALL
*/
const PGSQL_NOTICE_ALL = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_NOTICE_CLEAR
*/
const PGSQL_NOTICE_CLEAR = UNKNOWN;
/* For pg_connection_status() */
/**
* @var int
* @cvalue CONNECTION_BAD
*/
const PGSQL_CONNECTION_BAD = UNKNOWN;
/**
* @var int
* @cvalue CONNECTION_OK
*/
const PGSQL_CONNECTION_OK = UNKNOWN;
/**
* @var int
* @cvalue CONNECTION_STARTED
*/
const PGSQL_CONNECTION_STARTED = UNKNOWN;
/**
* @var int
* @cvalue CONNECTION_MADE
*/
const PGSQL_CONNECTION_MADE = UNKNOWN;
/**
* @var int
* @cvalue CONNECTION_AWAITING_RESPONSE
*/
const PGSQL_CONNECTION_AWAITING_RESPONSE = UNKNOWN;
/**
* @var int
* @cvalue CONNECTION_AUTH_OK
*/
const PGSQL_CONNECTION_AUTH_OK = UNKNOWN;
#ifdef CONNECTION_SSL_STARTUP
/**
* @var int
* @cvalue CONNECTION_SSL_STARTUP
*/
const PGSQL_CONNECTION_SSL_STARTUP = UNKNOWN;
#endif
/**
* @var int
* @cvalue CONNECTION_SETENV
*/
const PGSQL_CONNECTION_SETENV = UNKNOWN;
/* For pg_connect_poll() */
/**
* @var int
* @cvalue PGRES_POLLING_FAILED
*/
const PGSQL_POLLING_FAILED = UNKNOWN;
/**
* @var int
* @cvalue PGRES_POLLING_READING
*/
const PGSQL_POLLING_READING = UNKNOWN;
/**
* @var int
* @cvalue PGRES_POLLING_WRITING
*/
const PGSQL_POLLING_WRITING = UNKNOWN;
/**
* @var int
* @cvalue PGRES_POLLING_OK
*/
const PGSQL_POLLING_OK = UNKNOWN;
/**
* @var int
* @cvalue PGRES_POLLING_ACTIVE
*/
const PGSQL_POLLING_ACTIVE = UNKNOWN;
/* For pg_transaction_status() */
/**
* @var int
* @cvalue PQTRANS_IDLE
*/
const PGSQL_TRANSACTION_IDLE = UNKNOWN;
/**
* @var int
* @cvalue PQTRANS_ACTIVE
*/
const PGSQL_TRANSACTION_ACTIVE = UNKNOWN;
/**
* @var int
* @cvalue PQTRANS_INTRANS
*/
const PGSQL_TRANSACTION_INTRANS = UNKNOWN;
/**
* @var int
* @cvalue PQTRANS_INERROR
*/
const PGSQL_TRANSACTION_INERROR = UNKNOWN;
/**
* @var int
* @cvalue PQTRANS_UNKNOWN
*/
const PGSQL_TRANSACTION_UNKNOWN = UNKNOWN;
/* For pg_set_error_verbosity() */
/**
* @var int
* @cvalue PQERRORS_TERSE
*/
const PGSQL_ERRORS_TERSE = UNKNOWN;
/**
* @var int
* @cvalue PQERRORS_DEFAULT
*/
const PGSQL_ERRORS_DEFAULT = UNKNOWN;
/**
* @var int
* @cvalue PQERRORS_VERBOSE
*/
const PGSQL_ERRORS_VERBOSE = UNKNOWN;
#ifdef HAVE_PQERRORS_SQLSTATE
/**
* @var int
* @cvalue PQERRORS_SQLSTATE
*/
const PGSQL_ERRORS_SQLSTATE = UNKNOWN;
#else
/**
* @var int
* @cvalue PQERRORS_TERSE
*/
const PGSQL_ERRORS_SQLSTATE = UNKNOWN;
#endif
/* For lo_seek() */
/**
* @var int
* @cvalue SEEK_SET
*/
const PGSQL_SEEK_SET = UNKNOWN;
/**
* @var int
* @cvalue SEEK_CUR
*/
const PGSQL_SEEK_CUR = UNKNOWN;
/**
* @var int
* @cvalue SEEK_END
*/
const PGSQL_SEEK_END = UNKNOWN;
/* For pg_result_status() return value type */
/**
* @var int
* @cvalue PGSQL_STATUS_LONG
*/
const PGSQL_STATUS_LONG = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_STATUS_STRING
*/
const PGSQL_STATUS_STRING = UNKNOWN;
/* For pg_result_status() return value */
/**
* @var int
* @cvalue PGRES_EMPTY_QUERY
*/
const PGSQL_EMPTY_QUERY = UNKNOWN;
/**
* @var int
* @cvalue PGRES_COMMAND_OK
*/
const PGSQL_COMMAND_OK = UNKNOWN;
/**
* @var int
* @cvalue PGRES_TUPLES_OK
*/
const PGSQL_TUPLES_OK = UNKNOWN;
#ifdef HAVE_PG_SET_CHUNKED_ROWS_SIZE
/**
* @var int
* @cvalue PGRES_TUPLES_CHUNK
*/
const PGSQL_TUPLES_CHUNK = UNKNOWN;
#endif
/**
* @var int
* @cvalue PGRES_COPY_OUT
*/
const PGSQL_COPY_OUT = UNKNOWN;
/**
* @var int
* @cvalue PGRES_COPY_IN
*/
const PGSQL_COPY_IN = UNKNOWN;
/**
* @var int
* @cvalue PGRES_BAD_RESPONSE
*/
const PGSQL_BAD_RESPONSE = UNKNOWN;
/**
* @var int
* @cvalue PGRES_NONFATAL_ERROR
*/
const PGSQL_NONFATAL_ERROR = UNKNOWN;
/**
* @var int
* @cvalue PGRES_FATAL_ERROR
*/
const PGSQL_FATAL_ERROR = UNKNOWN;
/* For pg_result_error_field() field codes */
/**
* @var int
* @cvalue PG_DIAG_SEVERITY
*/
const PGSQL_DIAG_SEVERITY = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_SQLSTATE
*/
const PGSQL_DIAG_SQLSTATE = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_MESSAGE_PRIMARY
*/
const PGSQL_DIAG_MESSAGE_PRIMARY = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_MESSAGE_DETAIL
*/
const PGSQL_DIAG_MESSAGE_DETAIL = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_MESSAGE_HINT
*/
const PGSQL_DIAG_MESSAGE_HINT = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_STATEMENT_POSITION
*/
const PGSQL_DIAG_STATEMENT_POSITION = UNKNOWN;
#ifdef PG_DIAG_INTERNAL_POSITION
/**
* @var int
* @cvalue PG_DIAG_INTERNAL_POSITION
*/
const PGSQL_DIAG_INTERNAL_POSITION = UNKNOWN;
#endif
#ifdef PG_DIAG_INTERNAL_QUERY
/**
* @var int
* @cvalue PG_DIAG_INTERNAL_QUERY
*/
const PGSQL_DIAG_INTERNAL_QUERY = UNKNOWN;
#endif
/**
* @var int
* @cvalue PG_DIAG_CONTEXT
*/
const PGSQL_DIAG_CONTEXT = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_SOURCE_FILE
*/
const PGSQL_DIAG_SOURCE_FILE = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_SOURCE_LINE
*/
const PGSQL_DIAG_SOURCE_LINE = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_SOURCE_FUNCTION
*/
const PGSQL_DIAG_SOURCE_FUNCTION = UNKNOWN;
#ifdef PG_DIAG_SCHEMA_NAME
/**
* @var int
* @cvalue PG_DIAG_SCHEMA_NAME
*/
const PGSQL_DIAG_SCHEMA_NAME = UNKNOWN;
#endif
#ifdef PG_DIAG_TABLE_NAME
/**
* @var int
* @cvalue PG_DIAG_TABLE_NAME
*/
const PGSQL_DIAG_TABLE_NAME = UNKNOWN;
#endif
#ifdef PG_DIAG_COLUMN_NAME
/**
* @var int
* @cvalue PG_DIAG_COLUMN_NAME
*/
const PGSQL_DIAG_COLUMN_NAME = UNKNOWN;
#endif
#ifdef PG_DIAG_DATATYPE_NAME
/**
* @var int
* @cvalue PG_DIAG_DATATYPE_NAME
*/
const PGSQL_DIAG_DATATYPE_NAME = UNKNOWN;
#endif
#ifdef PG_DIAG_CONSTRAINT_NAME
/**
* @var int
* @cvalue PG_DIAG_CONSTRAINT_NAME
*/
const PGSQL_DIAG_CONSTRAINT_NAME = UNKNOWN;
#endif
#ifdef PG_DIAG_SEVERITY_NONLOCALIZED
/**
* @var int
* @cvalue PG_DIAG_SEVERITY_NONLOCALIZED
*/
const PGSQL_DIAG_SEVERITY_NONLOCALIZED = UNKNOWN;
#endif
/* pg_convert options */
/**
* @var int
* @cvalue PGSQL_CONV_IGNORE_DEFAULT
*/
const PGSQL_CONV_IGNORE_DEFAULT = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_CONV_FORCE_NULL
*/
const PGSQL_CONV_FORCE_NULL = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_CONV_IGNORE_NOT_NULL
*/
const PGSQL_CONV_IGNORE_NOT_NULL = UNKNOWN;
/* pg_insert/update/delete/select options */
/**
* @var int
* @cvalue PGSQL_DML_ESCAPE
*/
const PGSQL_DML_ESCAPE = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_DML_NO_CONV
*/
const PGSQL_DML_NO_CONV = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_DML_EXEC
*/
const PGSQL_DML_EXEC = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_DML_ASYNC
*/
const PGSQL_DML_ASYNC = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_DML_STRING
*/
const PGSQL_DML_STRING = UNKNOWN;
#ifdef PQTRACE_SUPPPRESS_TIMESTAMPS
/**
* @var int
* @cvalue PQTRACE_SUPPRESS_TIMESTAMPS
*/
const PGSQL_TRACE_SUPPRESS_TIMESTAMPS = UNKNOWN;
#endif
#ifdef PQTRACE_REGRESS_MODE
/**
* @var int
* @cvalue PQTRACE_REGRESS_MODE
*/
const PGSQL_TRACE_REGRESS_MODE = UNKNOWN;
#endif
/* For pg_set_error_context_visibility() */
/**
* @var int
* @cvalue PQSHOW_CONTEXT_NEVER
*/
const PGSQL_SHOW_CONTEXT_NEVER = UNKNOWN;
/**
* @var int
* @cvalue PQSHOW_CONTEXT_ERRORS
*/
const PGSQL_SHOW_CONTEXT_ERRORS = UNKNOWN;
/**
* @var int
* @cvalue PQSHOW_CONTEXT_ALWAYS
*/
const PGSQL_SHOW_CONTEXT_ALWAYS = UNKNOWN;
function pg_connect(string $connection_string, int $flags = 0): PgSql\Connection|false {}
function pg_pconnect(string $connection_string, int $flags = 0): PgSql\Connection|false {}
function pg_connect_poll(PgSql\Connection $connection): int {}
function pg_close(?PgSql\Connection $connection = null): true {}
/** @refcount 1 */
function pg_dbname(?PgSql\Connection $connection = null): string {}
function pg_last_error(?PgSql\Connection $connection = null): string {}
/**
* @alias pg_last_error
*/
#[\Deprecated(since: '8.0', message: 'use pg_last_error() instead')]
function pg_errormessage(?PgSql\Connection $connection = null): string {}
/** @refcount 1 */
function pg_options(?PgSql\Connection $connection = null): string {}
/** @refcount 1 */
function pg_port(?PgSql\Connection $connection = null): string {}
/** @refcount 1 */
function pg_tty(?PgSql\Connection $connection = null): string {}
/** @refcount 1 */
function pg_host(?PgSql\Connection $connection = null): string {}
/**
* @return array<string, int|string|null>
* @refcount 1
*/
function pg_version(?PgSql\Connection $connection = null): array {}
/**
* @return array<string, string|null>
* @refcount 1
*/
function pg_jit(?PgSql\Connection $connection = null): array {}
#ifdef HAVE_PG_SERVICE
function pg_service(?PgSql\Connection $connection = null): string {}
#endif
/**
* @param PgSql\Connection|string $connection
* @refcount 1
*/
function pg_parameter_status($connection, string $name = UNKNOWN): string|false {}
function pg_ping(?PgSql\Connection $connection = null): bool {}
/**
* @param PgSql\Connection|string $connection
* @refcount 1
*/
function pg_query($connection, string $query = UNKNOWN): PgSql\Result|false {}
/**
* @param PgSql\Connection|string $connection
* @alias pg_query
*/
function pg_exec($connection, string $query = UNKNOWN): PgSql\Result|false {}
/**
* @param PgSql\Connection|string $connection
* @param string|array $query
* @refcount 1
*/
function pg_query_params($connection, $query, array $params = UNKNOWN): PgSql\Result|false {}
/**
* @param PgSql\Connection|string $connection
* @refcount 1
*/
function pg_prepare($connection, string $statement_name, string $query = UNKNOWN): PgSql\Result|false {}
/**
* @param PgSql\Connection|string $connection
* @param string|array $statement_name
* @refcount 1
*/
function pg_execute($connection, $statement_name, array $params = UNKNOWN): PgSql\Result|false {}
function pg_num_rows(PgSql\Result $result): int {}
/**
* @alias pg_num_rows
*/
#[\Deprecated(since: '8.0', message: 'use pg_num_rows() instead')]
function pg_numrows(PgSql\Result $result): int {}
function pg_num_fields(PgSql\Result $result): int {}
/**
* @alias pg_num_fields
*/
#[\Deprecated(since: '8.0', message: 'use pg_num_fields() instead')]
function pg_numfields(PgSql\Result $result): int {}
function pg_affected_rows(PgSql\Result $result): int {}
/**
* @alias pg_affected_rows
*/
#[\Deprecated(since: '8.0', message: 'use pg_affected_rows() instead')]
function pg_cmdtuples(PgSql\Result $result): int {}
function pg_last_notice(PgSql\Connection $connection, int $mode = PGSQL_NOTICE_LAST): array|string|bool {}
function pg_field_table(PgSql\Result $result, int $field, bool $oid_only = false): string|int|false {}
/** @refcount 1 */
function pg_field_name(PgSql\Result $result, int $field): string {}
/**
* @alias pg_field_name
*/
#[\Deprecated(since: '8.0', message: 'use pg_field_name() instead')]
function pg_fieldname(PgSql\Result $result, int $field): string {}
function pg_field_size(PgSql\Result $result, int $field): int {}
/**
* @alias pg_field_size
*/
#[\Deprecated(since: '8.0', message: 'use pg_field_size() instead')]
function pg_fieldsize(PgSql\Result $result, int $field): int {}
function pg_field_type(PgSql\Result $result, int $field): string {}
/**
* @alias pg_field_type
*/
#[\Deprecated(since: '8.0', message: 'use pg_field_type() instead')]
function pg_fieldtype(PgSql\Result $result, int $field): string {}
/** @refcount 1 */
function pg_field_type_oid(PgSql\Result $result, int $field): string|int {}
function pg_field_num(PgSql\Result $result, string $field): int {}
/**
* @alias pg_field_num
*/
#[\Deprecated(since: '8.0', message: 'use pg_field_num() instead')]
function pg_fieldnum(PgSql\Result $result, string $field): int {}
/**
* @param string|int|null $row
* @refcount 1
*/
function pg_fetch_result(PgSql\Result $result, $row, string|int $field = UNKNOWN): string|false|null {}
/**
* @param string|int $row
* @alias pg_fetch_result
*/
#[\Deprecated(since: '8.0', message: 'use pg_fetch_result() instead')]
function pg_result(PgSql\Result $result, $row, string|int $field = UNKNOWN): string|false|null {}
/**
* @return array<int|string, string|null>|false
* @refcount 1
*/
function pg_fetch_row(PgSql\Result $result, ?int $row = null, int $mode = PGSQL_NUM): array|false {}
/**
* @return array<int|string, string|null>|false
* @refcount 1
*/
function pg_fetch_assoc(PgSql\Result $result, ?int $row = null): array|false {}
/**
* @return array<int|string, string|null>|false
* @refcount 1
*/
function pg_fetch_array(PgSql\Result $result, ?int $row = null, int $mode = PGSQL_BOTH): array|false {}
/** @refcount 1 */
function pg_fetch_object(PgSql\Result $result, ?int $row = null, string $class = "stdClass", array $constructor_args = []): object|false {}
/**
* @return array<int, array>
* @refcount 1
*/
function pg_fetch_all(PgSql\Result $result, int $mode = PGSQL_ASSOC): array {}
/**
* @return array<int, string|null>
* @refcount 1
*/
function pg_fetch_all_columns(PgSql\Result $result, int $field = 0): array {}
function pg_result_seek(PgSql\Result $result, int $row): bool {}
/** @param string|int|null $row */
function pg_field_prtlen(PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false {}
/**
* @param string|int $row
*/
#[\Deprecated(since: '8.0', message: 'use pg_field_prtlen() instead')]
function pg_fieldprtlen(PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false {}
/** @param string|int|null $row */
function pg_field_is_null(PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false {}
/**
* @param string|int $row
*/
#[\Deprecated(since: '8.0', message: 'use pg_field_is_null() instead')]
function pg_fieldisnull(PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false {}
function pg_free_result(PgSql\Result $result): bool {}
/**
* @alias pg_free_result
*/
#[\Deprecated(since: '8.0', message: 'use pg_free_result() instead')]
function pg_freeresult(PgSql\Result $result): bool {}
/** @refcount 1 */
function pg_last_oid(PgSql\Result $result): string|int|false {}
/**
* @alias pg_last_oid
*/
#[\Deprecated(since: '8.0', message: 'use pg_last_oid() instead')]
function pg_getlastoid(PgSql\Result $result): string|int|false {}
function pg_trace(string $filename, string $mode = "w", ?PgSql\Connection $connection = null, int $trace_mode = 0): bool {}
function pg_untrace(?PgSql\Connection $connection = null): true {}
/**
* @param PgSql\Connection $connection
* @param string|int $oid
* @refcount 1
*/
function pg_lo_create($connection = UNKNOWN, $oid = UNKNOWN): string|int|false {}
/**
* @param PgSql\Connection $connection
* @param string|int $oid
* @alias pg_lo_create
*/
#[\Deprecated(since: '8.0', message: 'use pg_lo_create() instead')]
function pg_locreate($connection = UNKNOWN, $oid = UNKNOWN): string|int|false {}
/**
* @param PgSql\Connection $connection
* @param string|int $oid
*/
function pg_lo_unlink($connection, $oid = UNKNOWN): bool {}
/**
* @param PgSql\Connection $connection
* @param string|int $oid
* @alias pg_lo_unlink
*/
#[\Deprecated(since: '8.0', message: 'use pg_lo_unlink() instead')]
function pg_lounlink($connection, $oid = UNKNOWN): bool {}
/**
* @param PgSql\Connection $connection
* @param string|int $oid
* @refcount 1
*/
function pg_lo_open($connection, $oid = UNKNOWN, string $mode = UNKNOWN): PgSql\Lob|false {}
/**
* @param PgSql\Connection $connection
* @param string|int $oid
* @alias pg_lo_open
*/
#[\Deprecated(since: '8.0', message: 'use pg_lo_open() instead')]
function pg_loopen($connection, $oid = UNKNOWN, string $mode = UNKNOWN): PgSql\Lob|false {}
function pg_lo_close(PgSql\Lob $lob): bool {}
/**
* @alias pg_lo_close
*/
#[\Deprecated(since: '8.0', message: 'use pg_lo_close() instead')]
function pg_loclose(PgSql\Lob $lob): bool {}
/** @refcount 1 */
function pg_lo_read(PgSql\Lob $lob, int $length = 8192): string|false {}
/**
* @alias pg_lo_read
*/
#[\Deprecated(since: '8.0', message: 'use pg_lo_read() instead')]
function pg_loread(PgSql\Lob $lob, int $length = 8192): string|false {}
function pg_lo_write(PgSql\Lob $lob, string $data, ?int $length = null): int|false {}
/**
* @alias pg_lo_write
*/
#[\Deprecated(since: '8.0', message: 'use pg_lo_write() instead')]
function pg_lowrite(PgSql\Lob $lob, string $data, ?int $length = null): int|false {}
function pg_lo_read_all(PgSql\Lob $lob): int {}
/**
* @alias pg_lo_read_all
*/
#[\Deprecated(since: '8.0', message: 'use pg_lo_read_all() instead')]
function pg_loreadall(PgSql\Lob $lob): int {}
/**
* @param PgSql\Connection|string $connection
* @param string|int $filename
* @param string|int $oid
* @refcount 1
*/
function pg_lo_import($connection, $filename = UNKNOWN, $oid = UNKNOWN): string|int|false {}
/**
* @param PgSql\Connection|string $connection
* @param string|int $filename
* @param string|int $oid
* @alias pg_lo_import
*/
#[\Deprecated(since: '8.0', message: 'use pg_lo_import() instead')]
function pg_loimport($connection, $filename = UNKNOWN, $oid = UNKNOWN): string|int|false {}
/**
* @param PgSql\Connection|string|int $connection
* @param string|int $oid
* @param string|int $filename
*/
function pg_lo_export($connection, $oid = UNKNOWN, $filename = UNKNOWN): bool {}
/**
* @param PgSql\Connection|string|int $connection
* @param string|int $oid
* @param string|int $filename
* @alias pg_lo_export
*/
#[\Deprecated(since: '8.0', message: 'use pg_lo_export() instead')]
function pg_loexport($connection, $oid = UNKNOWN, $filename = UNKNOWN): bool {}
function pg_lo_seek(PgSql\Lob $lob, int $offset, int $whence = SEEK_CUR): bool {}
function pg_lo_tell(PgSql\Lob $lob): int {}
function pg_lo_truncate(PgSql\Lob $lob, int $size): bool {}
/** @param PgSql\Connection|int $connection */
function pg_set_error_verbosity($connection, int $verbosity = UNKNOWN): int|false {}
/** @param PgSql\Connection|string $connection */
function pg_set_client_encoding($connection, string $encoding = UNKNOWN): int {}
/**
* @param PgSql\Connection|string $connection
* @alias pg_set_client_encoding
*/
#[\Deprecated(since: '8.0', message: 'use pg_set_client_encoding() instead')]
function pg_setclientencoding($connection, string $encoding = UNKNOWN): int {}
function pg_client_encoding(?PgSql\Connection $connection = null): string {}
/**
* @alias pg_client_encoding
*/
#[\Deprecated(since: '8.0', message: 'use pg_client_encoding() instead')]
function pg_clientencoding(?PgSql\Connection $connection = null): string {}
function pg_end_copy(?PgSql\Connection $connection = null): bool {}
/** @param PgSql\Connection|string $connection */
function pg_put_line($connection, string $query = UNKNOWN): bool {}
/**
* @return array<int, string>|false
* @refcount 1
*/
function pg_copy_to(PgSql\Connection $connection, string $table_name, string $separator = "\t", string $null_as = "\\\\N"): array|false {}
function pg_copy_from(PgSql\Connection $connection, string $table_name, array|Traversable $rows, string $separator = "\t", string $null_as = "\\\\N"): bool {}
/**
* @param PgSql\Connection|string $connection
* @refcount 1
*/
function pg_escape_string($connection, string $string = UNKNOWN): string {}
/**
* @param PgSql\Connection|string $connection
* @refcount 1
*/
function pg_escape_bytea($connection, string $string = UNKNOWN): string {}
/** @refcount 1 */
function pg_unescape_bytea(string $string): string {}
/**
* @param PgSql\Connection|string $connection
* @refcount 1
*/
function pg_escape_literal($connection, string $string = UNKNOWN): string|false {}
/**
* @param PgSql\Connection|string $connection
* @refcount 1
*/
function pg_escape_identifier($connection, string $string = UNKNOWN): string|false {}
/** @refcount 1 */
function pg_result_error(PgSql\Result $result): string|false {}
/** @refcount 1 */
function pg_result_error_field(PgSql\Result $result, int $field_code): string|false|null {}
function pg_connection_status(PgSql\Connection $connection): int {}
function pg_transaction_status(PgSql\Connection $connection): int {}
function pg_connection_reset(PgSql\Connection $connection): bool {}
function pg_cancel_query(PgSql\Connection $connection): bool {}
function pg_connection_busy(PgSql\Connection $connection): bool {}
function pg_send_query(PgSql\Connection $connection, string $query): int|bool {}
function pg_send_query_params(PgSql\Connection $connection, string $query, array $params): int|bool {}
function pg_send_prepare(PgSql\Connection $connection, string $statement_name, string $query): int|bool {}
function pg_send_execute(PgSql\Connection $connection, string $statement_name, array $params): int|bool {}
/** @refcount 1 */
function pg_get_result(PgSql\Connection $connection): PgSql\Result|false {}
/** @refcount 1 */
function pg_result_status(PgSql\Result $result, int $mode = PGSQL_STATUS_LONG): string|int {}
/**
* @return array<int|string, int|string>
* @refcount 1
*/
function pg_get_notify(PgSql\Connection $connection, int $mode = PGSQL_ASSOC): array|false {}
function pg_get_pid(PgSql\Connection $connection): int {}
/**
* @return resource|false
* @refcount 1
*/
function pg_socket(PgSql\Connection $connection) {}
function pg_consume_input(PgSql\Connection $connection): bool {}
function pg_flush(PgSql\Connection $connection): int|bool {}
/**
* @return array<string, array>|false
* @refcount 1
*/
function pg_meta_data(PgSql\Connection $connection, string $table_name, bool $extended = false): array|false {}
/**
* @return array<string, mixed>|false
* @refcount 1
*/
function pg_convert(PgSql\Connection $connection, string $table_name, array $values, int $flags = 0): array|false {}
/** @refcount 1 */
function pg_insert(PgSql\Connection $connection, string $table_name, array $values, int $flags = PGSQL_DML_EXEC): PgSql\Result|string|bool {}
/** @refcount 1 */
function pg_update(PgSql\Connection $connection, string $table_name, array $values, array $conditions, int $flags = PGSQL_DML_EXEC): string|bool {}
/** @refcount 1 */
function pg_delete(PgSql\Connection $connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC): string|bool {}
/**
* @return array<int, array>|string|false
* @refcount 1
*/
function pg_select(PgSql\Connection $connection, string $table_name, array $conditions = [], int $flags = PGSQL_DML_EXEC, int $mode = PGSQL_ASSOC): array|string|false {}
function pg_set_error_context_visibility(PgSql\Connection $connection, int $visibility): int {}
#ifdef HAVE_PG_RESULT_MEMORY_SIZE
function pg_result_memory_size(PgSql\Result $result): int {}
#endif
function pg_change_password(PgSql\Connection $connection, string $user, #[\SensitiveParameter] string $password): bool {}
function pg_put_copy_data(PgSql\Connection $connection, string $cmd): int {}
function pg_put_copy_end(PgSql\Connection $connection, ?string $error = null): int {}
/**
* @param resource $socket
*/
function pg_socket_poll($socket, int $read, int $write, int $timeout = -1): int {}
#ifdef HAVE_PG_SET_CHUNKED_ROWS_SIZE
function pg_set_chunked_rows_size(PgSql\Connection $connection, int $size): bool {}
#endif
#ifdef HAVE_PG_CLOSE_STMT
function pg_close_stmt(Pgsql\Connection $connection, string $statement_name): PgSql\Result|false {}
#endif
}
namespace PgSql {
/**
* @strict-properties
* @not-serializable
*/
final class Connection
{
}
/**
* @strict-properties
* @not-serializable
*/
final class Result
{
}
/**
* @strict-properties
* @not-serializable