CVS log for pgsql/contrib/dblink/dblink.c

[BACK] Up to [PostgreSQL CVS Repository] / pgsql / contrib / dblink

Request diff between arbitrary revisions - Display revisions graphically


Keyword substitution: kv
Default branch: MAIN


Revision 1.99: download - view: text, markup, annotated - select for diffs
Tue Jul 6 19:18:54 2010 UTC (15 years ago) by momjian
Branches: MAIN
CVS tags: REL9_1_ALPHA1, REL9_0_STABLE, REL9_0_RC1, REL9_0_BETA4, REL9_0_BETA3, REL9_0_0, HEAD
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +10 -10 lines
pgindent run for 9.0, second run

Revision 1.98: download - view: text, markup, annotated - select for diffs
Tue Jun 15 20:29:01 2010 UTC (15 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +27 -5 lines
Change the interpretation of the primary_key_attnums parameter of
dblink_build_sql_insert() and related functions.  Now the column numbers
are treated as logical not physical column numbers.  This will provide saner
behavior in the presence of dropped columns; furthermore, if we ever get
around to allowing rearrangement of logical column ordering, the original
definition would become nearly untenable from a usability standpoint.
Per recent discussion of dblink's handling of dropped columns.
Not back-patched for fear of breaking existing applications.

Revision 1.25.4.12: download - view: text, markup, annotated - select for diffs
Tue Jun 15 19:04:59 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL7_4_STABLE
Diff to: previous 1.25.4.11: preferred, colored; branchpoint 1.25: preferred, colored; next MAIN 1.26: preferred, colored
Changes since revision 1.25.4.11: +36 -38 lines
Fix dblink_build_sql_insert() and related functions to handle dropped
columns correctly.  In passing, get rid of some dead logic in the
underlying get_sql_insert() etc functions --- there is no caller that
will pass null value-arrays to them.

Per bug report from Robert Voinea.

Revision 1.38.4.10: download - view: text, markup, annotated - select for diffs
Tue Jun 15 19:04:51 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_0_STABLE
Diff to: previous 1.38.4.9: preferred, colored; branchpoint 1.38: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38.4.9: +36 -38 lines
Fix dblink_build_sql_insert() and related functions to handle dropped
columns correctly.  In passing, get rid of some dead logic in the
underlying get_sql_insert() etc functions --- there is no caller that
will pass null value-arrays to them.

Per bug report from Robert Voinea.

Revision 1.48.2.11: download - view: text, markup, annotated - select for diffs
Tue Jun 15 19:04:45 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_1_STABLE
Diff to: previous 1.48.2.10: preferred, colored; branchpoint 1.48: preferred, colored; next MAIN 1.49: preferred, colored
Changes since revision 1.48.2.10: +36 -38 lines
Fix dblink_build_sql_insert() and related functions to handle dropped
columns correctly.  In passing, get rid of some dead logic in the
underlying get_sql_insert() etc functions --- there is no caller that
will pass null value-arrays to them.

Per bug report from Robert Voinea.

Revision 1.60.2.10: download - view: text, markup, annotated - select for diffs
Tue Jun 15 19:04:34 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_2_STABLE
Diff to: previous 1.60.2.9: preferred, colored; branchpoint 1.60: preferred, colored; next MAIN 1.61: preferred, colored
Changes since revision 1.60.2.9: +38 -32 lines
Fix dblink_build_sql_insert() and related functions to handle dropped
columns correctly.  In passing, get rid of some dead logic in the
underlying get_sql_insert() etc functions --- there is no caller that
will pass null value-arrays to them.

Per bug report from Robert Voinea.

Revision 1.69.2.8: download - view: text, markup, annotated - select for diffs
Tue Jun 15 19:04:28 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_3_STABLE
Diff to: previous 1.69.2.7: preferred, colored; branchpoint 1.69: preferred, colored; next MAIN 1.70: preferred, colored
Changes since revision 1.69.2.7: +38 -32 lines
Fix dblink_build_sql_insert() and related functions to handle dropped
columns correctly.  In passing, get rid of some dead logic in the
underlying get_sql_insert() etc functions --- there is no caller that
will pass null value-arrays to them.

Per bug report from Robert Voinea.

Revision 1.82.2.8: download - view: text, markup, annotated - select for diffs
Tue Jun 15 19:04:22 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_4_STABLE
Diff to: previous 1.82.2.7: preferred, colored; branchpoint 1.82: preferred, colored; next MAIN 1.83: preferred, colored
Changes since revision 1.82.2.7: +38 -32 lines
Fix dblink_build_sql_insert() and related functions to handle dropped
columns correctly.  In passing, get rid of some dead logic in the
underlying get_sql_insert() etc functions --- there is no caller that
will pass null value-arrays to them.

Per bug report from Robert Voinea.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Tue Jun 15 19:04:15 2010 UTC (15 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +38 -32 lines
Fix dblink_build_sql_insert() and related functions to handle dropped
columns correctly.  In passing, get rid of some dead logic in the
underlying get_sql_insert() etc functions --- there is no caller that
will pass null value-arrays to them.

Per bug report from Robert Voinea.

Revision 1.25.4.11: download - view: text, markup, annotated - select for diffs
Tue Jun 15 16:22:58 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL7_4_STABLE
Diff to: previous 1.25.4.10: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.4.10: +90 -123 lines
Consolidate and improve checking of key-column-attnum arguments for
dblink_build_sql_insert() and related functions.  In particular, be sure to
reject references to dropped and out-of-range column numbers.  The numbers
are still interpreted as physical column numbers, though, for backward
compatibility.

This patch replaces Joe's patch of 2010-02-03, which handled only some aspects
of the problem.

Revision 1.38.4.9: download - view: text, markup, annotated - select for diffs
Tue Jun 15 16:22:51 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_0_STABLE
Diff to: previous 1.38.4.8: preferred, colored; branchpoint 1.38: preferred, colored
Changes since revision 1.38.4.8: +90 -123 lines
Consolidate and improve checking of key-column-attnum arguments for
dblink_build_sql_insert() and related functions.  In particular, be sure to
reject references to dropped and out-of-range column numbers.  The numbers
are still interpreted as physical column numbers, though, for backward
compatibility.

This patch replaces Joe's patch of 2010-02-03, which handled only some aspects
of the problem.

Revision 1.48.2.10: download - view: text, markup, annotated - select for diffs
Tue Jun 15 16:22:45 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_1_STABLE
Diff to: previous 1.48.2.9: preferred, colored; branchpoint 1.48: preferred, colored
Changes since revision 1.48.2.9: +94 -123 lines
Consolidate and improve checking of key-column-attnum arguments for
dblink_build_sql_insert() and related functions.  In particular, be sure to
reject references to dropped and out-of-range column numbers.  The numbers
are still interpreted as physical column numbers, though, for backward
compatibility.

This patch replaces Joe's patch of 2010-02-03, which handled only some aspects
of the problem.

Revision 1.60.2.9: download - view: text, markup, annotated - select for diffs
Tue Jun 15 16:22:39 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_2_STABLE
Diff to: previous 1.60.2.8: preferred, colored; branchpoint 1.60: preferred, colored
Changes since revision 1.60.2.8: +89 -118 lines
Consolidate and improve checking of key-column-attnum arguments for
dblink_build_sql_insert() and related functions.  In particular, be sure to
reject references to dropped and out-of-range column numbers.  The numbers
are still interpreted as physical column numbers, though, for backward
compatibility.

This patch replaces Joe's patch of 2010-02-03, which handled only some aspects
of the problem.

Revision 1.69.2.7: download - view: text, markup, annotated - select for diffs
Tue Jun 15 16:22:33 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_3_STABLE
Diff to: previous 1.69.2.6: preferred, colored; branchpoint 1.69: preferred, colored
Changes since revision 1.69.2.6: +89 -118 lines
Consolidate and improve checking of key-column-attnum arguments for
dblink_build_sql_insert() and related functions.  In particular, be sure to
reject references to dropped and out-of-range column numbers.  The numbers
are still interpreted as physical column numbers, though, for backward
compatibility.

This patch replaces Joe's patch of 2010-02-03, which handled only some aspects
of the problem.

Revision 1.82.2.7: download - view: text, markup, annotated - select for diffs
Tue Jun 15 16:22:26 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_4_STABLE
Diff to: previous 1.82.2.6: preferred, colored; branchpoint 1.82: preferred, colored
Changes since revision 1.82.2.6: +89 -118 lines
Consolidate and improve checking of key-column-attnum arguments for
dblink_build_sql_insert() and related functions.  In particular, be sure to
reject references to dropped and out-of-range column numbers.  The numbers
are still interpreted as physical column numbers, though, for backward
compatibility.

This patch replaces Joe's patch of 2010-02-03, which handled only some aspects
of the problem.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Tue Jun 15 16:22:19 2010 UTC (15 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +89 -118 lines
Consolidate and improve checking of key-column-attnum arguments for
dblink_build_sql_insert() and related functions.  In particular, be sure to
reject references to dropped and out-of-range column numbers.  The numbers
are still interpreted as physical column numbers, though, for backward
compatibility.

This patch replaces Joe's patch of 2010-02-03, which handled only some aspects
of the problem.

Revision 1.25.4.10: download - view: text, markup, annotated - select for diffs
Mon Jun 14 20:50:11 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL7_4_STABLE
Diff to: previous 1.25.4.9: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.4.9: +87 -122 lines
Rearrange dblink's dblink_build_sql_insert() and related routines to open and
lock the target relation just once per SQL function call.  The original coding
obtained and released lock several times per call.  Aside from saving a
not-insignificant number of cycles, this eliminates possible race conditions
if someone tries to modify the relation's schema concurrently.  Also
centralize locking and permission-checking logic.

Problem noted while investigating a trouble report from Robert Voinea --- his
problem is still to be fixed, though.

Revision 1.38.4.8: download - view: text, markup, annotated - select for diffs
Mon Jun 14 20:50:04 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_0_STABLE
Diff to: previous 1.38.4.7: preferred, colored; branchpoint 1.38: preferred, colored
Changes since revision 1.38.4.7: +86 -122 lines
Rearrange dblink's dblink_build_sql_insert() and related routines to open and
lock the target relation just once per SQL function call.  The original coding
obtained and released lock several times per call.  Aside from saving a
not-insignificant number of cycles, this eliminates possible race conditions
if someone tries to modify the relation's schema concurrently.  Also
centralize locking and permission-checking logic.

Problem noted while investigating a trouble report from Robert Voinea --- his
problem is still to be fixed, though.

Revision 1.48.2.9: download - view: text, markup, annotated - select for diffs
Mon Jun 14 20:49:57 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_1_STABLE
Diff to: previous 1.48.2.8: preferred, colored; branchpoint 1.48: preferred, colored
Changes since revision 1.48.2.8: +85 -121 lines
Rearrange dblink's dblink_build_sql_insert() and related routines to open and
lock the target relation just once per SQL function call.  The original coding
obtained and released lock several times per call.  Aside from saving a
not-insignificant number of cycles, this eliminates possible race conditions
if someone tries to modify the relation's schema concurrently.  Also
centralize locking and permission-checking logic.

Problem noted while investigating a trouble report from Robert Voinea --- his
problem is still to be fixed, though.

Revision 1.60.2.8: download - view: text, markup, annotated - select for diffs
Mon Jun 14 20:49:51 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_2_STABLE
Diff to: previous 1.60.2.7: preferred, colored; branchpoint 1.60: preferred, colored
Changes since revision 1.60.2.7: +86 -122 lines
Rearrange dblink's dblink_build_sql_insert() and related routines to open and
lock the target relation just once per SQL function call.  The original coding
obtained and released lock several times per call.  Aside from saving a
not-insignificant number of cycles, this eliminates possible race conditions
if someone tries to modify the relation's schema concurrently.  Also
centralize locking and permission-checking logic.

Problem noted while investigating a trouble report from Robert Voinea --- his
problem is still to be fixed, though.

Revision 1.69.2.6: download - view: text, markup, annotated - select for diffs
Mon Jun 14 20:49:46 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_3_STABLE
Diff to: previous 1.69.2.5: preferred, colored; branchpoint 1.69: preferred, colored
Changes since revision 1.69.2.5: +83 -128 lines
Rearrange dblink's dblink_build_sql_insert() and related routines to open and
lock the target relation just once per SQL function call.  The original coding
obtained and released lock several times per call.  Aside from saving a
not-insignificant number of cycles, this eliminates possible race conditions
if someone tries to modify the relation's schema concurrently.  Also
centralize locking and permission-checking logic.

Problem noted while investigating a trouble report from Robert Voinea --- his
problem is still to be fixed, though.

Revision 1.82.2.6: download - view: text, markup, annotated - select for diffs
Mon Jun 14 20:49:39 2010 UTC (15 years, 1 month ago) by tgl
Branches: REL8_4_STABLE
Diff to: previous 1.82.2.5: preferred, colored; branchpoint 1.82: preferred, colored
Changes since revision 1.82.2.5: +83 -128 lines
Rearrange dblink's dblink_build_sql_insert() and related routines to open and
lock the target relation just once per SQL function call.  The original coding
obtained and released lock several times per call.  Aside from saving a
not-insignificant number of cycles, this eliminates possible race conditions
if someone tries to modify the relation's schema concurrently.  Also
centralize locking and permission-checking logic.

Problem noted while investigating a trouble report from Robert Voinea --- his
problem is still to be fixed, though.

Revision 1.95: download - view: text, markup, annotated - select for diffs
Mon Jun 14 20:49:33 2010 UTC (15 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +83 -126 lines
Rearrange dblink's dblink_build_sql_insert() and related routines to open and
lock the target relation just once per SQL function call.  The original coding
obtained and released lock several times per call.  Aside from saving a
not-insignificant number of cycles, this eliminates possible race conditions
if someone tries to modify the relation's schema concurrently.  Also
centralize locking and permission-checking logic.

Problem noted while investigating a trouble report from Robert Voinea --- his
problem is still to be fixed, though.

Revision 1.25.4.9: download - view: text, markup, annotated - select for diffs
Thu Jun 10 00:42:34 2010 UTC (15 years, 1 month ago) by itagaki
Branches: REL7_4_STABLE
Diff to: previous 1.25.4.8: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.4.8: +2 -2 lines
Fix incorrect change in dblink introduced by the previous commit
"Fix connection leak in dblink".

Revision 1.38.4.7: download - view: text, markup, annotated - select for diffs
Thu Jun 10 00:41:23 2010 UTC (15 years, 1 month ago) by itagaki
Branches: REL8_0_STABLE
Diff to: previous 1.38.4.6: preferred, colored; branchpoint 1.38: preferred, colored
Changes since revision 1.38.4.6: +2 -2 lines
Fix incorrect change in dblink introduced by the previous commit
"Fix connection leak in dblink".

Revision 1.82.2.5: download - view: text, markup, annotated - select for diffs
Wed Jun 9 03:40:16 2010 UTC (15 years, 1 month ago) by itagaki
Branches: REL8_4_STABLE
Diff to: previous 1.82.2.4: preferred, colored; branchpoint 1.82: preferred, colored
Changes since revision 1.82.2.4: +2 -2 lines
Avoid "identifier will be truncated" warning in dblink
when connection string is longer than NAMEDATALEN.
The previous fix for long connection name broke the behavior.

Revision 1.94: download - view: text, markup, annotated - select for diffs
Wed Jun 9 03:39:26 2010 UTC (15 years, 1 month ago) by itagaki
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +2 -2 lines
Avoid "identifier will be truncated" warning in dblink
when connection string is longer than NAMEDATALEN.
The previous fix for long connection name broke the behavior.

Revision 1.25.4.8: download - view: text, markup, annotated - select for diffs
Wed Jun 9 01:00:50 2010 UTC (15 years, 1 month ago) by itagaki
Branches: REL7_4_STABLE
Diff to: previous 1.25.4.7: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.4.7: +5 -0 lines
Fix connection leak in dblink when dblink_connect() or dblink_connect_u()
end with "duplicate connection name" errors.

Backported to release 7.4.

Revision 1.38.4.6: download - view: text, markup, annotated - select for diffs
Wed Jun 9 01:00:32 2010 UTC (15 years, 1 month ago) by itagaki
Branches: REL8_0_STABLE
Diff to: previous 1.38.4.5: preferred, colored; branchpoint 1.38: preferred, colored
Changes since revision 1.38.4.5: +5 -0 lines
Fix connection leak in dblink when dblink_connect() or dblink_connect_u()
end with "duplicate connection name" errors.

Backported to release 7.4.

Revision 1.48.2.8: download - view: text, markup, annotated - select for diffs
Wed Jun 9 01:00:13 2010 UTC (15 years, 1 month ago) by itagaki
Branches: REL8_1_STABLE
Diff to: previous 1.48.2.7: preferred, colored; branchpoint 1.48: preferred, colored
Changes since revision 1.48.2.7: +5 -0 lines
Fix connection leak in dblink when dblink_connect() or dblink_connect_u()
end with "duplicate connection name" errors.

Backported to release 7.4.

Revision 1.60.2.7: download - view: text, markup, annotated - select for diffs
Wed Jun 9 00:59:54 2010 UTC (15 years, 1 month ago) by itagaki
Branches: REL8_2_STABLE
Diff to: previous 1.60.2.6: preferred, colored; branchpoint 1.60: preferred, colored
Changes since revision 1.60.2.6: +6 -1 lines
Fix connection leak in dblink when dblink_connect() or dblink_connect_u()
end with "duplicate connection name" errors.

Backported to release 7.4.

Revision 1.69.2.5: download - view: text, markup, annotated - select for diffs
Wed Jun 9 00:59:35 2010 UTC (15 years, 1 month ago) by itagaki
Branches: REL8_3_STABLE
Diff to: previous 1.69.2.4: preferred, colored; branchpoint 1.69: preferred, colored
Changes since revision 1.69.2.4: +6 -1 lines
Fix connection leak in dblink when dblink_connect() or dblink_connect_u()
end with "duplicate connection name" errors.

Backported to release 7.4.

Revision 1.82.2.4: download - view: text, markup, annotated - select for diffs
Wed Jun 9 00:56:25 2010 UTC (15 years, 1 month ago) by itagaki
Branches: REL8_4_STABLE
Diff to: previous 1.82.2.3: preferred, colored; branchpoint 1.82: preferred, colored
Changes since revision 1.82.2.3: +6 -1 lines
Fix connection leak in dblink when dblink_connect() or dblink_connect_u()
end with "duplicate connection name" errors.

Backported to release 7.4.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Wed Jun 9 00:56:02 2010 UTC (15 years, 1 month ago) by itagaki
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +6 -1 lines
Fix connection leak in dblink when dblink_connect() or dblink_connect_u()
end with "duplicate connection name" errors.

Backported to release 7.4.

Revision 1.38.4.5: download - view: text, markup, annotated - select for diffs
Thu Jun 3 09:45:47 2010 UTC (15 years, 1 month ago) by itagaki
Branches: REL8_0_STABLE
Diff to: previous 1.38.4.4: preferred, colored; branchpoint 1.38: preferred, colored
Changes since revision 1.38.4.4: +10 -10 lines
Fix dblink to treat connection names longer than NAMEDATALEN-2 (62 bytes).
Now long names are adjusted with truncate_identifier() and NOTICE messages
are raised if names are actually truncated.

Backported to release 8.0.

Revision 1.48.2.7: download - view: text, markup, annotated - select for diffs
Thu Jun 3 09:44:35 2010 UTC (15 years, 1 month ago) by itagaki
Branches: REL8_1_STABLE
Diff to: previous 1.48.2.6: preferred, colored; branchpoint 1.48: preferred, colored
Changes since revision 1.48.2.6: +10 -10 lines
Fix dblink to treat connection names longer than NAMEDATALEN-2 (62 bytes).
Now long names are adjusted with truncate_identifier() and NOTICE messages
are raised if names are actually truncated.

Backported to release 8.0.

Revision 1.60.2.6: download - view: text, markup, annotated - select for diffs
Thu Jun 3 09:43:04 2010 UTC (15 years, 1 month ago) by itagaki
Branches: REL8_2_STABLE
Diff to: previous 1.60.2.5: preferred, colored; branchpoint 1.60: preferred, colored
Changes since revision 1.60.2.5: +11 -11 lines
Fix dblink to treat connection names longer than NAMEDATALEN-2 (62 bytes).
Now long names are adjusted with truncate_identifier() and NOTICE messages
are raised if names are actually truncated.

Backported to release 8.0.

Revision 1.69.2.4: download - view: text, markup, annotated - select for diffs
Thu Jun 3 09:41:26 2010 UTC (15 years, 1 month ago) by itagaki
Branches: REL8_3_STABLE
Diff to: previous 1.69.2.3: preferred, colored; branchpoint 1.69: preferred, colored
Changes since revision 1.69.2.3: +11 -11 lines
Fix dblink to treat connection names longer than NAMEDATALEN-2 (62 bytes).
Now long names are adjusted with truncate_identifier() and NOTICE messages
are raised if names are actually truncated.

Backported to release 8.0.

Revision 1.82.2.3: download - view: text, markup, annotated - select for diffs
Thu Jun 3 09:40:17 2010 UTC (15 years, 1 month ago) by itagaki
Branches: REL8_4_STABLE
Diff to: previous 1.82.2.2: preferred, colored; branchpoint 1.82: preferred, colored
Changes since revision 1.82.2.2: +15 -13 lines
Fix dblink to treat connection names longer than NAMEDATALEN-2 (62 bytes).
Now long names are adjusted with truncate_identifier() and NOTICE messages
are raised if names are actually truncated.

Backported to release 8.0.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Thu Jun 3 09:38:33 2010 UTC (15 years, 1 month ago) by itagaki
Branches: MAIN
CVS tags: REL9_0_BETA2
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +15 -13 lines
Fix dblink to treat connection names longer than NAMEDATALEN-2 (62 bytes).
Now long names are adjusted with truncate_identifier() and NOTICE messages
are raised if names are actually truncated.

Backported to release 8.0.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Fri Feb 26 02:00:32 2010 UTC (15 years, 5 months ago) by momjian
Branches: MAIN
CVS tags: REL9_0_BETA1, REL9_0_ALPHA5_BRANCH, REL9_0_ALPHA5
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +50 -51 lines
pgindent run for 9.0

Revision 1.90: download - view: text, markup, annotated - select for diffs
Wed Feb 24 05:20:49 2010 UTC (15 years, 5 months ago) by itagaki
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +1 -12 lines
Remove useless codes to initialize TupleDesc from dblink_exec.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Sun Feb 14 18:42:11 2010 UTC (15 years, 5 months ago) by rhaas
Branches: MAIN
CVS tags: REL9_0_ALPHA4_BRANCH, REL9_0_ALPHA4
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +2 -4 lines
Wrap calls to SearchSysCache and related functions using macros.

The purpose of this change is to eliminate the need for every caller
of SearchSysCache, SearchSysCacheCopy, SearchSysCacheExists,
GetSysCacheOid, and SearchSysCacheList to know the maximum number
of allowable keys for a syscache entry (currently 4).  This will
make it far easier to increase the maximum number of keys in a
future release should we choose to do so, and it makes the code
shorter, too.

Design and review by Tom Lane.

Revision 1.15.2.7: download - view: text, markup, annotated - select for diffs
Wed Feb 3 23:02:39 2010 UTC (15 years, 5 months ago) by joe
Branches: REL7_3_STABLE
Diff to: previous 1.15.2.6: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15.2.6: +52 -0 lines
Check to ensure the number of primary key fields supplied does not
exceed the total number of non-dropped source table fields for
dblink_build_sql_*(). Addresses bug report from Rushabh Lathia.

Backpatch all the way to the 7.3 branch.

Revision 1.25.4.7: download - view: text, markup, annotated - select for diffs
Wed Feb 3 23:02:27 2010 UTC (15 years, 5 months ago) by joe
Branches: REL7_4_STABLE
CVS tags: REL7_4_29, REL7_4_28
Diff to: previous 1.25.4.6: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.4.6: +55 -0 lines
Check to ensure the number of primary key fields supplied does not
exceed the total number of non-dropped source table fields for
dblink_build_sql_*(). Addresses bug report from Rushabh Lathia.

Backpatch all the way to the 7.3 branch.

Revision 1.38.4.4: download - view: text, markup, annotated - select for diffs
Wed Feb 3 23:02:16 2010 UTC (15 years, 5 months ago) by joe
Branches: REL8_0_STABLE
CVS tags: REL8_0_25, REL8_0_24
Diff to: previous 1.38.4.3: preferred, colored; branchpoint 1.38: preferred, colored
Changes since revision 1.38.4.3: +55 -0 lines
Check to ensure the number of primary key fields supplied does not
exceed the total number of non-dropped source table fields for
dblink_build_sql_*(). Addresses bug report from Rushabh Lathia.

Backpatch all the way to the 7.3 branch.

Revision 1.48.2.6: download - view: text, markup, annotated - select for diffs
Wed Feb 3 23:02:07 2010 UTC (15 years, 5 months ago) by joe
Branches: REL8_1_STABLE
CVS tags: REL8_1_21, REL8_1_20
Diff to: previous 1.48.2.5: preferred, colored; branchpoint 1.48: preferred, colored
Changes since revision 1.48.2.5: +56 -0 lines
Check to ensure the number of primary key fields supplied does not
exceed the total number of non-dropped source table fields for
dblink_build_sql_*(). Addresses bug report from Rushabh Lathia.

Backpatch all the way to the 7.3 branch.

Revision 1.60.2.5: download - view: text, markup, annotated - select for diffs
Wed Feb 3 23:01:47 2010 UTC (15 years, 5 months ago) by joe
Branches: REL8_2_STABLE
CVS tags: REL8_2_17, REL8_2_16
Diff to: previous 1.60.2.4: preferred, colored; branchpoint 1.60: preferred, colored
Changes since revision 1.60.2.4: +57 -1 lines
Check to ensure the number of primary key fields supplied does not
exceed the total number of non-dropped source table fields for
dblink_build_sql_*(). Addresses bug report from Rushabh Lathia.

Backpatch all the way to the 7.3 branch.

Revision 1.69.2.3: download - view: text, markup, annotated - select for diffs
Wed Feb 3 23:01:34 2010 UTC (15 years, 5 months ago) by joe
Branches: REL8_3_STABLE
CVS tags: REL8_3_11, REL8_3_10
Diff to: previous 1.69.2.2: preferred, colored; branchpoint 1.69: preferred, colored
Changes since revision 1.69.2.2: +57 -1 lines
Check to ensure the number of primary key fields supplied does not
exceed the total number of non-dropped source table fields for
dblink_build_sql_*(). Addresses bug report from Rushabh Lathia.

Backpatch all the way to the 7.3 branch.

Revision 1.82.2.2: download - view: text, markup, annotated - select for diffs
Wed Feb 3 23:01:23 2010 UTC (15 years, 5 months ago) by joe
Branches: REL8_4_STABLE
CVS tags: REL8_4_4, REL8_4_3
Diff to: previous 1.82.2.1: preferred, colored; branchpoint 1.82: preferred, colored
Changes since revision 1.82.2.1: +57 -1 lines
Check to ensure the number of primary key fields supplied does not
exceed the total number of non-dropped source table fields for
dblink_build_sql_*(). Addresses bug report from Rushabh Lathia.

Backpatch all the way to the 7.3 branch.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Wed Feb 3 23:01:11 2010 UTC (15 years, 5 months ago) by joe
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +57 -1 lines
Check to ensure the number of primary key fields supplied does not
exceed the total number of non-dropped source table fields for
dblink_build_sql_*(). Addresses bug report from Rushabh Lathia.

Backpatch all the way to the 7.3 branch.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Sun Jan 24 22:19:38 2010 UTC (15 years, 6 months ago) by joe
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +233 -338 lines
Rewrite dblink_record_internal() and dblink_fetch() to use a tuplestore
(SFRM_Materialize mode) to return tuples. Since we don't return from the
dblink function in tuplestore mode, release the PGresult with a PG_CATCH
block on error. Also rearrange to share the same code to materialize the
tuplestore. Patch by Takahiro Itagaki.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Sat Jan 2 16:57:32 2010 UTC (15 years, 6 months ago) by momjian
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +2 -2 lines
Update copyright for the year 2010.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Tue Dec 29 17:40:59 2009 UTC (15 years, 7 months ago) by heikki
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +1 -4 lines
Previous fix for temporary file management broke returning a set from
PL/pgSQL function within an exception handler. Make sure we use the right
resource owner when we create the tuplestore to hold returned tuples.

Simplify tuplestore API so that the caller doesn't need to be in the right
memory context when calling tuplestore_put* functions. tuplestore.c
automatically switches to the memory context used when the tuplestore was
created. Tuplesort was already modified like this earlier. This patch also
removes the now useless MemoryContextSwitch calls from callers.

Report by Aleksei on pgsql-bugs on Dec 22 2009. Backpatch to 8.1, like
the previous patch that broke this.

Revision 1.82.2.1: download - view: text, markup, annotated - select for diffs
Sat Sep 12 23:21:13 2009 UTC (15 years, 10 months ago) by joe
Branches: REL8_4_STABLE
CVS tags: REL8_4_2
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +2 -2 lines
plug dblink resource leak

dblink generates orphaned connections when called with a connection string,
fail_on_error = true, and an ERROR occurs. Discovery and patch by
Tatsuhito Kasahara. Introduced in 8.4.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Sat Sep 12 23:20:52 2009 UTC (15 years, 10 months ago) by joe
Branches: MAIN
CVS tags: REL8_5_ALPHA3_BRANCH, REL8_5_ALPHA3, REL8_5_ALPHA2_BRANCH, REL8_5_ALPHA2
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +2 -2 lines
plug dblink resource leak

dblink generates orphaned connections when called with a connection string,
fail_on_error = true, and an ERROR occurs. Discovery and patch by
Tatsuhito Kasahara. Introduced in 8.4.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Wed Aug 5 16:11:07 2009 UTC (15 years, 11 months ago) by joe
Branches: MAIN
CVS tags: REL8_5_ALPHA1_BRANCH, REL8_5_ALPHA1
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +84 -1 lines
Implement  dblink_get_notify().

Adds the ability to retrieve async notifications using dblink,
via the addition of the function dblink_get_notify(). Original patch
by Marcus Kempe, suggestions by Tom Lane and Alvaro Herrera, patch
review and adjustments by Joe Conway.

Revision 1.82: download - view: text, markup, annotated - select for diffs
Thu Jun 11 14:48:50 2009 UTC (16 years, 1 month ago) by momjian
Branches: MAIN
CVS tags: REL8_4_RC2, REL8_4_RC1, REL8_4_1, REL8_4_0
Branch point for: REL8_4_STABLE
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +129 -130 lines
8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list
provided by Andrew.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Tue Jun 9 17:41:02 2009 UTC (16 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +15 -1 lines
Restore dblink_current_query() to being a C-language function, so as to not
create an ABI break between 8.3 and 8.4.  It is still just a wrapper around
the built-in current_query() function, but at a different implementation
level.  Per my proposal.

Note: this change doesn't break 8.4beta installations, since their
SQL-language definition of the function still works fine.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Tue Jun 9 16:35:36 2009 UTC (16 years, 1 month ago) by joe
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +6 -1 lines
Default client encoding to server encoding for dblink connections. Addresses
issue raised by Ruzsinszky Attila and confirmed by others.

 ----------------------------------------------------------------------

Revision 1.79: download - view: text, markup, annotated - select for diffs
Sat Jun 6 21:27:56 2009 UTC (16 years, 1 month ago) by joe
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +100 -4 lines
Add support for using SQL/MED compliant FOREIGN DATA WRAPPER, SERVER,
and USER MAPPING as method to supply dblink connect parameters. Per
mailing list and PGCon discussions.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Tue Jun 2 03:21:56 2009 UTC (16 years, 1 month ago) by joe
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +30 -35 lines
Fix dblink_get_result() as reported by Oleksiy Shchukin. Refactor a bit
while we're at it per request by Tom Lane. Specifically, don't try to
perform dblink_send_query() via dblink_record_internal() -- it was
inappropriate and ugly.

Revision 1.60.2.4: download - view: text, markup, annotated - select for diffs
Sat Jan 3 19:58:10 2009 UTC (16 years, 6 months ago) by joe
Branches: REL8_2_STABLE
CVS tags: REL8_2_15, REL8_2_14, REL8_2_13, REL8_2_12
Diff to: previous 1.60.2.3: preferred, colored; branchpoint 1.60: preferred, colored
Changes since revision 1.60.2.3: +2 -2 lines
Fix bug per Oleksiy Shchukin - 2nd argument for dblink_get_result(text,bool)
is PG_GETARG_BOOL(2), should be PG_GETARG_BOOL(1).

Apply simple fix to back branches only. More extensive change to be applied
to head per Tom's suggestion.

Revision 1.69.2.2: download - view: text, markup, annotated - select for diffs
Sat Jan 3 19:57:54 2009 UTC (16 years, 6 months ago) by joe
Branches: REL8_3_STABLE
CVS tags: REL8_3_9, REL8_3_8, REL8_3_7, REL8_3_6
Diff to: previous 1.69.2.1: preferred, colored; branchpoint 1.69: preferred, colored
Changes since revision 1.69.2.1: +2 -2 lines
Fix bug per Oleksiy Shchukin - 2nd argument for dblink_get_result(text,bool)
is PG_GETARG_BOOL(2), should be PG_GETARG_BOOL(1).

Apply simple fix to back branches only. More extensive change to be applied
to head per Tom's suggestion.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Thu Jan 1 17:23:31 2009 UTC (16 years, 6 months ago) by momjian
Branches: MAIN
CVS tags: REL8_4_BETA2, REL8_4_BETA1
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +2 -2 lines
Update copyright for 2009.

Revision 1.60.2.3: download - view: text, markup, annotated - select for diffs
Sun Nov 30 23:24:08 2008 UTC (16 years, 7 months ago) by tgl
Branches: REL8_2_STABLE
Diff to: previous 1.60.2.2: preferred, colored; branchpoint 1.60: preferred, colored
Changes since revision 1.60.2.2: +28 -16 lines
Fix dblink and tablefunc to not return with the wrong CurrentMemoryContext.
Per buildfarm results.

Revision 1.69.2.1: download - view: text, markup, annotated - select for diffs
Sun Nov 30 23:24:01 2008 UTC (16 years, 7 months ago) by tgl
Branches: REL8_3_STABLE
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +29 -16 lines
Fix dblink and tablefunc to not return with the wrong CurrentMemoryContext.
Per buildfarm results.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Sun Nov 30 23:23:52 2008 UTC (16 years, 7 months ago) by tgl
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +28 -16 lines
Fix dblink and tablefunc to not return with the wrong CurrentMemoryContext.
Per buildfarm results.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Mon Sep 22 13:55:13 2008 UTC (16 years, 10 months ago) by tgl
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +47 -2 lines
Fix dblink_connect() so that it verifies that a password is supplied in the
conninfo string *before* trying to connect to the remote server, not after.
As pointed out by Marko Kreen, in certain not-very-plausible situations
this could result in sending a password from the postgres user's .pgpass file,
or other places that non-superusers shouldn't have access to, to an
untrustworthy remote server.  The cleanest fix seems to be to expose libpq's
conninfo-string-parsing code so that dblink can check for a password option
without duplicating the parsing logic.

Joe Conway, with a little cleanup by Tom Lane

Revision 1.74: download - view: text, markup, annotated - select for diffs
Thu Jul 3 03:56:57 2008 UTC (17 years ago) by joe
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +71 -58 lines
When an ERROR happens on a dblink remote connection, take
pains to pass the ERROR message components locally, including
using the passed SQLSTATE. Also wrap the passed info in an
appropriate CONTEXT message. Addresses complaint by Henry
Combrinck. Joe Conway, with much good advice from Tom Lane.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Fri Apr 4 17:02:56 2008 UTC (17 years, 3 months ago) by momjian
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +1 -2 lines
Remove unneed #include now that current_query() has moved to the backend.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Fri Apr 4 16:57:21 2008 UTC (17 years, 3 months ago) by momjian
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +1 -18 lines
Implement current_query(), that shows the currently executing query.
At the same time remove dblink/dblink_current_query() as it is no longer
necessary
*BACKWARD COMPATIBILITY ISSUE* for dblink

Tomas Doran

Revision 1.71: download - view: text, markup, annotated - select for diffs
Wed Mar 26 21:10:36 2008 UTC (17 years, 4 months ago) by alvherre
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +4 -3 lines
Move the HTSU_Result enum definition into snapshot.h, to avoid including
tqual.h into heapam.h.  This makes all inclusion of tqual.h explicit.

I also sorted alphabetically the includes on some source files.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Tue Mar 25 22:42:41 2008 UTC (17 years, 4 months ago) by tgl
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +68 -69 lines
Simplify and standardize conversions between TEXT datums and ordinary C
strings.  This patch introduces four support functions cstring_to_text,
cstring_to_text_with_len, text_to_cstring, and text_to_cstring_buffer, and
two macros CStringGetTextDatum and TextDatumGetCString.  A number of
existing macros that provided variants on these themes were removed.

Most of the places that need to make such conversions now require just one
function or macro call, in place of the multiple notational layers that used
to be needed.  There are no longer any direct calls of textout or textin,
and we got most of the places that were using handmade conversions via
memcpy (there may be a few still lurking, though).

This commit doesn't make any serious effort to eliminate transient memory
leaks caused by detoasting toasted text objects before they reach
text_to_cstring.  We changed PG_GETARG_TEXT_P to PG_GETARG_TEXT_PP in a few
places where it was easy, but much more could be done.

Brendan Jurd and Tom Lane

Revision 1.69: download - view: text, markup, annotated - select for diffs
Mon Jan 14 02:49:47 2008 UTC (17 years, 6 months ago) by tgl
Branches: MAIN
CVS tags: REL8_3_RC2, REL8_3_5, REL8_3_4, REL8_3_3, REL8_3_2, REL8_3_1, REL8_3_0
Branch point for: REL8_3_STABLE
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +17 -12 lines
Use an indexscan not a heapscan to search pg_index in get_pkey_attnames.
Noted while looking for heapscans that might need to start from block
zero.

Revision 1.15.2.6: download - view: text, markup, annotated - select for diffs
Thu Jan 3 21:29:07 2008 UTC (17 years, 6 months ago) by tgl
Branches: REL7_3_STABLE
CVS tags: REL7_3_21
Diff to: previous 1.15.2.5: preferred, colored
Changes since revision 1.15.2.5: +31 -16 lines
The original patch to disallow non-passworded connections to non-superusers
failed to cover all the ways in which a connection can be initiated in dblink.
Plug the remaining holes.  Also, disallow transient connections in functions
for which that feature makes no sense (because they are only sensible as
part of a sequence of operations on the same connection).  Joe Conway

Security: CVE-2007-6601

Revision 1.25.4.6: download - view: text, markup, annotated - select for diffs
Thu Jan 3 21:28:55 2008 UTC (17 years, 6 months ago) by tgl
Branches: REL7_4_STABLE
CVS tags: REL7_4_27, REL7_4_26, REL7_4_25, REL7_4_24, REL7_4_23, REL7_4_22, REL7_4_21, REL7_4_20, REL7_4_19
Diff to: previous 1.25.4.5: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.4.5: +31 -21 lines
The original patch to disallow non-passworded connections to non-superusers
failed to cover all the ways in which a connection can be initiated in dblink.
Plug the remaining holes.  Also, disallow transient connections in functions
for which that feature makes no sense (because they are only sensible as
part of a sequence of operations on the same connection).  Joe Conway

Security: CVE-2007-6601

Revision 1.38.4.3: download - view: text, markup, annotated - select for diffs
Thu Jan 3 21:28:42 2008 UTC (17 years, 6 months ago) by tgl
Branches: REL8_0_STABLE
CVS tags: REL8_0_23, REL8_0_22, REL8_0_21, REL8_0_20, REL8_0_19, REL8_0_18, REL8_0_17, REL8_0_16, REL8_0_15
Diff to: previous 1.38.4.2: preferred, colored; branchpoint 1.38: preferred, colored
Changes since revision 1.38.4.2: +29 -21 lines
The original patch to disallow non-passworded connections to non-superusers
failed to cover all the ways in which a connection can be initiated in dblink.
Plug the remaining holes.  Also, disallow transient connections in functions
for which that feature makes no sense (because they are only sensible as
part of a sequence of operations on the same connection).  Joe Conway

Security: CVE-2007-6601

Revision 1.48.2.5: download - view: text, markup, annotated - select for diffs
Thu Jan 3 21:28:30 2008 UTC (17 years, 6 months ago) by tgl
Branches: REL8_1_STABLE
CVS tags: REL8_1_19, REL8_1_18, REL8_1_17, REL8_1_16, REL8_1_15, REL8_1_14, REL8_1_13, REL8_1_12, REL8_1_11
Diff to: previous 1.48.2.4: preferred, colored; branchpoint 1.48: preferred, colored
Changes since revision 1.48.2.4: +29 -21 lines
The original patch to disallow non-passworded connections to non-superusers
failed to cover all the ways in which a connection can be initiated in dblink.
Plug the remaining holes.  Also, disallow transient connections in functions
for which that feature makes no sense (because they are only sensible as
part of a sequence of operations on the same connection).  Joe Conway

Security: CVE-2007-6601

Revision 1.60.2.2: download - view: text, markup, annotated - select for diffs
Thu Jan 3 21:28:18 2008 UTC (17 years, 6 months ago) by tgl
Branches: REL8_2_STABLE
CVS tags: REL8_2_9, REL8_2_8, REL8_2_7, REL8_2_6, REL8_2_11, REL8_2_10
Diff to: previous 1.60.2.1: preferred, colored; branchpoint 1.60: preferred, colored
Changes since revision 1.60.2.1: +45 -44 lines
The original patch to disallow non-passworded connections to non-superusers
failed to cover all the ways in which a connection can be initiated in dblink.
Plug the remaining holes.  Also, disallow transient connections in functions
for which that feature makes no sense (because they are only sensible as
part of a sequence of operations on the same connection).  Joe Conway

Security: CVE-2007-6601

Revision 1.68: download - view: text, markup, annotated - select for diffs
Thu Jan 3 21:27:59 2008 UTC (17 years, 6 months ago) by tgl
Branches: MAIN
CVS tags: REL8_3_RC1
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +40 -38 lines
The original patch to disallow non-passworded connections to non-superusers
failed to cover all the ways in which a connection can be initiated in dblink.
Plug the remaining holes.  Also, disallow transient connections in functions
for which that feature makes no sense (because they are only sensible as
part of a sequence of operations on the same connection).  Joe Conway

Security: CVE-2007-6601

Revision 1.67: download - view: text, markup, annotated - select for diffs
Tue Jan 1 19:45:45 2008 UTC (17 years, 6 months ago) by momjian
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -2 lines
Update copyrights in source tree to 2008.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Thu Nov 15 21:14:29 2007 UTC (17 years, 8 months ago) by momjian
Branches: MAIN
CVS tags: REL8_3_BETA4, REL8_3_BETA3
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +5 -5 lines
pgindent run for 8.3.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Mon Aug 27 01:24:50 2007 UTC (17 years, 11 months ago) by tgl
Branches: MAIN
CVS tags: REL8_3_BETA2, REL8_3_BETA1
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +11 -2 lines
Require SELECT privilege on a table to do dblink_get_pkey().  This is
not all that exciting when the system catalogs are readable by all,
but some people try to lock them down, and would not like this sort of
end run ...

Revision 1.15.2.5: download - view: text, markup, annotated - select for diffs
Mon Jul 9 01:44:11 2007 UTC (18 years ago) by joe
Branches: REL7_3_STABLE
CVS tags: REL7_3_20
Diff to: previous 1.15.2.4: preferred, colored
Changes since revision 1.15.2.4: +144 -0 lines
Restrict non-superusers to password authenticated connections
to prevent possible escalation of privilege. Provide new SECURITY
DEFINER functions with old behavior, but initially REVOKE ALL
from public for these functions. Per list discussion and design
proposed by Tom Lane.

Revision 1.25.4.5: download - view: text, markup, annotated - select for diffs
Mon Jul 9 01:43:57 2007 UTC (18 years ago) by joe
Branches: REL7_4_STABLE
CVS tags: REL7_4_18
Diff to: previous 1.25.4.4: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.4.4: +154 -0 lines
Restrict non-superusers to password authenticated connections
to prevent possible escalation of privilege. Provide new SECURITY
DEFINER functions with old behavior, but initially REVOKE ALL
from public for these functions. Per list discussion and design
proposed by Tom Lane.

Revision 1.38.4.2: download - view: text, markup, annotated - select for diffs
Mon Jul 9 01:32:58 2007 UTC (18 years ago) by joe
Branches: REL8_0_STABLE
CVS tags: REL8_0_14
Diff to: previous 1.38.4.1: preferred, colored; branchpoint 1.38: preferred, colored
Changes since revision 1.38.4.1: +154 -0 lines
Restrict non-superusers to password authenticated connections
to prevent possible escalation of privilege. Provide new SECURITY
DEFINER functions with old behavior, but initially REVOKE ALL
from public for these functions. Per list discussion and design
proposed by Tom Lane.

Revision 1.48.2.4: download - view: text, markup, annotated - select for diffs
Mon Jul 9 01:32:44 2007 UTC (18 years ago) by joe
Branches: REL8_1_STABLE
CVS tags: REL8_1_10
Diff to: previous 1.48.2.3: preferred, colored; branchpoint 1.48: preferred, colored
Changes since revision 1.48.2.3: +154 -0 lines
Restrict non-superusers to password authenticated connections
to prevent possible escalation of privilege. Provide new SECURITY
DEFINER functions with old behavior, but initially REVOKE ALL
from public for these functions. Per list discussion and design
proposed by Tom Lane.

Revision 1.60.2.1: download - view: text, markup, annotated - select for diffs
Mon Jul 9 01:32:30 2007 UTC (18 years ago) by joe
Branches: REL8_2_STABLE
CVS tags: REL8_2_5
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +156 -1 lines
Restrict non-superusers to password authenticated connections
to prevent possible escalation of privilege. Provide new SECURITY
DEFINER functions with old behavior, but initially REVOKE ALL
from public for these functions. Per list discussion and design
proposed by Tom Lane.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Sun Jul 8 17:12:38 2007 UTC (18 years ago) by joe
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +18 -1 lines
Restrict non-superusers to password authenticated connections
to prevent possible escalation of privilege. Provide new SECURITY
DEFINER functions with old behavior, but initially REVOKE ALL
from public for these functions. Per list discussion and design
proposed by Tom Lane. A different approach will be used for
back-branches, committed separately.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Fri Apr 6 04:21:41 2007 UTC (18 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +3 -3 lines
Support varlena fields with single-byte headers and unaligned storage.

This commit breaks any code that assumes that the mere act of forming a tuple
(without writing it to disk) does not "toast" any fields.  While all available
regression tests pass, I'm not totally sure that we've fixed every nook and
cranny, especially in contrib.

Greg Stark with some help from Tom Lane

Revision 1.62: download - view: text, markup, annotated - select for diffs
Wed Feb 7 00:52:35 2007 UTC (18 years, 5 months ago) by petere
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +2 -2 lines
Replace some strncpy() by strlcpy().

Revision 1.61: download - view: text, markup, annotated - select for diffs
Fri Jan 5 22:19:17 2007 UTC (18 years, 6 months ago) by momjian
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +2 -2 lines
Update CVS HEAD for 2007 copyright.  Back branches are typically not
back-stamped for this.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Thu Oct 19 19:53:03 2006 UTC (18 years, 9 months ago) by tgl
Branches: MAIN
CVS tags: REL8_2_RC1, REL8_2_BETA3, REL8_2_BETA2, REL8_2_4, REL8_2_3, REL8_2_2, REL8_2_1, REL8_2_0
Branch point for: REL8_2_STABLE
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +5 -2 lines
Fix a couple of places that were assuming debug_query_string couldn't
be NULL ... seems an unsafe assumption.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Wed Oct 4 00:29:44 2006 UTC (18 years, 9 months ago) by momjian
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +67 -64 lines
pgindent run for 8.2.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Sat Sep 2 21:11:15 2006 UTC (18 years, 10 months ago) by joe
Branches: MAIN
CVS tags: REL8_2_BETA1
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +309 -95 lines
Added async query capability. Original patch by
Kai Londenberg, modified by Joe Conway

Revision 1.57: download - view: text, markup, annotated - select for diffs
Tue Jul 11 16:35:31 2006 UTC (19 years ago) by momjian
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +6 -6 lines
Sort reference of include files, "A" - "F".

Revision 1.48.2.3: download - view: text, markup, annotated - select for diffs
Wed Jun 21 16:43:46 2006 UTC (19 years, 1 month ago) by joe
Branches: REL8_1_STABLE
CVS tags: REL8_1_9, REL8_1_8, REL8_1_7, REL8_1_6, REL8_1_5
Diff to: previous 1.48.2.2: preferred, colored; branchpoint 1.48: preferred, colored
Changes since revision 1.48.2.2: +7 -0 lines
- During dblink_open, if transaction state was IDLE, force cursor count to
  initially be 0. This is needed as a previous ABORT might have wiped out
  an automatically opened transaction without maintaining the cursor count.
- Fix regression test expected file for the correct ERROR message, which
  we now get given the above bug fix.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Wed Jun 21 16:43:11 2006 UTC (19 years, 1 month ago) by joe
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +8 -1 lines
- During dblink_open, if transaction state was IDLE, force cursor count to
  initially be 0. This is needed as a previous ABORT might have wiped out
  an automatically opened transaction without maintaining the cursor count.
- Fix regression test expected file for the correct ERROR message, which
  we now get given the above bug fix.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Tue May 30 22:12:12 2006 UTC (19 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +3 -1 lines
Magic blocks don't do us any good unless we use 'em ... so install one
in every shared library.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sat Mar 11 04:38:29 2006 UTC (19 years, 4 months ago) by momjian
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +1 -0 lines
Add CVS tag lines to files that were lacking them.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sat Mar 11 01:19:22 2006 UTC (19 years, 4 months ago) by neilc
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +2 -3 lines
Remove a few places that attempted to define INT_MAX, SCHAR_MAX, and
similar constants if they were not previously defined. All these
constants must be defined by limits.h according to C89, so we can
safely assume they are present.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Wed Mar 1 06:51:00 2006 UTC (19 years, 5 months ago) by neilc
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +58 -67 lines
Attached is a patch that replaces a bunch of places where StringInfos
are unnecessarily allocated on the heap rather than the stack. If the
StringInfo doesn't outlive the stack frame in which it is created,
there is no need to allocate it on the heap via makeStringInfo() --
stack allocation is faster.  While it's not a big deal unless the
code is in a critical path, I don't see a reason not to save a few
cycles -- using stack allocation is not less readable.

I also cleaned up a bit of code along the way: moved variable
declarations into a more tightly-enclosing scope where possible,
fixed some pointless copying of strings in dblink, etc.

Revision 1.15.2.4: download - view: text, markup, annotated - select for diffs
Tue Jan 3 23:48:42 2006 UTC (19 years, 6 months ago) by joe
Branches: REL7_3_STABLE
CVS tags: REL7_3_19, REL7_3_18, REL7_3_17, REL7_3_16, REL7_3_15, REL7_3_14, REL7_3_13
Diff to: previous 1.15.2.3: preferred, colored
Changes since revision 1.15.2.3: +28 -8 lines
When the remote query result has a different number of columns
than the local query specifies (e.g. in the FROM clause),
throw an ERROR (instead of crashing). Fix for bug #2129 reported
by Akio Iwaasa.

Revision 1.25.4.4: download - view: text, markup, annotated - select for diffs
Tue Jan 3 23:48:04 2006 UTC (19 years, 6 months ago) by joe
Branches: REL7_4_STABLE
CVS tags: REL7_4_17, REL7_4_16, REL7_4_15, REL7_4_14, REL7_4_13, REL7_4_12, REL7_4_11
Diff to: previous 1.25.4.3: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.4.3: +32 -8 lines
When the remote query result has a different number of columns
than the local query specifies (e.g. in the FROM clause),
throw an ERROR (instead of crashing). Fix for bug #2129 reported
by Akio Iwaasa.

Revision 1.38.4.1: download - view: text, markup, annotated - select for diffs
Tue Jan 3 23:47:24 2006 UTC (19 years, 6 months ago) by joe
Branches: REL8_0_STABLE
CVS tags: REL8_0_9, REL8_0_8, REL8_0_7, REL8_0_6, REL8_0_13, REL8_0_12, REL8_0_11, REL8_0_10
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +31 -17 lines
When the remote query result has a different number of columns
than the local query specifies (e.g. in the FROM clause),
throw an ERROR (instead of crashing). Fix for bug #2129 reported
by Akio Iwaasa.

Revision 1.48.2.2: download - view: text, markup, annotated - select for diffs
Tue Jan 3 23:46:32 2006 UTC (19 years, 6 months ago) by joe
Branches: REL8_1_STABLE
CVS tags: REL8_1_4, REL8_1_3, REL8_1_2
Diff to: previous 1.48.2.1: preferred, colored; branchpoint 1.48: preferred, colored
Changes since revision 1.48.2.1: +31 -17 lines
When the remote query result has a different number of columns
than the local query specifies (e.g. in the FROM clause),
throw an ERROR (instead of crashing). Fix for bug #2129 reported
by Akio Iwaasa.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Tue Jan 3 23:45:52 2006 UTC (19 years, 6 months ago) by joe
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +31 -17 lines
When the remote query result has a different number of columns
than the local query specifies (e.g. in the FROM clause),
throw an ERROR (instead of crashing). Fix for bug #2129 reported
by Akio Iwaasa.

Revision 1.48.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 22 18:23:01 2005 UTC (19 years, 8 months ago) by momjian
Branches: REL8_1_STABLE
CVS tags: REL8_1_1
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +5 -5 lines
Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib
directory.  Also fix case where identifiers were used as variable names
in the backend, but as typedefs in ecpg (favor the backend for
indenting).

Backpatch to 8.1.X.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Tue Nov 22 18:17:04 2005 UTC (19 years, 8 months ago) by momjian
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +8 -8 lines
Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib
directory.  Also fix case where identifiers were used as variable names
in the backend, but as typedefs in ecpg (favor the backend for
indenting).

Backpatch to 8.1.X.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Fri Nov 18 02:38:22 2005 UTC (19 years, 8 months ago) by tgl
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +115 -197 lines
Mop-up for nulls-in-arrays patch: fix some places that access array
contents directly.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Tue Oct 18 02:55:49 2005 UTC (19 years, 9 months ago) by joe
Branches: MAIN
CVS tags: REL8_1_0RC1, REL8_1_0BETA4, REL8_1_0
Branch point for: REL8_1_STABLE
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +75 -39 lines
When a cursor is opened using dblink_open, only start a transaction
if there isn't one already open. Upon dblink_close, only commit
the open transaction if it was started by dblink_open, and only
then when all cursors opened by dblink_open are closed. The transaction
accounting is done individually for all named connections, plus
the persistent unnamed connection.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sat Oct 15 02:49:04 2005 UTC (19 years, 9 months ago) by momjian
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +47 -52 lines
Standard pgindent run for 8.1.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sat Oct 8 12:18:48 2005 UTC (19 years, 9 months ago) by momjian
Branches: MAIN
CVS tags: REL8_1_0BETA3
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +5 -5 lines
Cosmetic improvements to dblink.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Oct 8 12:12:29 2005 UTC (19 years, 9 months ago) by momjian
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +46 -45 lines
Cosmetic changes to dblink.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sat Oct 8 11:33:45 2005 UTC (19 years, 9 months ago) by momjian
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +7 -2 lines
Cosmetic changes to dblink.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Mon May 30 23:09:06 2005 UTC (20 years, 2 months ago) by tgl
Branches: MAIN
CVS tags: REL8_1_0BETA2, REL8_1_0BETA1
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +34 -42 lines
Document get_call_result_type() and friends; mark TypeGetTupleDesc()
and RelationNameGetTupleDesc() as deprecated; remove uses of the
latter in the contrib library.  Along the way, clean up crosstab()
code and documentation a little.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sun May 29 04:23:02 2005 UTC (20 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +0 -5 lines
Modify hash_search() API to prevent future occurrences of the error
spotted by Qingqing Zhou.  The HASH_ENTER action now automatically
fails with elog(ERROR) on out-of-memory --- which incidentally lets
us eliminate duplicate error checks in quite a bunch of places.  If
you really need the old return-NULL-on-out-of-memory behavior, you
can ask for HASH_ENTER_NULL.  But there is now an Assert in that path
checking that you aren't hoping to get that behavior in a palloc-based
hash table.
Along the way, remove the old HASH_FIND_SAVE/HASH_REMOVE_SAVED actions,
which were not being used anywhere anymore, and were surely too ugly
and unsafe to want to see revived again.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri May 27 00:57:48 2005 UTC (20 years, 2 months ago) by neilc
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +1 -1 lines
Remove second argument from textToQualifiedNameList(), as it is no longer
used. From Jaime Casanova.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Thu Apr 14 20:03:21 2005 UTC (20 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +1 -2 lines
Completion of project to use fixed OIDs for all system catalogs and
indexes.  Replace all heap_openr and index_openr calls by heap_open
and index_open.  Remove runtime lookups of catalog OID numbers in
various places.  Remove relcache's support for looking up system
catalogs by name.  Bulky but mostly very boring patch ...

Revision 1.39: download - view: text, markup, annotated - select for diffs
Tue Mar 29 00:16:47 2005 UTC (20 years, 4 months ago) by tgl
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +22 -25 lines
Convert oidvector and int2vector into variable-length arrays.  This
change saves a great deal of space in pg_proc and its primary index,
and it eliminates the former requirement that INDEX_MAX_KEYS and
FUNC_MAX_ARGS have the same value.  INDEX_MAX_KEYS is still embedded
in the on-disk representation (because it affects index tuple header
size), but FUNC_MAX_ARGS is not.  I believe it would now be possible
to increase FUNC_MAX_ARGS at little cost, but haven't experimented yet.
There are still a lot of vestigial references to FUNC_MAX_ARGS, which
I will clean up in a separate pass.  However, getting rid of it
altogether would require changing the FunctionCallInfoData struct,
and I'm not sure I want to buy into that.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sat Jan 1 05:43:05 2005 UTC (20 years, 6 months ago) by momjian
Branches: MAIN
CVS tags: REL8_0_5, REL8_0_4, REL8_0_3, REL8_0_2, REL8_0_1, REL8_0_0RC5, REL8_0_0RC4, REL8_0_0
Branch point for: REL8_0_STABLE
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +1 -1 lines
Update copyrights that were missed.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Oct 28 22:31:11 2004 UTC (20 years, 9 months ago) by tgl
Branches: MAIN
CVS tags: REL8_0_0RC3, REL8_0_0RC2, REL8_0_0RC1, REL8_0_0BETA5
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +3 -3 lines
This makes dblink pass its installcheck test on platforms where
snprintf(data, len, %s, NULL) crash.

The code was trying to find a connection by name when it already had an
unnamed connection and did not have a name to search with.

Kris Jurka

Revision 1.36: download - view: text, markup, annotated - select for diffs
Mon Oct 25 00:46:39 2004 UTC (20 years, 9 months ago) by neilc
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +1 -9 lines
Modify hash_create() to elog(ERROR) if an error occurs, rather than
returning a NULL pointer (some callers remembered to check the return
value, but some did not -- it is safer to just bail out).

Also, cleanup pgstat.c to use elog(ERROR) rather than elog(LOG) followed
by exit().

Revision 1.35: download - view: text, markup, annotated - select for diffs
Tue Sep 28 00:49:04 2004 UTC (20 years, 10 months ago) by tgl
Branches: MAIN
CVS tags: REL8_0_0BETA4
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +5 -9 lines
Remove duplicate PQclear(res) operations leading to double free() and
subsequent core dump.  It looks like at one time DBLINK_RES_ERROR_AS_NOTICE
didn't include a PQclear, but now it does and so these other ones are
duplicate.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Aug 29 05:06:34 2004 UTC (20 years, 11 months ago) by momjian
Branches: MAIN
CVS tags: REL8_0_0BETA3, REL8_0_0BETA2
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +4 -4 lines
Pgindent run for 8.0.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Aug 29 04:12:16 2004 UTC (20 years, 11 months ago) by momjian
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +1 -1 lines
Update copyright to 2004.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Thu Apr 1 21:28:42 2004 UTC (21 years, 3 months ago) by tgl
Branches: MAIN
CVS tags: REL8_0_0BETA1
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +14 -31 lines
Replace TupleTableSlot convention for whole-row variables and function
results with tuples as ordinary varlena Datums.  This commit does not
in itself do much for us, except eliminate the horrid memory leak
associated with evaluation of whole-row variables.  However, it lays the
groundwork for allowing composite types as table columns, and perhaps
some other useful features as well.  Per my proposal of a few days ago.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sun Mar 7 02:27:00 2004 UTC (21 years, 4 months ago) by joe
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +201 -19 lines
Added new versions of dblink, dblink_exec, dblink_open, dblink_close,
and, dblink_fetch -- allows ERROR on remote side of connection to
throw NOTICE locally instead of ERROR. Also removed documentation for
previously deprecated, now removed, functions.

Revision 1.15.2.3: download - view: text, markup, annotated - select for diffs
Tue Feb 24 06:07:52 2004 UTC (21 years, 5 months ago) by joe
Branches: REL7_3_STABLE
CVS tags: REL7_3_9, REL7_3_8, REL7_3_7, REL7_3_6, REL7_3_12, REL7_3_11, REL7_3_10
Diff to: previous 1.15.2.2: preferred, colored
Changes since revision 1.15.2.2: +18 -56 lines
When returning type "record", replace use of pgresultGetTupleDesc
with ReturnSetInfo->expectedDesc. This allows custom datatypes
(e.g. from tsearch2) to be returned at runtime. Previous behavior
depended on the type oid to match between the remote and local
database, which obviously doesn't work well for custom types.
Per report from Mark Gibson.

Revision 1.25.4.3: download - view: text, markup, annotated - select for diffs
Tue Feb 24 06:07:34 2004 UTC (21 years, 5 months ago) by joe
Branches: REL7_4_STABLE
CVS tags: REL7_4_9, REL7_4_8, REL7_4_7, REL7_4_6, REL7_4_5, REL7_4_4, REL7_4_3, REL7_4_2, REL7_4_10
Diff to: previous 1.25.4.2: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.4.2: +22 -60 lines
When returning type "record", replace use of pgresultGetTupleDesc
with ReturnSetInfo->expectedDesc. This allows custom datatypes
(e.g. from tsearch2) to be returned at runtime. Previous behavior
depended on the type oid to match between the remote and local
database, which obviously doesn't work well for custom types.
Per report from Mark Gibson.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Feb 24 06:07:18 2004 UTC (21 years, 5 months ago) by joe
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +22 -60 lines
When returning type "record", replace use of pgresultGetTupleDesc
with ReturnSetInfo->expectedDesc. This allows custom datatypes
(e.g. from tsearch2) to be returned at runtime. Previous behavior
depended on the type oid to match between the remote and local
database, which obviously doesn't work well for custom types.
Per report from Mark Gibson.

Revision 1.25.4.2: download - view: text, markup, annotated - select for diffs
Fri Nov 28 05:03:48 2003 UTC (21 years, 8 months ago) by joe
Branches: REL7_4_STABLE
CVS tags: REL7_4_1
Diff to: previous 1.25.4.1: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.4.1: +2 -0 lines
Fix regression in dblink_disconnect() reported by Eduardo Stern:
persistent_conn was left dangling after a disconnect in the
unnamed connection case, causing a subsequent disconnect to
crash the backend.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Nov 28 05:03:01 2003 UTC (21 years, 8 months ago) by joe
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -0 lines
Fix regression in dblink_disconnect() reported by Eduardo Stern:
persistent_conn was left dangling after a disconnect in the
unnamed connection case, causing a subsequent disconnect to
crash the backend.

Revision 1.15.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 26 20:44:54 2003 UTC (21 years, 8 months ago) by joe
Branches: REL7_3_STABLE
CVS tags: REL7_3_5
Diff to: previous 1.15.2.1: preferred, colored
Changes since revision 1.15.2.1: +3 -0 lines
Added missing SPI_finish() calls to get_tuple_of_interest(). Fixes bug
reported by Andrea Grassi.

Revision 1.25.4.1: download - view: text, markup, annotated - select for diffs
Wed Nov 26 20:44:13 2003 UTC (21 years, 8 months ago) by joe
Branches: REL7_4_STABLE
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +3 -0 lines
Added missing SPI_finish() calls to get_tuple_of_interest(). Fixes bug
reported by Andrea Grassi.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Wed Nov 26 20:43:25 2003 UTC (21 years, 8 months ago) by joe
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +3 -0 lines
Added missing SPI_finish() calls to get_tuple_of_interest(). Fixes bug
reported by Andrea Grassi.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed Nov 12 21:15:42 2003 UTC (21 years, 8 months ago) by tgl
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +4 -4 lines
Cross-data-type comparisons are now indexable by btrees, pursuant to my
pghackers proposal of 8-Nov.  All the existing cross-type comparison
operators (int2/int4/int8 and float4/float8) have appropriate support.
The original proposal of storing the right-hand-side datatype as part of
the primary key for pg_amop and pg_amproc got modified a bit in the event;
it is easier to store zero as the 'default' case and only store a nonzero
when the operator is actually cross-type.  Along the way, remove the
long-since-defunct bigbox_ops operator class.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sun Nov 9 21:30:35 2003 UTC (21 years, 8 months ago) by tgl
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +4 -2 lines
Add operator strategy and comparison-value datatype fields to ScanKey.
Remove the 'strategy map' code, which was a large amount of mechanism
that no longer had any use except reverse-mapping from procedure OID to
strategy number.  Passing the strategy number to the index AM in the
first place is simpler and faster.
This is a preliminary step in planned support for cross-datatype index
operations.  I'm committing it now since the ScanKeyEntryInitialize()
API change touches quite a lot of files, and I want to commit those
changes before the tree drifts under me.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Mon Aug 4 23:59:37 2003 UTC (21 years, 11 months ago) by tgl
Branches: MAIN
CVS tags: WIN32_DEV, REL7_4_RC2, REL7_4_RC1, REL7_4_BETA5, REL7_4_BETA4, REL7_4_BETA3, REL7_4_BETA2, REL7_4_BETA1, REL7_4
Branch point for: REL7_4_STABLE
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +1 -1 lines
Fix some copyright notices that weren't updated.  Improve copyright tool
so it won't miss 'em again.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Mon Aug 4 00:43:10 2003 UTC (21 years, 11 months ago) by momjian
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +81 -82 lines
pgindent run.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Jul 24 17:52:16 2003 UTC (22 years ago) by tgl
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +162 -88 lines
Error message editing in contrib (mostly by Joe Conway --- thanks Joe!)

Revision 1.22: download - view: text, markup, annotated - select for diffs
Wed Jun 25 01:10:15 2003 UTC (22 years, 1 month ago) by momjian
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +370 -503 lines
Please apply attached patch to contrib/dblink. It adds named persistent
connections to dblink.

Shridhar Daithanka

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Jun 15 17:59:09 2003 UTC (22 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +2 -6 lines
Replace cryptic 'Unknown kind of return type' messages with something
hopefully a little more useful.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Wed May 28 16:03:55 2003 UTC (22 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +1 -4 lines
Replace functional-index facility with expressional indexes.  Any column
of an index can now be a computed expression instead of a simple variable.
Restrictions on expressions are the same as for predicates (only immutable
functions, no sub-selects).  This fixes problems recently introduced with
inlining SQL functions, because the inlining transformation is applied to
both expression trees so the planner can still match them up.  Along the
way, improve efficiency of handling index predicates (both predicates and
index expressions are now cached by the relcache) and fix 7.3 oversight
that didn't record dependencies of predicate expressions.

Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Sat Nov 23 18:59:29 2002 UTC (22 years, 8 months ago) by tgl
Branches: REL7_3_STABLE
CVS tags: REL7_3_4, REL7_3_2
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +55 -12 lines
Fix inappropriate quoting in dblink.  From Joe Conway.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sat Nov 23 18:59:25 2002 UTC (22 years, 8 months ago) by tgl
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +55 -12 lines
Fix inappropriate quoting in dblink.  From Joe Conway.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Nov 13 00:39:46 2002 UTC (22 years, 8 months ago) by momjian
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +1 -2 lines
Add new palloc0 call as merge of palloc and MemSet(0).

Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Nov 11 03:02:17 2002 UTC (22 years, 8 months ago) by momjian
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -1 lines
Back out use of palloc0 in place if palloc/MemSet.  Seems constant len
to MemSet is a performance boost.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Nov 10 07:25:12 2002 UTC (22 years, 8 months ago) by momjian
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +1 -2 lines
Merge palloc()/MemSet(0) calls into a single palloc0() call.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Sep 23 18:03:32 2002 UTC (22 years, 10 months ago) by tgl
Branches: MAIN
Branch point for: REL7_3_STABLE
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +24 -6 lines
Tweak dblink functions to use int4 arguments instead of int2,
to avoid having to write explicit casts.  From Joe Conway.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Sep 5 00:56:35 2002 UTC (22 years, 10 months ago) by tgl
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +1 -1 lines
Remove include of libpq-int.h --- dblink.c should not be (and was not)
depending on libpq internals.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Sep 5 00:43:06 2002 UTC (22 years, 10 months ago) by tgl
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +1 -2 lines
Be careful to include postgres.h *before* any system headers, to ensure
that the right flavors of largefile-related definitions are seen.
Most of these changes are probably unnecessary, but better safe than
sorry.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Sep 4 20:31:06 2002 UTC (22 years, 10 months ago) by momjian
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +287 -268 lines
pgindent run.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue Sep 3 04:00:37 2002 UTC (22 years, 10 months ago) by tgl
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -4 lines
last-minute CreateTemplateTupleDesc fixes.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Sep 2 06:13:31 2002 UTC (22 years, 10 months ago) by momjian
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +801 -289 lines
Attached is a fairly sizeable update to contrib/dblink. I'd love to get
review/feedback if anyone is interested and can spend the time. But I'd
also love to get this committed and address changes as incremental
patches ;-), so if there are no objections, please apply.

Below I'll give a synopsis of the changes. More detailed descriptions
are now in a new doc directory under contrib/dblink. There is also a new

dblink.test.sql file which will give a pretty good overview of the
functions and their use.

Joe Conway

Revision 1.9: download - view: text, markup, annotated - select for diffs
Mon Aug 26 17:53:57 2002 UTC (22 years, 11 months ago) by tgl
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +5 -0 lines
Modify array operations to include array's element type OID in the
array header, and to compute sizing and alignment of array elements
the same way normal tuple access operations do --- viz, using the
tupmacs.h macros att_addlength and att_align.  This makes the world
safe for arrays of cstrings or intervals, and should make it much
easier to write array-type-polymorphic functions; as examples see
the cleanups of array_out and contrib/array_iterator.  By Joe Conway
and Tom Lane.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Aug 2 18:15:03 2002 UTC (22 years, 11 months ago) by tgl
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +57 -33 lines
ALTER TABLE DROP COLUMN works.  Patch by Christopher Kings-Lynne,
code review by Tom Lane.  Remaining issues: functions that take or
return tuple types are likely to break if one drops (or adds!)
a column in the table defining the type.  Need to think about what
to do here.

Along the way: some code review for recent COPY changes; mark system
columns attnotnull = true where appropriate, per discussion a month ago.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon May 27 21:59:12 2002 UTC (23 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +61 -39 lines
Update dblink to work with qualified relation names.
From Joe Conway.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon May 20 23:51:40 2002 UTC (23 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -3 lines
Restructure indexscan API (index_beginscan, index_getnext) per
yesterday's proposal to pghackers.  Also remove unnecessary parameters
to heap_beginscan, heap_rescan.  I modified pg_proc.h to reflect the
new numbers of parameters for the AM interface routines, but did not
force an initdb because nothing actually looks at those fields.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Wed Apr 24 02:28:28 2002 UTC (23 years, 3 months ago) by momjian
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +1219 -104 lines
Attached is an update to contrib/dblink. Please apply if there are no
objections.

Major changes:
   - removed cursor wrap around input sql to allow for remote
     execution of INSERT/UPDATE/DELETE
   - dblink now returns a resource id instead of a real pointer
   - added several utility functions

I'm still hoping to add explicit cursor open/fetch/close support before
7.3 is released, but I need a bit more time on that.

On a somewhat unrelated topic, I never got any feedback on the
unknownin/out patch and the mb_substring patch. Is there anything else I
need to do to get those applied?

Joe Conway

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Oct 25 05:49:19 2001 UTC (23 years, 9 months ago) by momjian
Branches: MAIN
CVS tags: REL7_2_STABLE, REL7_2_RC2, REL7_2_RC1, REL7_2_BETA5, REL7_2_BETA4, REL7_2_BETA3, REL7_2_BETA2, REL7_2_BETA1, REL7_2_8, REL7_2_7, REL7_2_6, REL7_2_5, REL7_2_4, REL7_2_3, REL7_2
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +88 -79 lines
pgindent run on all C files.  Java run to follow.  initdb/regression
tests pass.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Oct 15 18:49:40 2001 UTC (23 years, 9 months ago) by tgl
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +1 -1 lines
Fix some portability problems (get it to compile, at least, on HP's cc)

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Jun 18 19:09:50 2001 UTC (24 years, 1 month ago) by momjian
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +21 -13 lines
Here's a small patch for dblink:

   - fixed dblink invalid pointer causing corrupt elog message
   - fixed dblink_tok improper handling of null results
   - fixed examples in README.dblink

Joe Conway

Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Jun 14 16:49:03 2001 UTC (24 years, 1 month ago) by momjian
Branches: MAIN
Allow remote query execution (dblink)

Joe Conway

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

PostgreSQL CVSweb <[email protected]>