[HACKERS] Does "postmaster -i"...

2001-10-18 Thread Thomas Lockhart
... work for you with code built from the cvs tip? I did an update and build tonight and see myst$ postmaster -i postgres: invalid option -- r Usage: postgres -boot [-d] [-D datadir] [-F] [-o file] [-x num] dbname -d debug mode -D datadir data directory -F

Re: [HACKERS] date/time improvements for 7.2

2001-10-18 Thread Tom Lane
Thomas Lockhart <[EMAIL PROTECTED]> writes: > Are there places which decline to call a "normalization > routine" if typmod is less than zero, rather than equal to -1? The format_type routines think that typmod < 0 means "no typmod specified". I am not sure where else this may be true, but I'm pr

Re: [HACKERS] date/time improvements for 7.2

2001-10-18 Thread Thomas Lockhart
> > Implement precision for the INTERVAL() type. > > Use the typmod mechanism for both of INTERVAL features. > If I could figure out what the typmod of an interval type is defined > to be, I'd fix format_type() to display the type name properly so that > pg_dump would do the right thing. But it

Re: [HACKERS] date/time improvements for 7.2

2001-10-18 Thread Tom Lane
Thomas Lockhart <[EMAIL PROTECTED]> writes: > Implement precision for the INTERVAL() type. > Use the typmod mechanism for both of INTERVAL features. If I could figure out what the typmod of an interval type is defined to be, I'd fix format_type() to display the type name properly so that pg_dump

Re: [HACKERS] ODBC SQLBindParameter and UNICODE strings

2001-10-18 Thread Hiroshi Inoue
Andy Hallam wrote: > > Apologies if you think this mail is a little long-winded but I want to be as > clear as possible on this. > > PostgreSQL - 7.1.3 (installed on Linux 2.4.2-2) > PSQLODBC.DLL - 07.01.0007 > Visual C++ - 6.0 > > I have a C++ app running on WINDOWS2000 and I am trying to use

Re: [HACKERS] PQstatus() detect change in connection...

2001-10-18 Thread Tom Lane
Matthew Hagerty <[EMAIL PROTECTED]> writes: > but I also want to check the connection > *before* submitting a query... This strikes me as utterly pointless. You'll need to be able to recover from query failure anyway, so what's the value of testing beforehand? Send the query and see if it works

Re: [HACKERS] PQstatus() detect change in connection...

2001-10-18 Thread Matthew Hagerty
At 02:10 PM 10/18/2001 -0400, Tom Lane wrote: >Matthew Hagerty <[EMAIL PROTECTED]> writes: > > Anyone know a good *fast* way to test > > if a socket is still valid? > >What exactly are you trying to defend against? > >In general, I don't believe that there is any way of discovering whether >the se

Re: [HACKERS] Package support for Postgres

2001-10-18 Thread Peter Eisentraut
Bill Studenmund writes: > Honestly, I do not understand why "global variables" have been such a sore > point for you. My point is that the proposed "package support" introduces two features that are a) independent, and b) already exist, at least in design. Schemas are already planned as a namesp

Re: [HACKERS] PQstatus() detect change in connection...

2001-10-18 Thread Peter Eisentraut
Matthew Hagerty writes: > I am trying to re-establish a connection, however, I cannot afford to issue > a query to determine if the connection still exists. But requesting that the server do something *is* the only way to know whether it's still alive. Another question to ask, of course, would

Re: [HACKERS] autoconf taking forever?

2001-10-18 Thread Peter Eisentraut
bpalmer writes: > I'm working on making some changes to the top level configure.in and m4 > has now been running for 17 minutes on a 1.4G tbird. Am I missing > something or is this know to take forever? For me, the autoconf run is "instantaneous". Make sure you're using Autoconf 2.13, and you

Re: [HACKERS] Create or replace function doesn't work so well

2001-10-18 Thread Gavin Sherry
Peter, On Thu, 18 Oct 2001, Peter Eisentraut wrote: > peter=# drop function test(); > DROP > [snip] > The same can be observed with PL/Tcl and PL/Python, but not with PL/pgSQL > and plain SQL. Obviously, there is some caching going on, and a session > restart fixes everything, but the failur

Re: [HACKERS] autoconf taking forever?

2001-10-18 Thread Dan
I always found with new machines and configure scripts is if gethostname does not resolve then the autoconfig will hang. I would make sure your /etc/resolve.conf /etc/hosts , hostname domainname are setup right and resolve from the command line.man gethostbyname On Thu, 18 Oct 2001, Tom L

Re: [HACKERS] Create or replace function doesn't work so well

