[SQL] Bug reports for 7.1 beta?

2001-02-07 Thread Josh Berkus
Folks, Where do I send bug reports for 7.1 beta? I;'ve looked on the web site, and don't see an address or bugtraq forum. -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___

Re: [SQL] PL/pgsql EXECUTE 'SELECT INTO ...'

2001-02-07 Thread Josh Berkus
ral functions ... my search routines will be hard to run without it. Perhaps you could turn off EXECUTE by default, but allow it as a compile-time option for those of us wise enough to understand the dangers? -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Complete inform

Re: [SQL] Re: Query never returns ...

2001-02-08 Thread Josh Berkus
. -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293 for law firms, small businesses

Re: [SQL] PL/PGSQL function with parameters

2001-02-08 Thread Josh Berkus
edule projects, I'd offer to write this up for the User's Manual. Actually, consider that a medium-term commitment ... before the end of the year, I'll write a much longer PL/pgSQL chapter which Jan can review & correct. (I think I'm in a postion to do so, as the curren

Re: [SQL] How to make operator class?

2001-02-10 Thread Josh Berkus
er. You can't get that by scanning an index > that has both columns in the same order... Aha. I see the problem. My approach would be to use two seperate indexes, but maybe that's not sophisticated enough :-) And, Tom, you're working too hard again. It's Saturday. Go home.

[SQL] 16 Argument Limit ?!?!?

2001-02-10 Thread Josh Berkus
way around this? Maybe something using the RECORD data type? Can anyone help me with an explanation of the RECORD data type and how to get data into and out of it? -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Compl

Re: [SQL] plpgsql grief

2001-02-12 Thread Josh Berkus
bjtbl, et, event, > time, reason, > owner) values ('' || $2 || '', '' || $3 || '', '' || $4 || '', '' || $5 || '', current_timestamp, '' || $6 || '', '' || $7 || '&#x

Re: [SQL] plpgsql grief

2001-02-12 Thread Josh Berkus
t; Just thought the built in procedure implmentation would be quite mature > by now. Implementation is in its adolescence/young adulthood. Documentation is still in its early childhood. We (the user base) will fix that, but not this month. -Josh Berkus -- __AGLIO DATA

Re: [SQL] plpgsql grief

2001-02-12 Thread Josh Berkus
tell me where to search) the developer notes on what improvements have been made in the function parser so that I can take advantage of them? -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology

Re: [SQL] plpgsql grief

2001-02-12 Thread Josh Berkus
a way to insert queries into temporary tables. For better results, check out Jan's syntax for FOR ... EXECUTE in his last post. -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technolo

Re: [SQL]how to select * from database1 table,database2 table

2001-02-14 Thread Josh Berkus
o so. I would also suggest that you review your data architecture and see if it's really necessary for you to store your data in two seperate databases. -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complet

Re: [SQL] Re: Trigger question

2001-02-14 Thread Josh Berkus
InsertTime field is not open to user input, why are you providing users with a data-entry interface for this field at all? Why not hide it, or display it read-only? -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___

Re: [SQL] problem with casting

2001-02-15 Thread Josh Berkus
e DB engine doesn't know how you want to format the date. Instead, use the to_char builtin function, as defined in the docs: http://www.postgresql.org/users-lounge/docs/7.0/postgres/functions2976.htm Share & Enjoy! -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___

Re: [SQL] Data Types

2001-02-16 Thread Josh Berkus
David, > However this gives me output that I don't know how to read: '7 02:34:27' > Does that read as 7 Days, 2 Hours, 34 Minutes and 27 seconds? Yes. -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Jo

[SQL] Huh? Mysterious Function Error

2001-02-20 Thread Josh Berkus
ected SELECT query in exec_stmt_execsql() Help? -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data manag

Re: [SQL] Huh? Mysterious Function Error

2001-02-20 Thread Josh Berkus
Tom, Stephan, > Josh Berkus <[EMAIL PROTECTED]> writes: > > ERROR: unexpected SELECT query in exec_stmt_execsql() > > plpgsql doesn't think you should execute bare SELECTs, only SELECT INTO. That would explain it. I have a nested function call in the form: SELEC

[SQL] two tables - foreign keys referring to each other...]

2001-02-21 Thread Josh Berkus
or Mere Mortals") before proceeding any further, or you'll end up spending the next year paying for what you don't understand now. -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___

Re: [SQL] Can a function return a record set?

