summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2009-09-11Fix argument value NULL check.Marko Kreen
Incoming NULL value could cause crash in function containing SELECT with different argument order. Due to thinko, NULL check was done with query arg index, instead of function arg index. Reported by João Matos
2009-09-11Fix potential buffer overflow when len(typname) > 32Marko Kreen
The fixed size buffer tmp[32] was not updated when type casting was added. Reported by Ian Sollars
2009-06-29Make scanner accept dot as standalone symbolMarko Kreen
Currently PL/Proxy fails to parse following query: select (ret_numtuple(1)).num, (ret_numtuple(1)).name; The fix is to add "." to the SQLSYM rule in the lexer. This should be OK because an identifier chain will always be longer than a single dot, so flex will prefer it over parsing the single dot. Patch by Peter Eisentraut
2009-06-29Avoid parsing "SELECT (" as function callMarko Kreen
Currently PL/Proxy fails to parse following statement: select (0*0); As only SELECT statement is affected, fix it by explicitly checking for that case. In long-term, the function-call detection should be moved to parser, thus getting rid of the hack. Patch by Peter Eisentraut
2009-01-02allow direct argument references for RUN statement: RUN ON $1;Marko Kreen
2008-12-17Clear ->tuning bit on connection close.Marko Kreen
If tuning query fails, the bit can stay set, thus creating always-failing connection slot. Report and analyze by Jonah Harris.
2008-11-19If query is canceled by user, send cancel requestMarko Kreen
to remote databases too. Patch by Ye Wenbin
2008-09-12use pg_strcasecmp instead strcasecmp for consistencyMarko Kreen
2008-09-11Use server_encoding as remote connection encodingMarko Kreen
Previous use of client_encoding was wrong, but seemed to work because of binary i/o which bypassed the encoding checks. Noticed and fixed by Hiroshi Saito
2008-09-11disable binary i/o completelyMarko Kreen
2008-09-11allow non-ascii chars in identsMarko Kreen
2008-09-11dont crash on nameless input argumentsMarko Kreen
2008-09-08Postgres 8.2 did not have PGDLLIMPORT on win32 (Hiroshi Saito)Marko Kreen
Also remove double include.
2008-09-05Redefine YYMALLOC/YYFREE instead malloc/free. Its safer.Marko Kreen
2008-07-28use PGDLLIMPORT instead __attribute__Marko Kreen
2008-07-28Support compilation on win32.Marko Kreen
Original patch by Hiroshi Saito, applied with minor modifications.
2008-07-28Remove unused CONST token.Marko Kreen
Noticed by Hiroshi Saito
2008-07-21require exactly 1 row for non-setof functionsMarko Kreen
2008-06-27Few cleanupsMarko Kreen
- parser.y: move xfunc reset together with other vars - plproxy.h: - use bool instead bitfield for booleans - remove duplicate include - reorder fields and make arg_count short to decrease holes
2008-06-27accept int2 and int8 from hash functionMarko Kreen
2008-06-27add def for new functionMarko Kreen
2008-06-278.4 requires explicit include for standard_conforming_stringsMarko Kreen
2008-06-27Scanner/parser portability changes.Marko Kreen
- Avoid use of alloca in parser, instead redefine malloc/free to palloc/pfree. - Previously exception from palloc() confused scanner as invalid pointer could stay around. Now forcibly reinitialize everything. - Remove debug malloc wrappers from scanner.
2008-06-26Support dynamic record as return type.Marko Kreen
Now PL/Proxy allows function defined as RETURNS RECORD without OUT parameters. Such functions need actual result column types specified with AS clause: SELECT * FROM func() AS (col1 type1, col2 type2); PL/Proxy needs to detect the actual type on each call and pass it to remote database. Current implementation caches last record type, drops it if type changes. Original patch by Lei Yonghua, applied with some modifications.
2008-06-06move variable reset close to definitionsMarko Kreen
2008-06-06make RUN default to ANYMarko Kreen
2008-05-14Better poll() compat and few cleanups.Marko Kreen
- Make resulting fd-count correct for poll(). - Don't allow any negative value as timeout, only -1. - Clearer label names.
2008-05-14make RUN optional, defaulting to RUN ON 0;Marko Kreen
2008-05-14Reset cluster_sql on parser entry.Marko Kreen
Fixes crash in case CLUSTER 'name'; follows CLUSTER func();
2008-01-04disable date/time type too as they are also affected by integer_datetimesMarko Kreen
2008-01-03disable binary timestamp coz int vs. float problemsMarko Kreen
2008-01-02disable unconditional compat poll() functionMarko Kreen
2008-01-02move poll compat func to .c file, make fd_set runtime resizeableMarko Kreen
2008-01-02put 8.2 check into main plproxy.h to avoid random errors on older versMarko Kreen
2007-12-20remove debug hacksplproxy_2_0_4_rc2Marko Kreen
2007-12-20replace select() with poll() to allow large fd valuesMarko Kreen
2007-12-20detect lost fds earlierMarko Kreen
2007-12-18completely remove func=NULL calls of plproxy_errorMarko Kreen
2007-12-18make plproxy_error survive NULL, also avoid NULL func if possibleMarko Kreen
2007-12-06simplify the PLPROXY_IDLE_CONN_CHECK related codeMarko Kreen
2007-11-19Remote 'statement_timeout' config parameter.Marko Kreen
It did not work in 2.0.2 and although it works now, it could not work in live env as the SET cannot be combined with main request, thus likely it will be executed on different backend.
2007-11-08proper quoting for function and result column namesMarko Kreen
2007-11-08composite type has always column names, check is unnecessaryMarko Kreen
2007-11-05explicit type casting for result fieldsMarko Kreen
2007-11-02issue remote query with expected result columns filled inMarko Kreen
This will make plproxy more robust when signatures differ between databases. It is especially helpful for upgrading functions.
2007-10-31simpler lineno initMarko Kreen
2007-10-30old flex needs more cleanupMarko Kreen
2007-10-29put malloc crap directly to scanner.l, parser does not need itMarko Kreen
2007-10-29malloc debugging for flexMarko Kreen
2007-10-29experimental support for old flexMarko Kreen
somehow it breaks the error reporting, need to fix it somehow