[BUGS] Compile fail on 7.1b6 on cygwin with --enable-cassert

2001-03-23 Thread pgsql-bugs

stuart ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
Compile fail on 7.1b6 on cygwin with --enable-cassert

Long Description
Postgresql-7.1beta6
uname -srm
CYGWIN_98-4.10 1.1.7(0.31/3/2) i586
spec:
win98SE, PIII 733MHz, 64MB
Having configured with ./configure --enable-cassert
when I make I get an error:
$make

gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations  -I. 
-I../../../../src/include -I/usr/local/include  -c -o pl_funcs.o pl_funcs.c
dlltool --export-all --output-def plpgsql.def pl_parse.o pl_handler.o pl_comp.o 
pl_exec.o pl_funcs.o
dllwrap -o plpgsql.dll --dllname plpgsql.dll --def plpgsql.def pl_parse.o pl_handler.o 
pl_comp.o pl_exec.o pl_funcs.o ../../../../src/utils/dllinit.o  
-L../../../../src/backend -lpostgres -lcygipc -lcygwin -lcrypt -lkernel32 
pl_exec.o(.text+0x709):pl_exec.c: undefined reference to `assert_enabled'
pl_exec.o(.text+0x730):pl_exec.c: undefined reference to `FailedAssertion'
collect2: ld returned 1 exit status
dllwrap: gcc exited with status 1
make[4]: *** [libplpgsql.a] Error 1
make[4]: Leaving directory `/usr/src/postgresql-7.1beta6/src/pl/plpgsql/src'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/usr/src/postgresql-7.1beta6/src/pl/plpgsql'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/postgresql-7.1beta6/src/pl'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/postgresql-7.1beta6/src'
make: *** [all] Error 2

I have also included the full configure and make output (in the example code bit) - no 
I havn't this form only accepts 8140bytes (time for 7.1 I think :)
If any one wants the full configure and make output I can send them on.

Sample Code



No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



Re: [BUGS] Compile fail on 7.1b6 on cygwin with --enable-cassert

2001-03-23 Thread Tom Lane

[EMAIL PROTECTED] writes:
> dllwrap -o plpgsql.dll --dllname plpgsql.dll --def plpgsql.def pl_parse.o 
>pl_handler.o pl_comp.o pl_exec.o pl_funcs.o ../../../../src/utils/dllinit.o  
>-L../../../../src/backend -lpostgres -lcygipc -lcygwin -lcrypt -lkernel32 
> pl_exec.o(.text+0x709):pl_exec.c: undefined reference to `assert_enabled'
> pl_exec.o(.text+0x730):pl_exec.c: undefined reference to `FailedAssertion'
> collect2: ld returned 1 exit status

Hm.  Looks like these variables need to be marked DLLIMPORT.  Thanks for
the report.

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[BUGS] return error from date_part

2001-03-23 Thread pgsql-bugs

Antonio Murillo ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
return error from date_part

Long Description
I've Postgres 7.02, run in Linux "RedHat 7.0 i386".
When I have a specific select, only whitch this date return a error.

"SELECT date_part('day',fecha) AS day FROM fecha;

 day |   fecha
-+
  24 | 2001-03-25
(1 row)

Sample Code
SET DATESTYLE TO 'European';
CREATE TABLE "fecha" (
"idfecha" int4 NOT,
"fecha" date
); 
INSERT into fecha (idfecha,fecha) VALUES(1,'25/3/2001');
SELECT date_part('day',fecha) AS day FROM fecha;


No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [BUGS] return error from date_part

2001-03-23 Thread Tom Lane

[EMAIL PROTECTED] writes:
> When I have a specific select, only whitch this date return a error.

> "SELECT date_part('day',fecha) AS day FROM fecha;

>  day |   fecha
> -+
>   24 | 2001-03-25
> (1 row)

Is that a daylight-savings-time transition day in your timezone?
If so, this is a known bug in date-to-timestamp conversion (try
"SELECT fecha::timestamp" to see what's going on).

It's fixed in 7.1.

regards, tom lane

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



Re: [BUGS] 7.0.3 postmaster memory leak with aborted transactions

2001-03-23 Thread Tom Lane

Richard Ellis <[EMAIL PROTECTED]> writes:
> Watch the resident set size of the postmaster that the psql is connected
> to as the while loop pumps data into psql.  As transactions are aborted,
> the RSS of the postmaster continues to grow.  Looks like postmaster is
> leaking memory somewhere.

Seems to be fixed in 7.1.

regards, tom lane

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [BUGS] NetBSD 1.4.2/i386 needs to link psql with -ltermcap

2001-03-23 Thread Giles Lean


Peter Eisentraut wrote

> This should be detected by configure.  E.g., on my system I get
> 
> | checking for readline... yes (-lreadline -ltermcap)
> 
> (-lreadline and -ledit are equivalent for computational purposes).

On NetBSD-1.4.2 is that the link test works with -ledit, and indeed
psql built without -ltermcap will even run non-interactively (I loaded
a database with it) but it fails when running interactively.

config.log:

configure:3143: checking for readline
configure:3165: gcc -o conftest -O2 -pipe conftest.c -lreadline  1>&5
ld: -lreadline: no match
collect2: ld returned 1 exit status
configure: failed program was:
#line 3154 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply.  */
char readline();

int main() {
readline()
; return 0; }
configure:3165: gcc -o conftest -O2 -pipe conftest.c -ledit  1>&5
configure:3192: checking for library containing using_history
configure:3210: gcc -o conftest -O2 -pipe conftest.c -ledit  1>&5
...

It would be nicer if the link failed. :-(

Actually running the program above:

/usr/libexec/ld.so: Undefined symbol "_tgetent" called from
conf:/usr/lib/libed\ it.so.2.2 at 0x4002d2ac

ldd doesn't show problems:

conf:
-ledit.2 => /usr/lib/libedit.so.2.2 (0x4001b000)
-lc.12 => /usr/lib/libc.so.12.40 (0x4002f000)

I'm now out of my depth with both configure and linker behaviour. :-(

Regards,

Giles



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]