2001-02-23 Thread Josh Berkus
in the current development version. Please browse the archives (about 1-2 months ago) for my suggested workaround for the time being. -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology

Re: [SQL] DLookup('field', 'table', ['condition'])

2001-02-27 Thread Josh Berkus
u would probably be better off in several regards constructing a specific function to fill that purpose (lf_lookup_student_id(VARCHAR)). Personally, I'm a function "junkie" an I've never had need to replicate the VBA Dlookup functionality. -Josh Berkus -- __AGLIO DATA

[SQL] Updatable Views

2001-02-28 Thread Josh Berkus
is 7.1 expected to be out of beta? -Josh Berkus P.S. Let me suggest again that you let us application developer-types field the newbie questions so that you can focus on the hard issues and developing the database engine. -- __AGLIO DATABASE

Re: [SQL] mysql's "replace into..."

2001-02-28 Thread Josh Berkus
field2 = variable2, field3 = variable3 WHERE primarykey = primarykey_variable; END IF; -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED]

[SQL] Re: [PHP] novice question

2001-02-28 Thread Josh Berkus
inners"(Osborne), "Linux Administration"(O'Reilly) and "Linux in a Nutshell" (O'Reilly). And I still hire specialists for complex networking. Good Luck! -Josh Berkus __AGLIO DATABASE SOLUTIONS___

Re: [SQL] mysql's "replace into..."

2001-02-28 Thread Josh Berkus
; if the results are NULL, do an insert. If your table has few fields (<15) you can even do this through a function, passing the field values as parameters of the function. -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___

Re: [SQL] Weird NOT IN effect with NULL values

2001-03-01 Thread Josh Berkus
nt to consider editing your next edition to include the above modification. WHERE ... NOT IN is a bad idea for any subselect on medium-large tables. -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete informat

[SQL] Re: From mailing list: PL/PGSQL returning recordset

2001-03-04 Thread Josh Berkus
. Futher, in a low-transaction situation, the searches table may be used for all searches in the DB on tables with INT4 primary keys. -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technolog

[SQL] No Documentation for to_char(INTERVAL, mask)

2001-03-05 Thread Josh Berkus
splay? -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293 for law firms, small busin

Re: [SQL] How to count elements in an array?

2001-03-05 Thread Josh Berkus
array_loop] LOOP array_loop = array_loop + 1; END LOOP; array_loop := array_loop - 1 RETURN array_loop; END;' LANGUAGE 'plpgsql'; -Josh -- __AGLIO DATABASE SOLUTIONS__

Re: [SQL] No Documentation for to_char(INTERVAL, mask)

2001-03-06 Thread Josh Berkus
I'll post the PLPGSQL function to the list after I write it. -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data

[SQL] Quick question MySQL --> PgSQL

2001-03-06 Thread Josh Berkus
something that isn't strictly a SQL question, but I'm not sure where else to ask. -Josh Berkus P.S. If somebody wants consulting $$$ for the above, it may be available. -- __AGLIO DATABASE SOLUTIONS_

Re: [SQL] No Documentation for to_char(INTERVAL, mask)

2001-03-07 Thread Josh Berkus
s over budget and behind schedule already. I'll take a stab at in in PLPGSQL and post the results. -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete informati

Re: [SQL] No Documentation for to_char(INTERVAL, mask)

2001-03-08 Thread Josh Berkus
CT CASE (which we should call 'SELECT MATCH') statement in PL/pgSQL? Different from the CASE that allows you to select column values in the SELECT clause, SELECT MATCH would be an IF ... THEN style structure offering an indefinite numebr of options. I'm sure that

[SQL] List Concatination

2001-03-08 Thread Josh Berkus
s that there are actually two sub-tables with thousands of entries and the procedural approach is rather slow. Suggestions? -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berku

Re: [SQL] List Concatination

2001-03-09 Thread Josh Berkus
ither of these options sounds like it would be faster and more scalable than a simple PL/pgSQL function which loops throught the names and appends them to a string. Perhaps for Phase II of our project I'll be able to afford somebody to write a custom aggregat

Re: [SQL] cannot get CREATE TABLE AS to work

2001-03-09 Thread Josh Berkus
; AS select o.ra, o.decl, o.mag, o.smag, o.file_id from > observations o; -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415)

Re: [SQL] cannot get CREATE TABLE AS to work

2001-03-09 Thread Josh Berkus
less you have 2 dozen indexes on the target table. -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data managemen