2001-10-18 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > The same can be observed with PL/Tcl and PL/Python, but not with PL/pgSQL > and plain SQL. Obviously, there is some caching going on, and a session > restart fixes everything, but the failure with this plain and simple test > case makes me wonder abo

Re: [HACKERS] compiling libpq++ on Solaris with Sun SPRO6U2 (fixed

2001-10-18 Thread Peter Eisentraut
Lee Kindness writes: > For your information I've attached the man page for the Sun C > compiler, which explicitly lists the -h and -R flags. I didn't read much farther than acc (SPARC only) is not intended to be used directly on Solaris 2.x. ;-) -- Peter Eisentraut [EMAIL P

Re: [HACKERS] Package support for Postgres

2001-10-18 Thread Bill Studenmund
On Thu, 18 Oct 2001, Peter Eisentraut wrote: > Bill Studenmund writes: > > > Could you please give me an example of how to do this, say for plperl or > > plpython? Just showing how two functions made with CREATE FUNCTION can use > > global variables will be fine. This example will help me underst

Re: [HACKERS] may be bug in pg_dumpall in 7.0.3

2001-10-18 Thread Tom Lane
"Korshunov Ilya" <[EMAIL PROTECTED]> writes: >> ./pg_dumpall -h baze.zenon.net -p 63010 -u > $HOME/pg_dumpall I think you'll need to set PGHOST and PGPORT to get that old version of pg_dumpall to work. Current sources seem to do this better. regards, tom lane --

Re: [HACKERS] Package support for Postgres

2001-10-18 Thread Peter Eisentraut
Bill Studenmund writes: > Could you please give me an example of how to do this, say for plperl or > plpython? Just showing how two functions made with CREATE FUNCTION can use > global variables will be fine. This example will help me understand how > they work. For PL/Tcl you use regular Tcl gl

[HACKERS] date/time improvements for 7.2

2001-10-18 Thread Thomas Lockhart
Accept an INTERVAL argument for SET TIME ZONE per SQL99. Modified the parser and the SET handlers to use full Node structures rather than simply a character string argument. I've implemented and committed changes to improve the feature set for INTERVAL, as well as making other bug fixes and impr

Re: [HACKERS] pg_sorttemp files

2001-10-18 Thread Tom Lane
[EMAIL PROTECTED] (D'Arcy J.M. Cain) writes: > I have tons of old files with names like base/db/pg_sorttemp.##. I > assume that they are temporary sorting files but somehow they never got > cleared out. Is it safe to delete these from a running system. The files > are months old. The firs

Re: [HACKERS] PQstatus() detect change in connection...

2001-10-18 Thread Tom Lane
Matthew Hagerty <[EMAIL PROTECTED]> writes: > Anyone know a good *fast* way to test > if a socket is still valid? What exactly are you trying to defend against? In general, I don't believe that there is any way of discovering whether the server is still up, other than to send it a query. (FWIW

Re: [HACKERS] ecpg - GRANT bug

2001-10-18 Thread Bruce Momjian
Michael will apply the required patches. > Tom Lane writes: > > Uh, isn't the correct fix > > ! $$ = cat_str(8, make_str("grant"), $2, make_str("on"), $4, $5, > > make_str("to"), $7, $8); > > ISTM your patch loses the opt_with_grant clause. (Of course the > > backend doesn't currently acce

[HACKERS] Create or replace function doesn't work so well

2001-10-18 Thread Peter Eisentraut
peter=# drop function test(); DROP peter=# create or replace function test() returns int as 'return 1;' language plperl; CREATE peter=# select test(); test -- 1 (1 row) peter=# create or replace function test() returns int as 'return 2;' language plperl; CREATE peter=# select test(); t

Re: [HACKERS] autoconf taking forever?

2001-10-18 Thread Tom Lane
bpalmer <[EMAIL PROTECTED]> writes: > I'm working on making some changes to the top level configure.in and m4 > has now been running for 17 minutes on a 1.4G tbird. Am I missing > something or is this know to take forever? Something's broken. autoconf executes in about 3 seconds on my machine,

[HACKERS] may be bug in pg_dumpall in 7.0.3

2001-10-18 Thread Korshunov Ilya
Hello Trying to dump all databases > ./pg_dumpall -h baze.zenon.net -p 63010 -u > $HOME/pg_dumpall   Get error :psql: connectDBStart() -- connect() failed: No such file or directory    Is the postmaster running at 'localhost'    and accepting connections on Unix socket '5432'?psql:

Re: [HACKERS] ecpg - GRANT bug

2001-10-18 Thread Bruce Momjian
> > On Tue, Oct 16, 2001 at 10:16:38AM +0100, Lee Kindness wrote: > > > Patch below, it changes: > > > ... > > > > I just added this to my sources. Will commit in a few minutes. > > Michael, I will let you apply the ecpg patches you desire. I have removed all the ecpg patches from the unapplied

Re: [HACKERS] ecpg - GRANT bug

2001-10-18 Thread Bruce Momjian
Michael will apply the required patches. > Bruce Momjian writes: > > Lee Kindness writes: > > > In which case a number of other cases should be weeded out of > > > parser.y and passed onto the backend: > > > [ snip ] > > > Let me known if you want a patch for these cases too. > > Sure, sen

[HACKERS] How do I get a list of DB's or Tables with a postgres SQL statement?

2001-10-18 Thread Lee Kindness
See the pg_database table: http://www.postgresql.org/idocs/index.php?catalog-pg-database.html Regards, Lee. Ron de Jong writes: > All, > > How do I get a list of DB's or Tables with a postgres SQL statement? > It needs to be an SQL statement otherwise perl/DBI/prepare won't parse it. > I

[HACKERS] ODBC SQLBindParameter and UNICODE strings

2001-10-18 Thread Andy Hallam
Apologies if you think this mail is a little long-winded but I want to be as clear as possible on this. PostgreSQL - 7.1.3 (installed on Linux 2.4.2-2) PSQLODBC.DLL - 07.01.0007 Visual C++ - 6.0 I have a C++ app running on WINDOWS2000 and I am trying to use SQLBindParamater with a unicode (wcha

Re: [HACKERS] compiling libpq++ on Solaris with Sun SPRO6U2 (fixed

2001-10-18 Thread Denis A Ustimenko
On Wed, 17 Oct 2001, Peter Eisentraut wrote: > Denis A Ustimenko writes: > > [change -Wl,-R to -R and -Wl,-h to -h] > > I'm having a difficult time understanding this. Both -R and -h are linker > options, not compiler options. So while the compiler driver might be nice Oh, no Peter: denis@t

Re: [HACKERS] ecpg - GRANT bug

2001-10-18 Thread Bruce Momjian
> On Tue, Oct 16, 2001 at 10:16:38AM +0100, Lee Kindness wrote: > > Patch below, it changes: > > ... > > I just added this to my sources. Will commit in a few minutes. Michael, I will let you apply the ecpg patches you desire. -- Bruce Momjian| http://candle.pha.pa.u

[HACKERS] How do I get a list of DB's or Tables with a postgres SQL statement?

2001-10-18 Thread Ron de Jong
All, How do I get a list of DB's or Tables with a postgres SQL statement? It needs to be an SQL statement otherwise perl/DBI/prepare won't parse it. I know there is some funtions in psql: \l(show databases) \d(show tables) which work fine from psql, but these statements won't be parsed

Re: [HACKERS] ecpg - GRANT bug

2001-10-18 Thread Michael Meskes
[Sorry, for the late replies, but I was on the road since Sunday.] On Mon, Oct 15, 2001 at 10:10:40AM -0400, Tom Lane wrote: > Lee Kindness <[EMAIL PROTECTED]> writes: > > The existing code in ecpg/preproc/preproc.y to handle the WITH option > > simply throws an error and aborts the processing...

Re: [HACKERS] ecpg - GRANT bug

2001-10-18 Thread Michael Meskes
On Tue, Oct 16, 2001 at 10:27:42AM +0100, Lee Kindness wrote: > And the patch below corrects a pet peeve I have with ecpg, all errors > and warnings are output with a line number one less than reality... I wish I knew where this comes from. I've been trying to track this bug down for years now, b

Re: [HACKERS] ecpg - GRANT bug

2001-10-18 Thread Michael Meskes
On Tue, Oct 16, 2001 at 10:16:38AM +0100, Lee Kindness wrote: > Patch below, it changes: > ... I just added this to my sources. Will commit in a few minutes. Michael -- Michael Meskes [EMAIL PROTECTED] Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL! -

Re: [HACKERS] How do I get a list of DB's or Tables with a postgres SQL statement?

2001-10-18 Thread Alessio Bragadini
Ron de Jong wrote: > I know there is some funtions in psql: > > \l(show databases) > \d(show tables) If you start psql with the -E option, it will show you which queries it makes to the internal tables to retrieve the backslash result. Then copying and customizing your own query is very

Re: [HACKERS] compiling libpq++ on Solaris with Sun SPRO6U2 (fixed

2001-10-18 Thread Lee Kindness
It's really quite simple, the Sun C compiler (acc) does not understand the -Wl flag, rather it passes the -R and -h options onto the linker verbatim. Given the only two (realistic) compiler choices under Solaris are gcc and acc it makes sense to support then both 'out of the box'. I keep a simil