Re: [GENERAL] View prevents index

2001-07-11 Thread Eric G. Miller
") > 80); I guess the second would fail on the alias, but the first should succeed ?? I can't say anything about the specs, but the parser/planner/optimizer would have to be able to fall back to applying the WHERE after the UNION if it couldn't match up c

Re: [GENERAL] Sequences in transaction context

2001-06-05 Thread Eric G. Miller
t sequence number used by the current process. This is why currval() will generate an error in a new session if nextval() hasn't been called for the given sequence. -- Eric G. Miller <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] ORDER BY Problem

2001-06-05 Thread Eric G. Miller
On Wed, Jun 06, 2001 at 03:17:36AM +0200, Severin Olloz wrote: > Hello... > > Why does Postgresql order the uppercase letters first? Because all uppercase letters come before the lowercase letters. Maybe "ORDER BY lower()" will work? This should also be locale dependent ...

Re: [GENERAL] Vacuum problems ... HELP !!!

2001-06-05 Thread Eric G. Miller
; /usr/local/progs/pgsql/bin/postmaster: ServerLoop: handling > reading 5 > /usr/local/progs/pgsql/bin/postmaster: ServerLoop: handling > reading 5 > > What is status 139 ? 139 = 128 + 11 ; Sig 11 ? -- Eric G. Miller <[EMAIL PROTECTED]> -

Re: [GENERAL] incomplete transaction keeps table locked?

2001-05-28 Thread Eric G. Miller
, without restarting Apache, Apache will probably still be referencing the earlier version of the php shared library. Files aren't really deleted until their reference count goes to zero. -- Eric G. Miller <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Implicit row locking during an UPDATE

2001-05-25 Thread Eric G. Miller
Maybe you want to read the manual. Specifically look at transaction isolation level under MVCC. Hmm, SET TRANSACTION ISOLATION LEVEL doesn't seem to be taking in 7.1.1... Is that a bug? Guess the only way to be sure is to use the transaction semantics above... -- Eric G. Miller <[EMAIL PR

Re: [GENERAL] initdb doesn't work with cygwin 1.3.1?

2001-05-22 Thread Eric G. Miller
rst and either export PGDATA or use the "-D /path/to/data" directive. -- Eric G. Miller <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [

Re: [GENERAL] arbitrary number of values from a sequence

2001-05-05 Thread Eric G. Miller
.. You might want to use LOCK instead of FOR UPDATE since its behavior depends on the TRANSACTION ISOLATION LEVEL. -- Eric G. Miller <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [GENERAL] how can i change my table/column constraint

2001-05-05 Thread Eric G. Miller
NTO tb2_new (kd_lab, tb2, key) SELECT kd_lab, tb2, key FROM tb2; -- Stop if there was an error! -- Don't drop unless you're sure the data got copied okay DROP TABLE tb2; DROP TABLE lab; -- Rename tables ALTER TABLE lab_new RENAME TO lab; ALTER TABLE tb2_new

Re: [GENERAL] function with multi-values

2001-04-28 Thread Eric G. Miller
THANK YOU VERY MUCH Maybe you want your function to iterate through the records and return a string of concatenated results? Or does it need to be a tuple? To do so, I think you'd need to use pgplsql. -- Eric G. Miller <[EMAIL PROTECTED]> ---(end of bro

Re: [GENERAL] Inheritance and referential integritry in 7.0.3

2001-04-08 Thread Eric G. Miller
> REFERENCES target is not allowed. > > Short of creating another table which stores all product ids, is there a > simple way to make this work? Doesn't work with inheritance... Do instead: create table "products1" ( "product_id" NOT NULL REFERENCES "p

Re: [GENERAL] Query

2001-04-08 Thread Eric G. Miller
accessor functions though... int4 SampleGetnCtr1 (Sam *s) { return s->nCtr1; } Etc... Then, maybe, you can call the function(s) to get/set it's parts... SELECT sample_get_ctr1(mysample) INTO foo FROM ... ; -- Eric G. Miller <[EMAIL PROTECTED]> ---(end of broa

Re: [GENERAL] Question about SELECT FOR UPDATE in transaction, isolation level

2001-04-08 Thread Eric G. Miller
do a commit or rollback -- so be quick about it... You might consider using a sequence if you can... -- Eric G. Miller <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

Re: [GENERAL] Arrays and COPY FROM: Help!!!

2001-04-07 Thread Eric G. Miller
ING DELIMITERS '|'; {{1,2},{3,4}} {{4,3},{2,1}} \. The level of nesting of braces "{}" indicates the dimensions of the array. 1-dim {} , 2-dim {{},{}}, etc. -- Eric G. Miller <[EMAIL PROTECTED]> ---(end of broadcast)-

Re: [GENERAL] function to operate on same fields, different records?

2001-03-31 Thread Eric G. Miller
On Sat, Mar 31, 2001 at 12:17:46AM -0600, will trillich wrote: > On Fri, Mar 30, 2001 at 06:34:45PM -0800, Eric G. Miller wrote: > > On Fri, Mar 30, 2001 at 06:40:13PM -0600, will trillich wrote: > > > even using PLPGSQL, is it possible to send VARYING relation > >

Re: [GENERAL] dynamic field names in a function.

2001-03-30 Thread Eric G. Miller
ing all of the field names for the relation which you can compare to the concatenation of your "field" and NEW.qty. Hope this is making some sense. Here's a quick example query on a known relation called "units". select pg_attribute.* from pg_attribute

Re: [GENERAL] Re: function to operate on same fields, different records?

2001-03-30 Thread Eric G. Miller
id totally failed ALL his classes! And before someone > > points it out, yes I saw the DBZ. > > > dbz? Division By Zero. Also, the above would perform integer division, would need a cast to 'float8' on one of the operands. -- Eric G. Miller <[EM

Re: [GENERAL] function to operate on same fields, different records?

2001-03-30 Thread Eric G. Miller
office varchar(40), > phone varchar(10), > a int4, > b int4, > c int4, > d int4, > f int4 > ); > > i'm hoping the same function could handle any of those different > tuple types so long as the attributes (fields) accessed are > common to all of them. impossible? -- Eric G. Miller <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

Re: [GENERAL] storing "small binary objects"

2001-03-30 Thread Eric G. Miller
o :id,:someVariable > from firstTable > where id = 5; > //read "someVariable" back in > > While I got the value of id (and there is definitely a valid record), the > "someVariable" memory location is blank. What am I doing wrong? > > In ad

Re: [GENERAL] serial properties

2001-03-02 Thread Eric G. Miller
quence that "SERIAL" creates. IMHO, automatically incremented number fields used for primary keys are both a blessing and a curse. It is almost always better to use some other data that *means something* for a primary key. If there's no possible candidate key, *then* maybe an autonumber key is appropriate. -- Eric G. Miller <[EMAIL PROTECTED]>

Re: R: [GENERAL] Date types in where clause of PreparedStatement

2001-03-01 Thread Eric G. Miller
#x27;) or dd-MMM- ('01-Mar-2001'), are good candidates. For time as well: -mm-dd hh:mm[:ss[-hh[mm]]] '2001-03-01 23:42:58-0800' Always having year first makes a good heuristic that date/time is in ISO format, and there's no question that each successive part represents a decreasing date/time part. -- Eric G. Miller <[EMAIL PROTECTED]>

Re: [GENERAL]

2001-02-24 Thread Eric G. Miller
UES ('bea! utiful image', lo_import('/etc/motd')); SELECT lo_export(image.raster, '/tmp/motd') from image WHERE name = 'beau