Re: [SQL] cannot get CREATE TABLE AS to work

2001-03-09 Thread Josh Berkus
stead of CREATE TABLE AS. -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293 for law firms, small businesses

Re: [SQL] cannot get CREATE TABLE AS to work

2001-03-09 Thread Josh Berkus
integrity check deferrable (there's a way to do this, it was discussed a couple weeks ago - ask Tom). -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED

Re:[SQL] Comparing Dates

2001-03-12 Thread Josh Berkus
David, Please post your tabledefs and the full query definition. Aside from the need for an explicit typecast (i.e. '2000-03-02'::date) and the lack of clarity on month vs. day (March 2 or February 3?), seeing the whole picture would help. -Josh Berkus __AGLI

Re: [SQL] default value syntax - pg compared to?

2001-03-12 Thread Josh Berkus
ou should be aware that the pgODBC driver for Win32 clients does not recognize PostgreSQL sequences correctly when called as default vaues for other than a SERIAL field (i.e. if you use the DEFAULT NEXTVAL('sequence') construction rather than the SERIAL type, pgODBC will error out on IN

[SQL] Cannot declare arrays?

2001-03-12 Thread Josh Berkus
and even: level_array MONEY[100]; Please help! -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293

Re: [SQL] PL/pgSQL "compilation error"

2001-03-14 Thread Josh Berkus
WHERE group_artifact_id=new.group_artifact_id; END IF; END IF; END IF; END IF; END IF; RETURN NEW; END; -Josh -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete informa

[SQL] FETCH ... INTO in PL/pgSQL

2001-03-14 Thread Josh Berkus
Tom, Bruce, Is there any way to make use of the contents of a cursor in a PL/pgSQL function? FETCH ... INTO isn't supported, according to the docs. Can I use the dot notation, or something similar? -Josh -- __AGLIO DAT

Re: [SQL] PIVOT of data

2001-03-14 Thread Josh Berkus
IN as above into the query for each value in your array. This method is a lot of work for both you and the server. Why do you think that MS Access often crashes on a large "crosstab" query? -Josh Berkus __AGLIO DATABASE SOLUTIONS___

Re: [SQL] Some questions about PLpgSql

2001-03-15 Thread Josh Berkus
r samples for PLpgsql except USER GUIDE and > PostgreSQL Introduction & concept? No. Some of us user-types are working on expanded documentation; until then, you'll just have to muddle through. -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___

Re: [SQL] List Concatination

2001-03-15 Thread Josh Berkus
e was > quite surprised that it worked, so no guarantees about long-term suitability. Hmmm ... this feature is very, very, useful now that I know how to use it. I'd love to see it hang around for future versions of PgSQL. Tom? -Josh Berkus -- ______AGLIO DATABASE SOLUTIONS___

[SQL] Re: Normalization is always good?

2001-03-15 Thread Josh Berkus
this > in depth? Yup. http://www.databasedebunking.com/ Dig through the archives. -Josh Berkus -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management s

Re: [SQL] Re: Normalization is always good?

2001-03-15 Thread Josh Berkus
tables, depending on user configuration. The wonderful PostgreSQL sequence handler makes this possible. Thanks, Tom & team! I've done this with a couple of other tables. Not relationally correct, but I can't find anything wrong with the idea. > Couldn't find the server... I w

Re: [SQL] List Concatination

2001-03-16 Thread Josh Berkus
that's working perfectly but I'll keep you posted. > If > you > were joining words in a sentence, obviously it would matter (unless > you > were on usenet ;-) illiterate posters newsgroup most calling you are? -Josh Berkus __AGLIO DATABASE SOLUTIONS___

Re: [SQL] List Concatination

2001-03-16 Thread Josh Berkus
Hey, why do you think that I was bugging you about 7.1 for months? You should see some of the things I do with sub-selects. Err ... programming-wise, that is ;-) Speaking of which, when's the 7.1 release? -Josh __AGLIO DATABASE SOLUTIONS_

Re: [SQL] What do I do with this error?

2001-03-18 Thread Josh Berkus
NULL was the pattern. Is this a bug? -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293 for law firms, small

Re: [SQL] What do I do with this error?

2001-03-18 Thread Josh Berkus
ETURN return_value; END; -Josh __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293 for law firms, small businessesfax 62

Re: [SQL] What do I do with this error?

2001-03-19 Thread Josh Berkus
n & view decarations to a text file? I'm using pgaccess mostly for development, but it doesn' let me cut-and-paste. -Josh Berkus ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-noma

Re: [SQL] What do I do with this error?

2001-03-19 Thread Josh Berkus
ds like what I'm seeing! And now that you point it out, there is a bug in the PHP that calls this function that passes an empty string ('') instead of a NULL. Thanks! Any possibility that that error message could be made more informative? (i.e. ERROR: regcomp failed due to e

Re: [SQL] What do I do with this error?

2001-03-19 Thread Josh Berkus
Tom, > You're right, this isn't a very transparent message. Perhaps > > ERROR: Invalid regular expression (empty expression or > subexpression) > > Comments, better wordings? Nope. That's great. -Josh Berkus __AGLIO DATABASE SOL

[SQL] Manual Trigger Creation

2001-03-19 Thread Josh Berkus
ble Am I on the right track? -Josh __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293 for law firms, small business

Re: [SQL] Manual Trigger Creation

2001-03-19 Thread Josh Berkus
that. I'm interested in the approach for another reason. I have a number of tables that must match a NON-UNIQUE value in a reference table, and thus I'd like to test them against a query or view. -Josh Berkus __AGLIO DATABASE SOLUTIONS___

Re: [SQL] count() and multiple tables

2001-03-19 Thread Josh Berkus
d not u.b and a.status = 3); -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293 for law firms, small b

