Re: [HACKERS] Bad Data back Door

2012-10-05 Thread John R Pierce
On 10/05/12 6:12 PM, Tom Lane wrote: Now, having said that, I think it has to be the reponsibility of the FDW to apply any required check ... which makes this a bug report against oracle_fdw, not the core system. (FWIW, contrib/file_fdw depends on the COPY code, which will check encoding.) I'm

Re: [HACKERS] 64-bit API for large object

2012-10-05 Thread Tatsuo Ishii
As a committer, I have looked into the patch and it seems it's good to commit. However I want to make a small enhancement in the documentation part: 1) lo_open section needs to mention about new 64bit APIs. Also it should include description about lo_truncate, but this is not 64bit APIs auth

Re: [HACKERS] Bad Data back Door

2012-10-05 Thread Tom Lane
"David E. Wheeler" writes: > I’ve discovered something a bit disturbing at $work. We’re migrating (slowly) > from Oracle to PostgreSQL, and in some cases are using oracle_fdw to copy > data over. Alas, there are a fair number of text values in the Oracle > database that, although the database i

[HACKERS] why repl_gram.h?

2012-10-05 Thread Peter Eisentraut
src/backend/replication/Makefile calls bison with -d to create a repl_gram.h header file, but that is not used anywhere. Is this an oversight? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-ha

[HACKERS] Bad Data back Door

2012-10-05 Thread David E. Wheeler
Hackers, I’ve discovered something a bit disturbing at $work. We’re migrating (slowly) from Oracle to PostgreSQL, and in some cases are using oracle_fdw to copy data over. Alas, there are a fair number of text values in the Oracle database that, although the database is UTF-8, are actually some

[HACKERS] Bugs in CREATE/DROP INDEX CONCURRENTLY

2012-10-05 Thread Tom Lane
1. These operations think they can use ordinary heap_update operations to change pg_index entries when they don't have exclusive lock on the parent table. The lack of ex-lock means that another backend could be currently loading up its list of index OIDs for the table --- and since it scans pg_in

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2012-10-05 Thread Tom Lane
Michael Paquier writes: > On Sat, Oct 6, 2012 at 6:14 AM, Tom Lane wrote: >> CREATE INDEX CONCURRENTLY (already exists) >> SWAP INDEXES (requires ex-lock, swaps names and constraint dependencies; >> or maybe just implement as swap of relfilenodes?) >> DROP INDEX CONCURRENTLY > OK. That is a diff

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2012-10-05 Thread Tom Lane
Alvaro Herrera writes: > Maybe another idea is that the reindexing is staged: the user would > first run a command to create the replacement index, and leave both > present until the user runs a second command (which acquires a strong > lock) that executes the switch. Somehow similar to a constra

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2012-10-05 Thread Alvaro Herrera
Tom Lane escribió: > Note that allowing subsequent requests to jump the queue would not be a > good fix for this; if you do that, it's likely the ex-lock will never be > granted, at least not till the next system idle time. Which if you've > got one, you don't need a feature like this at all; you

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2012-10-05 Thread Tom Lane
Michael Paquier writes: > OK, so the problem here is that the relcache, as the syscache, are relying > on SnapshotNow which cannot be used safely as the false index definition > could be read by other backends. That's one problem. It's definitely not the only one, if we're trying to change an in

Re: [HACKERS] Deparsing DDL command strings

2012-10-05 Thread Tom Lane
Dimitri Fontaine writes: > Tom Lane writes: >> Why don't you just pass the original query string, instead of writing >> a mass of maintenance-requiring new code to reproduce it? > Do we have that original query string in all cases, including EXECUTE > like spi calls from any PL? As I said, I be

Re: [HACKERS] Deparsing DDL command strings

2012-10-05 Thread Dimitri Fontaine
Tom Lane writes: > Why don't you just pass the original query string, instead of writing > a mass of maintenance-requiring new code to reproduce it? Do we have that original query string in all cases, including EXECUTE like spi calls from any PL? What about commands that internally set a parsetre

