Re: [GENERAL] plpgsql direct from C?

2006-02-04 Thread Doug McNaught
"James Harper" <[EMAIL PROTECTED]> writes: > Is there an API method to be able to execute pl/pgsql (or any other > language) code directly from C? > > Eg (please excuse the line wrapping, and the fact that this doesn't > represent a case where this would actually be useful!) > > result = PQexecPL(

[GENERAL] plpgsql direct from C?

2006-02-04 Thread James Harper
Is there an API method to be able to execute pl/pgsql (or any other language) code directly from C? Eg (please excuse the line wrapping, and the fact that this doesn't represent a case where this would actually be useful!) result = PQexecPL("plpgsql", "IF $1 = 'xyzzy" THEN SELECT * FROM fnord END

Re: [GENERAL] information_schema.columns.column_default filtered based on user

2006-02-04 Thread Tom Lane
"George Pavlov" <[EMAIL PROTECTED]> writes: > Looking at the information_schema.columns view I have been wondering why > it only shows the column_default for columns in tables owned by the > current user? Because that's what the SQL99 spec says it should do. The SQL2003 spec seems to have a loose

Re: [GENERAL] Error with temporary tables

2006-02-04 Thread Tom Lane
Claire McLister <[EMAIL PROTECTED]> writes: > Thanks. So, the hack we did is okay then? Does using the substring > function de-TOAST it? Yeah, that should work till we think of a proper fix. regards, tom lane ---(end of broadcast)---

[GENERAL] information_schema.columns.column_default filtered based on user

2006-02-04 Thread George Pavlov
Looking at the information_schema.columns view I have been wondering why it only shows the column_default for columns in tables owned by the current user? Makes things a bit misleading. I am thinking at least superusers should be able to see that? This is what I am talking about: CREATE OR REPLA

Re: [GENERAL] Error with temporary tables

2006-02-04 Thread Claire McLister
Thanks. So, the hack we did is okay then? Does using the substring function de-TOAST it? On Feb 4, 2006, at 11:24 AM, Tom Lane wrote: Claire McLister <[EMAIL PROTECTED]> writes: This was all working fine until E.Value became some large strings with some occasional funny characters. The h

Re: [GENERAL] Error with temporary tables

2006-02-04 Thread Tom Lane
Claire McLister <[EMAIL PROTECTED]> writes: > This was all working fine until E.Value became some large strings > with some occasional funny characters. > The hack that solved the problem was: > R.Field := substring(E.Value from 1); > This is a complete hack, so I'd like to find out what i

Re: [GENERAL] Error with temporary tables

2006-02-04 Thread Claire McLister
Thanks. Actually, I had read the FAQ, and was correctly using the 'EXECUTE' form of creating a temporary table. (If that had been the problem, it would not have been working for a while.) It turns out, the problem was a strange one. The function was returning a set of records and one of t

Re: [GENERAL] Bug with sequences and WAL ?

2006-02-04 Thread Philippe Ferreira
To get "exact" restart behavior we'd need to emit a separate xlog record for each nextval() command, which seems like a pretty high price considering that you cannot assume no holes in the sequence values anyway. Hi, Why not give the choice at compile-time ? Philippe.

Re: [GENERAL] Should I use PL/PGSQL or Perl/PGSQL?

2006-02-04 Thread Martijn van Oosterhout
On Fri, Feb 03, 2006 at 07:32:25PM -0800, Tyler MacDonald wrote: > I've been wondering, does anybody know which is more likely to be > installed on a postgresql server? Which is faster? I'm writting an > application in perl that is going to need to get broad information about > heiarchial dat

Re: [GENERAL] Bug with sequences and WAL ?

2006-02-04 Thread Philippe Ferreira
I don't think this is very important, because the normal behavior of sequences is that after a crash the sequence can be up to 32 (IIRC) counts beyond the last value actually delivered before the crash. To get "exact" restart behavior we'd need to emit a separate xlog record for each nextval() c