Re: [SQL] count() and multiple tables

2001-03-19 Thread Josh Berkus
, reuslting in a still-inflated (and sometimes varying!) COUNT. It won't work properly in T-SQL or MS Office SQL, for example. -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology

Re: [SQL] Categories and subcategories

2001-03-20 Thread Josh Berkus
7.0. I can think of several ways to do this, but they all depend on what display results you're trying to get. Perhaps you could post some simplified tabledefs, and the result you want to see? -Josh Berkus __AGLIO DATABASE SOLUTIONS___

Re: [SQL] Categories and subcategories : more details

2001-03-20 Thread Josh Berkus
generates a temporary table, and has to run once for every row in your result set. I'll post code later if nobody comes up with a better solution. If you knew all of your categories in advance, you could do this via an annoying UNION statement. I'm assuming

Re: [SQL] CHAR or VARCHAR

2001-03-25 Thread Josh Berkus
out SQL Server 2000). Now, Tom, at what point do character values begin to be stored "outside the table"? This is something I want to avoid, having had some bad experiences with pointers and DB corruption (although not with PGSQL). -Josh Berkus __AGLIO DATABASE SOLUTIO

[SQL] Function Vanished

2001-03-26 Thread Josh Berkus
to text so that I could have a copy of the final version. To my horror, the function was GONE from the system catalog (pg_proc). I have not run VACUUM on the database anytime recently ... is there any possibility that my function is still present as a "deleted" row? -Josh Berkus

Re: [SQL] Function Vanished

2001-03-26 Thread Josh Berkus
on body, which is > probably all that you really need. But if it's more than a couple K > then the text will be compressed and difficult to spot or extract. Can you explain that? I think that the text may be short entough to be uncompressed. -Josh Berkus _

Re: [SQL] Re: psql win32 version

2001-03-27 Thread Josh Berkus
reat Bridge, who is now maintaining them. Look in their Projects area. -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions

Re: [SQL] DELETE FROM fails with error

