Re: [GENERAL] [SQL] Database Design tool

2002-11-05 Thread Michael Ansley (UK)
Title: RE: [GENERAL] [SQL] Database Design tool   -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 DBVisualizer is pretty good. >> -Original Message- >> From: Johannes Lochmann [mailto:[EMAIL PROTECTED]] >> Sent: 30 October 2002 14:36 >> To: [EMAIL PROTECTED]; [EMAIL PROTECTED] >> Sub

Re: [SQL] NOTICE: generated by sequence nextval()

2002-10-11 Thread Michael Ansley (UK)
Title: RE: [SQL] NOTICE: generated by sequence nextval() -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I would hope that this is normal, and I can see it being particularly useful.  We frequently run into problems where databases ahve been reloaded, and the sequences have not been reset.  And

RE: [SQL] Simple SQL-syntax

2001-08-20 Thread Michael Ansley (UK)
Title: RE: [SQL] Simple SQL-syntax -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Probably something like:   UPDATE tableA SET tableA.nrA = (SELECT B.nrB FROM tableB B WHERE tableA.nrA = B.nrA);   Let me know...     MikeA     - -Original Message- From: Fredrik Thunberg [mailto:[EMAI

RE: [SQL] Re: Are circular REFERENCES possible ?

2001-08-14 Thread Michael Ansley (UK)
Title: RE: [SQL] Re: Are circular REFERENCES possible ? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The easiest way out is probably to create a relationship entity called 'default' between customer and shop for the default relationship.  This way you only have to have one direct relationsh

RE: [SQL] DB porting questions...

2001-04-11 Thread Michael Ansley
Title: RE: [SQL] DB porting questions... Hi, Jeff,   >>  1) >>  I have a table: >>      create table a ( >>          t   timestamp not null, >>          ... >>      ); >>  >>  I'm thinking that I can define a.t as not null default=now().  But >>  will >>  this >>  work?  That is

RE: [SQL] Sorting and then...

2001-04-10 Thread Michael Ansley
Title: RE: [SQL] Sorting and then... But if you want the largest 10, then you can: SELECT name FROM ORDER BY id DESC LIMIT 10; assuming that you mean largest numerically. Cheers... MikeA >> -Original Message- >> From: Roberto Mello [mailto:[EMAIL PROTECTED]] >> Sent: 10 A

RE: [SQL] counting distinct rows on more than one column

2001-03-28 Thread Michael Ansley
Title: RE: [SQL] counting distinct rows on more than one column SELECT count(*) FROM (SELECT DISTINCT a, b FROM t) AS t2; should give you what you want. MikeA >> -Original Message- >> From: Dirk Lutzebaeck [mailto:[EMAIL PROTECTED]] >> Sent: 28 March 2001 16:11 >> To: [EMAIL PR

RE: [SQL] plpgsql grief

2001-02-12 Thread Michael Ansley
]] Sent: 12 February 2001 16:46 To: Michael Ansley Cc: 'rob'; [EMAIL PROTECTED] Subject: Re: [SQL] plpgsql grief Michael Ansley <[EMAIL PROTECTED]> writes: > create function testfunc (text) returns int4 as ' > declare >   sql varchar; > begin >   sql='&#x

RE: [SQL] plpgsql grief

2001-02-12 Thread Michael Ansley
Title: RE: [SQL] plpgsql grief Hi, Rob, From the conversation taht Tom Lane got involved with earlier after my last posting on this toping I think that you need to change your first function to this: create function testfunc (text) returns int4 as ' declare   sql varchar; begin   sql=''SELE

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

2001-02-08 Thread Michael Ansley
Title: RE: [SQL] Re: PL/pgsql EXECUTE 'SELECT INTO ...' What I wrote wasn't about temp tables, it was about selecting into plpgsql variables.  It would appear that Jan's syntax gets around this problem. MikeA -Original Message- From: Jan Wieck [mailto:[EMAIL PROTECTED]] Sent: 08 Fe

RE: [SQL] PL/PGSQL function with parameters

