RE: Using SELECT as DDL/DML statement is wrong (was RE: [SQL] reinitialize a sequence?)

2000-12-06 Thread Michael Ansley
Title: RE: Using SELECT as DDL/DML statement is wrong (was RE: [SQL] reinitialize a sequence?) In fact, I would have thought that this could be done using ALTER SEQUENCE sequence_name SET property = value But, altering the database in a procedure called from a select is a design decision,

[SQL] what's wrong with my plperl function?

2000-12-06 Thread Bruno Boettcher
Hello, i am still at the same stage thanks to Oliver Elphick the plperl module is working, as a stand alone per program the thing works (sole difference, i use $toparse = shift; instead of the $toparse = $_[0]; in the sql-function here's the thing: CREATE FUNCTION cleanFromSep(text,tex

RE: Using SELECT as DDL/DML statement is wrong (was RE: [SQL] reinitialize a sequence?)

2000-12-06 Thread Edmar Wiggers
> But, altering the database in a procedure > called from a select is a design decision, > and if somebody wants to do it, well, it's > their problem. There may (on very few > occasions, one would hope) actually be some > good reasons to do this. Ok, it's their problem. But, as a DBA, I would l

Re: [SQL] what's wrong with my plperl function?

2000-12-06 Thread Tom Lane
Bruno Boettcher <[EMAIL PROTECTED]> writes: > so what am i doing wrong? I'm confused too... > besides how can i output debug stuff from the > perl script? print manifestingly doesn't work... I don't see why print wouldn't work. Realize however that it will go to the postmaster's stdout, so you

Re: [SQL] what's wrong with my plperl function?

2000-12-06 Thread Bruno Boettcher
On Wed, Dec 06, 2000 at 10:54:58AM -0500, Tom Lane wrote: > I'm confused too... :D > I don't see why print wouldn't work. Realize however that it will > go to the postmaster's stdout, so you'd better not have started the yep found it in the log > Also, it looks like plperl supports elog(NOT

Re: [SQL] what's wrong with my plperl function?

2000-12-06 Thread Bruno Boettcher
On Wed, Dec 06, 2000 at 05:52:13PM +0100, Bruno Boettcher wrote: > $work =~s/\.//g; ehm yeah stupid me... think i even read it somewhere in the docu should be $work =~ s/\\.//g; :( at least it works now... -- ciao bboett == [EMAIL

[SQL] CallableStatement

2000-12-06 Thread Shane McEneaney
Hi Thomas, thanks for taking the time to respond. If I try to use a CallableStatement object in Java using Posgresql driver included in PostgreSQL 7.0.2. I get an SQLException which includes the message; "Callable Statements are not supported at this time. " snippet of code

Re: [SQL] subselects

2000-12-06 Thread Joseph Shraibman
hubert depesz lubaczewski wrote: > > On Wed, Nov 29, 2000 at 07:03:36PM -0500, Joseph Shraibman wrote: > > I tried to do this: > > SELECT r , a , (SELECT u , re FROM dir WHERE u = a) , cdate FROM rep > > WHERE m IN(190); > > why dont you use simple join? > like: > select rep.r, rep.a, rep.cdate

[SQL] CallableStatement

2000-12-06 Thread Shane McEneaney
Hi, can anybody tell me where I can get a free JDBC driver for Postgresql that implements CallableStatement? The driver in the distribution I have is PostgreSQL 7.0.2. Thanks in advance, Shane