Re: [HACKERS] 64-bit API for large object

2012-10-05 Thread Kohei KaiGai
Hi Anzai-san, The latest patch is fair enough for me, so let me hand over its reviewing for comitters. Thanks, 2012/10/1 Nozomi Anzai : > Here is 64-bit API for large object version 3 patch. > >> I checked this patch. It looks good, but here are still some points to be >> discussed. >> >> * I ha

Re: [HACKERS] Deparsing DDL command strings

2012-10-05 Thread Andres Freund
On Friday, October 05, 2012 04:24:55 PM Tom Lane wrote: > Andres Freund writes: > > On Friday, October 05, 2012 04:03:03 PM Tom Lane wrote: > >> Why don't you just pass the original query string, instead of writing > >> a mass of maintenance-requiring new code to reproduce it? > > > > Its not eas

Re: [HACKERS] ALTER command reworks

2012-10-05 Thread Alvaro Herrera
Kohei KaiGai escribió: > 2012/8/31 Kohei KaiGai : > > 2012/8/30 Robert Haas : > >> On Mon, Aug 13, 2012 at 3:35 PM, Kohei KaiGai wrote: > >>> Was it a right decision to track dependency of large object using > >>> oid of pg_largeobject, instead of pg_largeobject_metadata? > >>> IIRC, the reason w

Re: [HACKERS] Deparsing DDL command strings

2012-10-05 Thread Tom Lane
Andres Freund writes: > On Friday, October 05, 2012 04:03:03 PM Tom Lane wrote: >> Why don't you just pass the original query string, instead of writing >> a mass of maintenance-requiring new code to reproduce it? > Its not easy to know which tables are referenced in e.g. an ALTER TABLE > statem

Re: [HACKERS] Deparsing DDL command strings

2012-10-05 Thread Andres Freund
On Friday, October 05, 2012 04:03:03 PM Tom Lane wrote: > Dimitri Fontaine writes: > > So I have a Node *parsetree containing some CHECK and DEFAULT raw > > expressions to work with. Those can reference non existing tables, > > either to-be-created or already-dropped. > > Why don't you just pass

Re: [HACKERS] Deparsing DDL command strings

2012-10-05 Thread Tom Lane
Dimitri Fontaine writes: > So I have a Node *parsetree containing some CHECK and DEFAULT raw > expressions to work with. Those can reference non existing tables, > either to-be-created or already-dropped. Why don't you just pass the original query string, instead of writing a mass of maintenance

[HACKERS] FW: PQntuples and PQgetvalue problem.

2012-10-05 Thread zafer yagmuroglu
Hello, In my C++ program, i want to partition sql table, there is sample code below. It is working right. the problem is after func called 2 or 3 times in func1, PQntuples results 0 although tablename exist. Also when i disabled PQntuples at if statement, other psql function PQgetvalue

[HACKERS] Deparsing DDL command strings

2012-10-05 Thread Dimitri Fontaine
Hi, Working on the Event Trigger next patch series, one of the challenge to address is deparsing the DDL commands so that the User Defined Function used by the trigger definition has that information. I'm making good progress on that, it's some amount of code but pretty straightforward. The only

Re: [HACKERS] Missing OID define

2012-10-05 Thread Albe Laurenz
Phil Sorber wrote: > Thom Brown and I were doing some hacking the other day and came across > this missing define. We argued over who was going to send the patch in > and I lost. So here it is. +1 I have been missing this #define. Yours, Laurenz Albe -- Sent via pgsql-hackers mailing list (pg

Re: [HACKERS] Identity projection

2012-10-05 Thread Kyotaro HORIGUCHI
Hello, sorry for long absense, # I had unexpected and urgent time-consuming tasks... :-( I have had a bit more precise inspection by two aspects, and they seemd showing that the difference should be the execution time of ExecProject. I'll be able to back fully next week with reviesed patch, and