2001-02-06 Thread Michael Ansley
VERY useful to see it fixed. Cheers... MikeA   -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED]] Sent: 06 February 2001 16:16 To: Michael Ansley Cc: Jan Wieck; sqllist; [EMAIL PROTECTED] Subject: Re: [SQL] PL/PGSQL function with parameters Michael Ansley <[EMAIL PROTEC

RE: [SQL] PL/PGSQL function with parameters

2001-02-06 Thread Michael Ansley
e variable RES.  Perhaps someone could enlighten me. Cheers... MikeA -Original Message- From: David Richter [mailto:[EMAIL PROTECTED]] Sent: 06 February 2001 09:39 To: Michael Ansley Subject: Re: [SQL] PL/PGSQL function with parameters Hello! Thanks a lot for Your answer! But with my

RE: [SQL] const cast ?

2001-02-02 Thread Michael Ansley
Title: RE: [SQL] const cast ? The problem is that there is no way of determining whether or not the sort order after the function has been executed will be the same as the sort order on the raw data.  For example, the sort order of n (-10..10) is very different to the sort order of abs(n).  So

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,

RE: [SQL] Re: OID Perfomance - Object-Relational databases

2000-10-04 Thread Michael Ansley
Title: RE: [SQL] Re: OID Perfomance - Object-Relational databases Given what we've been discussing over the past day or so, can anybody explain this to me: dev=# explain select client.address.postcode from client; NOTICE:  QUERY PLAN: Seq Scan on client  (cost=0.00..1.01 rows=1 width=4)

RE: [SQL] OID Perfomance - Object-Relational databases

2000-10-04 Thread Michael Ansley
Title: RE: [SQL] OID Perfomance - Object-Relational databases I'm a little concerned about all this, because my understanding is that what makes an object database so fast is its ability to directly reference tuples, so that traversing relationships becomes like traversing pointers. The achi

RE: [SQL] OID Perfomance - Object-Relational databases

2000-10-03 Thread Michael Ansley
nically, what's the difference?   Cheers... -Original Message-From: Michael Ansley [mailto:[EMAIL PROTECTED]]Sent: 03 October 2000 17:36To: 'Mitch Vincent'Cc: sqllistSubject: RE: [SQL] OID Perfomance - Object-Relational databases Unsigned, I think you can

RE: [SQL] OID Perfomance - Object-Relational databases

2000-10-03 Thread Michael Ansley
: 03 October 2000 17:35 >>   To: Michael Ansley >>   Cc: sqllist >>   Subject: Re: [SQL] OID Perfomance - Object-Relational databases >>   >>   >>   Aren't OIDs just integers? Isn't this limit just the limit >>   of the value an >>   i

RE: [SQL] OID Perfomance - Object-Relational databases

2000-10-03 Thread Michael Ansley
Title: RE: [SQL] OID Perfomance - Object-Relational databases Hi, Josh, In fact, the last point about OIDs is particularly pertinent, because we are expected to process up to 500 million records daily, thus exhausting the limit in, um, eight days. Is anybody aware of when this limit will be

RE: [SQL] Object features of pg

2000-10-03 Thread Michael Ansley
tgres then I get the speed of an ODB with the funcionality of a relational database (functions, sql, rules, etc.) Of course, I could just use the address OID as an FK on client, but that would only really be going half the distance. That's the plan, anyway. Cheers... >>   >&

RE: [SQL] Object features of pg

2000-10-03 Thread Michael Ansley
table client(id integer, name varchar(30), address >>   varchar(50); >>   ? >>   >>   >>> Michael Ansley >>   <[EMAIL PROTECTED]> 10/03/00 08:14AM >>> >>   I've done the following: >>   >>   create table address (address

RE: [SQL] Object features of pg

2000-10-03 Thread Michael Ansley
ages to it, and it hasn't appeared.     -----Original Message-From: Michael Ansley [mailto:[EMAIL PROTECTED]]Sent: 03 October 2000 14:44To: 'Peter Mount'Cc: '[EMAIL PROTECTED]'Subject: RE: [SQL] Object features of pg Hi, Peter, I suspected as much of the quer

RE: [SQL] Object features of pg

2000-10-03 Thread Michael Ansley
casting the oid, but that didn't seem to work either.  Any ideas? Cheers... >>   -Original Message- >>   From: Peter Mount [mailto:[EMAIL PROTECTED]] >>   Sent: 03 October 2000 14:32 >>   To: Michael Ansley >>   Cc: '[EMAIL PROTECTED]' >>   Subject: R

[SQL] Object features of pg

2000-10-03 Thread Michael Ansley
Title: Object features of pg I've done the following: create table address (address varchar(50), postcode varchar(9)); create table client(id integer, name varchar(30), address address); Now, how the hell do I get information into the address field of client?  There appears to be very litt

RE: [SQL] ORDER BY in definition of views

2000-06-08 Thread Michael Ansley
Title: RE: [SQL] ORDER BY in definition of views Would there be a particular reason to do this? MikeA >>   -Original Message- >>   From: Niall Smart [mailto:[EMAIL PROTECTED]] >>   Sent: 08 June 2000 14:47 >>   To: [EMAIL PROTECTED] >>   Subject: [SQL] ORDER BY in definition of vi