2001-03-28 Thread Josh Berkus
e ID fields in lower case (one that isn't foriegn keyed, of course). 2. It's possible that defining these rows as type OID requires some special reference syntax. If so, hopefully someone on the list will come forward. -Josh Berkus __AGLIO DATABASE SOLUTIONS

Re: [SQL] Possible 7.1RC1 bug

2001-03-30 Thread Josh Berkus
ck to the "regular" behavior of sum(integer) = integer? -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293 for

Fwd: [SQL] Calling functions inside a function: behavior

2001-04-02 Thread Josh Berkus
; PERFORM Function2; SELECT current_timestamp; etc ... COMMIT WORK; If the test script bogs down as well, you have your answer although the workaround may be tricky to implement. -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh

Re: [SQL] Implicit/Explicit casting of the unknown type

2001-04-03 Thread Josh Berkus
r than a SQL problem. -Josh __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293 for law firms, small businessesfax

Re: [SQL] Need to do an ALTER TABLE.

2001-04-04 Thread Josh Berkus
Tom, That does bring up a related question: when are we gonna get DROP COLUMN capability? Currently my tables are littered with unused columns because I can't remove them without blowing my referential integrity and views to heck. -Josh B

Re: [SQL] UNION in a VIEW?

2001-04-04 Thread Josh Berkus
ON query were a subselect. Coming from a SQL Server background, I'd actually find the suggested behavior rather confusing (as well as tough for you guys to implement). -Josh __AGLIO DATABASE SOLUTIONS___ Josh Berkus

Re: [SQL] Re: UNION in a VIEW?

2001-04-05 Thread Josh Berkus
e talking about features for version 7.3 or later ... a direct way to approach it would be to do a push-down on simple UNION views, and to do output filtering on UNION views wich contain a CASE, any subselect, or CAST expression (or similar) on the filtered columns. -Josh __AG

[SQL] Double-nesting quotes?

2001-04-05 Thread Josh Berkus
#x27;''' || s_client || ''''; -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data managemen

[SQL] "row_count" reserved?

2001-04-06 Thread Josh Berkus
fixed the problem, but I'd love to know what's going on here. -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PR

[SQL] Need help with EXECUTE function

2001-04-07 Thread Josh Berkus
> '''' THEN where_string := where_string || '' AND order_contact ~* '''''''' || v_contact || ''''''; END IF; IF trim(v_temps) <> '''' THEN

Re: [SQL] enumerating rows

2001-04-11 Thread Josh Berkus
d not work. It seems like there should be some way to access this internal row count. -Josh __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROT

Re: [SQL] DB porting questions...

2001-04-11 Thread Josh Berkus
lts, and may be overridden by a specific insert. Thus: 1. Create the id field as type SERIAL. 2. Insert your records into the new table, including the ID value. 3. Crank up the SERIAL sequence to the number of the highest ID present: SELECT SETVAL('

Re: [SQL] Calling plSQL functions

2001-04-11 Thread Josh Berkus
state you difficulty, and I can probably help you. -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293 for law

Re: [SQL] Calling plSQL functions

2001-04-12 Thread Josh Berkus
> -- If YES then return the error > if login_check <> '''' then > return ''That login already exists for user '' || login_check || ''. Please choose another.''; > end if; (assuming that first_name and

[SQL] Function overlaps_interval

2001-04-12 Thread Josh Berkus
overlap_amount := end1 - begin1; ELSE overlap_amount := end2 - begin1; END IF; END IF; RETURN overlap_amount; END;' LANGUAGE 'plpgsql'; -Josh Berkus __AG

[SQL] BOOLEAN data type?

2001-04-13 Thread Josh Berkus
treated as a Boolean value, and used for testing and comparison without and "= TRUE" or "= FALSE". What's going on here? -Josh __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technol

Re: [SQL] Calling plSQL functions

2001-04-13 Thread Josh Berkus
END LOOP; END IF; (NOTE: OFFSET will not accept any math if set dynamically {as above}. Thus, "LIMIT 1 OFFSET insert_loop + 1" will error). -Josh -- __AGLIO DATABASE SOLUTIONS___ Josh Berkus Compl

Re: [SQL] Problem in writing functions

2001-04-13 Thread Josh Berkus
Kris, > I am writing a function in postgresql which inserts a row into the > database, > but it is not working, can anybody help me out with a simple example. Please post your function. I'm sure the folks can take a crack at it. -Josh __

Re: [SQL] BOOLEAN data type?

2001-04-14 Thread Josh Berkus
g in a Boolean fashion, I took them apart and re-built them ... and it turned out to be a data problem in a linked table (a unique index was dropped somehow without my awareness while altering the tables). So Booleans are working properly, and you can relax now. -Josh Berkus __

Re: [SQL] BOOLEAN data type?

2001-04-14 Thread Josh Berkus
to make all of my BOOLEAN columns NOT NULL DEFAULT FALSE. -Josh __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293 for law firms,

Re: [SQL] Same question about PostgreSql

2001-04-15 Thread Josh Berkus
ur procedures over directly. Full stored procedures are planned for Postgres, but not for a couple of versions. -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] a

Re: [SQL] Re: Using Random Sequence as Key

2001-04-17 Thread Josh Berkus
rtion; END; 3. Then set the id column to default to this new function. This would give you (after you correct my mistakes) a number, the first X digits of are Serial, and the last 2 digits based on the server's internal clock. Thus, the numbers would *not* be sequential, and would appe

Re: [SQL] Cursors in plpgsql

2001-04-17 Thread Josh Berkus
ch row from the temporary > table, do some processing and insert into actual tables. Any idea how > i > can accomplish this??? Yes. Please see my post from last week called: "Re: [SQL] Calling plSQL functions". -Josh Berkus __AGLIO DATABASE SOLUTI

Re: [SQL] Re: Same question about PostgreSql

2001-04-17 Thread Josh Berkus
their activites. 4. Stored procedures should have access to the full range of DB control language, includign cursors, transactions, and error handling. Of the 4. I'm only certain that 1. is part of the SQL92 spec. Any more authoritative opinions? -Josh __AGLIO DATABASE SOLU

Re: [SQL] maybe Offtopic : PostgreSQL & PHP ?

2001-04-18 Thread Josh Berkus
Folks, Not to be a list-nazi or anything, but can we move this discussion to the PHP list? These issues are already part of the PHP list archives. If anyone is interested in Postgres-PHP topics, the PHP list is still quite low-traffic. -Josh Berkus ---(end of

Re: [SQL] Subqueries in select clause

2001-04-18 Thread Josh Berkus
roach: CREATE VIEW c_aggregate AS SELECT sum(a) as sum_a, b FROM c GROUP BY b; SELECT max(sum_a) FROM c_aggregate; Not as fast or dynamic as a subselect, but should solve your immediate problem. -Josh Berkus __AGLIO DATABASE SOLUTIONS__

Re: [SQL] HELP : Can't load JDBC driver !

2001-04-22 Thread Josh Berkus
Nusa, I suggest that you take your question to the pgsql-jdbc list, a list specifically for JDBC interfacing with Postgres. See www.postgresql.org for directions on how to subscribe. -Josh __AGLIO DATABASE

[SQL] Problems handling errors in PL/pgSQL

2001-04-23 Thread Josh Berkus
go back and add data validation and RAISE ERROR statements to all of my functions that do INSERTS or UPDATES to tables with referential integrity triggers. Is there a way around this? 2. Is there a plan to fix this kind of deficiency in Postgres function/procedure error handling? Thanks so m

Re: [SQL] Problems handling errors in PL/pgSQL

2001-04-23 Thread Josh Berkus
eral other ways I can check, as well. However, I was hoping for some way to avoid adding anything to a couple of dozen functions which are already debugged. -Josh P.S. Does anyone yet have full documentation on GET DIAGNOSICS? Roberto? __AGLIO DATABASE SOLUTIONS___

Re: [SQL] Problems handling errors in PL/pgSQL

2001-04-23 Thread Josh Berkus
orders > regression=# Always good to have you folks test something. This does appear to be a bug ... in KPSQL (the KDE GUI for PSQL), not in Postgres. When I run it through command-line PSQL, an error is returned; for some reason, KPSQL returns the return value for the function and no e

Re: [SQL] Problems handling errors in PL/pgSQL

2001-04-23 Thread Josh Berkus
iled RC2. I keep meaning to take it up with PGSQL Inc. but not getting around to it ... -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solution

Re: [SQL] Table corrupted and data lost (second time in one month!!)

2001-04-24 Thread Josh Berkus
d be hardware problems. Have you tried doing a full sector-by-sector scan on that HDD, or better yet, moving the whole database to an alternate server? BTW, I run Postgres on top of ReiserFS, which cuts down my disk errors significantly. -Josh __AGLIO DATABASE SOL

[SQL] Error explaination?

2001-04-25 Thread Josh Berkus
e function handler won't let me create, then delete the same record. What goes on? -Josh Berkus __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solut

Re: [SQL] Error explaination?

2001-04-25 Thread Josh Berkus
a) do something other than deleting the records, or b) drop the referential integrity check on the table? -Josh __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information techno

Re: [SQL] problem with pl/pgsql

2001-04-26 Thread Josh Berkus
Mark, I'd love to help you with your PL/pgSQL function, but since I don't read Perl, I can't tell what you're trying to do. Can you spell it out more explicitly? -Josh __AGLIO DATABASE SOLUTIONS___

[SQL] No JOINs in UPDATE ... FROM?

2001-04-26 Thread Josh Berkus
e in query." Now, I can (and have) re-phrase the query so that PostgreSQL will accept it. However, I was under the impression that the above was standard SQL92. Am I mistaken? Or is this form something that just hasn't been implemented yet?

<    1   2   3   4   5   6   7   8   9   >