[GENERAL] Write in file from postgres
-- From: "Kevin Martins" <[EMAIL PROTECTED]> Sent: Thursday, April 10, 2008 12:03 AM To: Subject: Re: [GENERAL] pain of postgres upgrade with extensions Hello everybody, First off all I am new in postgres but allready got some questions. It's possible to wirte in a file from postgres? Kevin Martins -- From: "Dave Potts" <[EMAIL PROTECTED]> Sent: Wednesday, March 12, 2008 8:46 PM To: Subject: Re: [GENERAL] pain of postgres upgrade with extensions Greg Sabino Mullane wrote: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 - dump version N database - create empty version N+1 database - install N+1's version of each needed contrib module into new database - restore dump, ignoring "object already exists" errors There is a TODO to figure out some cleaner way of handling this sort of thing ... I think I smell a GSOC project I think there is a slight misunderstanding here, I was refering to extensions items such as postgis, plr, pgperl, etc. These have a slight different foot print to the projects in the contrib directory. Dave - -- Greg Sabino Mullane [EMAIL PROTECTED] End Point Corporation PGP Key: 0x14964AC8 200803121533 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAkfYMBMACgkQvJuQZxSWSsjmmwCg1JvB0G2py5jSbJdSZpWR8YyV D4YAoLg2ZinEEGoNEU7S2mcL3bqhmNIh =7pvA -END PGP SIGNATURE- -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] pain of postgres upgrade with extensions
Hello everybody, First off all I am new in postgres but allready got some questions. It's possible to wirte in a file from postgres? Kevin Martins -- From: "Dave Potts" <[EMAIL PROTECTED]> Sent: Wednesday, March 12, 2008 8:46 PM To: Subject: Re: [GENERAL] pain of postgres upgrade with extensions Greg Sabino Mullane wrote: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 - dump version N database - create empty version N+1 database - install N+1's version of each needed contrib module into new database - restore dump, ignoring "object already exists" errors There is a TODO to figure out some cleaner way of handling this sort of thing ... I think I smell a GSOC project I think there is a slight misunderstanding here, I was refering to extensions items such as postgis, plr, pgperl, etc. These have a slight different foot print to the projects in the contrib directory. Dave - -- Greg Sabino Mullane [EMAIL PROTECTED] End Point Corporation PGP Key: 0x14964AC8 200803121533 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iEYEAREDAAYFAkfYMBMACgkQvJuQZxSWSsjmmwCg1JvB0G2py5jSbJdSZpWR8YyV D4YAoLg2ZinEEGoNEU7S2mcL3bqhmNIh =7pvA -END PGP SIGNATURE- -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] ERROR: cache lookup failed for type
Hi, I've been working with SRF and i want to return a setof record but i keep getting this error ´cache lookup failed for type 18867840´ . My question is why and how to fix it. I need to do this work as quick as possible so I need all the help i can get, pleeease .I am including postgres library and i am using version 8.1. Where is the code: #include "SRF_example.h" #include "postgres.h" #include "fmgr.h" #include "funcapi.h" #include "executor/spi.h" #include "executor/executor.h" PG_FUNCTION_INFO_V1(my_SRF_example); Datum my_SRF_example(PG_FUNCTION_ARGS) { FuncCallContext *funcctx; int call_cntr; int max_calls; TupleDesctupdesc; AttInMetadata *attinmeta; // stuff done only on the first call of the function if (SRF_IS_FIRSTCALL()) { MemoryContext oldcontext; // create a function context for cross-call persistence funcctx = SRF_FIRSTCALL_INIT(); // switch to memory context appropriate for multiple function calls oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); // total number of tuples to be returned funcctx->max_calls = PG_GETARG_UINT32(0); // Build a tuple descriptor for our result type if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("function returning record called in context " "that cannot accept type record"))); // generate attribute metadata needed later to produce tuples from raw // C strings attinmeta = TupleDescGetAttInMetadata(tupdesc); funcctx->attinmeta = attinmeta; MemoryContextSwitchTo(oldcontext); } // stuff done on every call of the function funcctx = SRF_PERCALL_SETUP(); call_cntr = funcctx->call_cntr; max_calls = funcctx->max_calls; // max_calls -= 1; attinmeta = funcctx->attinmeta; elog(NOTICE,"%d < %d",call_cntr,max_calls); if (call_cntr user_fctx); SRF_RETURN_DONE(funcctx); } }
[GENERAL] Problems with linkage
Hello, I am new in using c in postgresql. My problem is that when i compile my program code,it generate the folowing error mensage: fu01.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'nmth00.o(.idata$4+0x0): undefined reference to `_nm__SPI_processed'collect2: ld returned 1 exit status dllwrap.exe: no export definition file provided.Creating one, but that may not be what you wantdllwrap.exe: gcc exited with status 1 make.exe: *** [selectAll.dll] Error 1 Execution terminated Could anyone help me? Cheers Kevin Martins _ Receba as últimas notícias do Brasil e do mundo direto no seu Messenger com Alertas MSN! É GRÁTIS! http://alertas.br.msn.com/