Re: [SQL] date format in 7.4

2004-06-05 Thread scott.marlowe
On Fri, 20 Feb 2004, Silke Trissl wrote: > Hi, > > I have an application where users can enter the date via a web interface. > > Recently I upgrated my PostgreSQL version from 7.3 to 7.4.1. > > On 7.3 I run several tests about the format of the date and found, > that Postgres accepts almost eve

Re: [SQL] Function

2004-06-03 Thread scott.marlowe
On Mon, 16 Feb 2004, Sumita Biswas (sbiswas) wrote: > Thanks for the answer. > I have one more issue. How do I test a function that I wrote? > I was able to create a function called Proc_ConferenceSummary(). > In SQL Server I used to run it through query analyzer by writing the > following command

Re: [SQL] working with schema

2004-05-12 Thread scott.marlowe
On Wed, 12 May 2004, William Anthony Lim wrote: > Christoph, > > First, is it safe for multi user? I mean maybe first user need working with D200402, > second one need with D200403, if I do this in first user connection: > > SET search_path to D200402 ; > > does it affect to the second user s

Re: [SQL] Info

2004-05-11 Thread scott.marlowe
On Tue, 11 May 2004, [koi8-r] "Slava Ilijin[koi8-r] " wrote: > > > > Hello, I have inserted a data bank in SQL server 2000 and from it have > generated a Script. I would like to convert to this Script in > postgresql, but I don't know like this does. I become to you very > thankfully for e

Re: [SQL] invalid input syntax for integer: ""

2004-05-04 Thread scott.marlowe
On Sat, 1 May 2004, Sebastian Tewes wrote: > Hello :-) > > got a little prob... > > so my table > > create table warengruppen ( kennung char (1), > holder int, > HauptWarenGruppe int, > BezHWG varchar (50), >

Re: [SQL] start

2004-05-03 Thread scott.marlowe
On Mon, 3 May 2004, H.J. Sanders wrote: > > Hello list. > > > I have difficulties starting the postmaster automatically at boot time > (everything I tried is done by 'root'). > > Can someone give me an example for LINUX (SUSE 8). Just FYI, this probably belongs on admin, but no biggie. I sta

Re: [SQL] Permissions not working

2004-04-29 Thread scott.marlowe
On Thu, 29 Apr 2004, Pallav Kalva wrote: > scott.marlowe wrote: > > >On Thu, 29 Apr 2004, Pallav Kalva wrote: > > > > > > > >>Hi , > >> > >>I am having some problems with setting up permissions in Postgres. I > >>have a da

Re: [SQL] Permissions not working

2004-04-29 Thread scott.marlowe
On Thu, 29 Apr 2004, Pallav Kalva wrote: > Hi , > > I am having some problems with setting up permissions in Postgres. I > have a database for ex: 'ups' and it was owned previously by > 'postgres(superuser)' but now i have changed the ownership to new user > 'ups' all the tables are owned

Re: [SQL] SQL script

2004-04-19 Thread scott.marlowe
On Thu, 15 Apr 2004 [EMAIL PROTECTED] wrote: > good day toall.. > imm running postgreSQL on linux. > my main goal is to create a script that will dump a data from our server too my > local PC. the content of the script would be execute sql command in one shot: > 1. dump data > 2. update and ins

Re: [SQL] Update is very slow on a bigger table

2004-04-19 Thread scott.marlowe
On Sat, 17 Apr 2004, Bruno Wolff III wrote: > On Fri, Apr 16, 2004 at 12:47:58 -0500, > Yudie <[EMAIL PROTECTED]> wrote: > > Hi guys, > > I would like to create a trigger that execute some programs, > > is there a way to create a plpgsql function that execute shell command or > > any other way t

Re: [SQL] full join...using and version of pgsql

2004-04-14 Thread scott.marlowe
On Wed, 14 Apr 2004, Tina Messmann wrote: > hello list, > > i am using pgsql 7.2.1 > i need something like > > select * from t1 full join t2 using(bla) full join t3 using(bla) > > i searched the archives and found that this is not possible with my > version of postgres. > is this implemented i

Re: [SQL] pgsql multi-database queries

2004-04-09 Thread scott.marlowe
On Thu, 8 Apr 2004, yek ching wrote: > Dear Sir/Miss, > > Is there a way to do a multi-database select query??.. I fail to find the > related solution... currently i i created seperate table call stockmaster > under seperate database for each seperate organizations... When i want to > queries

Re: [SQL] DB question - Merging data from one table to another.

2004-04-05 Thread scott.marlowe
On Thu, 1 Apr 2004, malia, sean wrote: > Hello, > > I'm not sure if this is even possible, but I'll throw it by you anyway. > > Say I have 2 tables: > > Table1: With columns number and name > > 1.1 test1 > 1.2 test2 > 1.3 test3 > 1.4 test4 > > Table2: With column number and result

Re: [SQL] designer tool connect to PostgreSQL

2004-03-11 Thread scott.marlowe
On Thu, 11 Mar 2004 [EMAIL PROTECTED] wrote: > Hi, > > thanks to all for the responnd...i've look into all the tools mentioned > and found many tools which has a great feautre such as designing/modelling > the object/table but it seems look like that there is no tools that can do > the ETL pr

Re: [SQL] randomized order in select?

2004-03-11 Thread scott.marlowe
On Thu, 11 Mar 2004, Iain wrote: > If you have a lot of tips, you could create a unique indexed tip number > column. Select the highest tip number using: > > select tip_number from tips order by tip_number desc limit 1; > > Then generate a random number and select using that tip_number. > > Of

Re: [SQL] Alter table

2004-03-10 Thread scott.marlowe
On Wed, 10 Mar 2004, David wrote: > Ok another very newbie question. How can i change the data type a column can > accept? at the moment it will only take character(7) i want to change it to > varchar(30), but i cant figure how, ideas? While there are ways to tinker with the system catalogs to ch

Re: [SQL] randomized order in select?

2004-03-10 Thread scott.marlowe
On Wed, 10 Mar 2004, Enver ALTIN wrote: > Hi, > > I have got a simple table like this: > > create table tips ( > id integer primary key unique, > tiptext text > ); > > and, I've got a website where I'm willing to show these tips in a random > order. E

Re: [SQL] Date Foo.

2004-02-20 Thread scott.marlowe
rval spans, so there'd be no proper way > to take month lengths into account. > > I gave up on the sql and used Date::Calc from Perl. Thanks for your > answer anyway. > > scott.marlowe wrote: > > On Thu, 19 Feb 2004, Brian Knox wrote: > > > > > >&

Re: [SQL] DISTINCT ON troubles

2004-02-19 Thread scott.marlowe
On Thu, 19 Feb 2004, scott.marlowe wrote: > On Thu, 19 Feb 2004, Brian Knox wrote: > > > ( sorry if this is a repeat, my mail server is being wonky today ) > > > > I'm looking for a way, within SQL, given a starting date and an ending > > date, to get ba

Re: [SQL] DISTINCT ON troubles

2004-02-19 Thread scott.marlowe
On Thu, 19 Feb 2004, Brian Knox wrote: > ( sorry if this is a repeat, my mail server is being wonky today ) > > I'm looking for a way, within SQL, given a starting date and an ending > date, to get back the number of months between the start and end date. > If I "SELECT end_date - start_date",

Re: [SQL] Distributed Transactions

2004-02-19 Thread scott.marlowe
On Wed, 18 Feb 2004, George A.J wrote: > Hi all, > > i am using PostgreSQL 7.3.2. How can i do distributed transactions in PostgreSQL. > is there a transaction coordinator available for Postgres.. there isn't one, really, but you could likely roll something that worked. Oh, and update your v

Re: [SQL] Inserting NULL into Integer column

2004-02-18 Thread scott.marlowe
On Wed, 18 Feb 2004, Rod Taylor wrote: > > Note that the ' marks aren't part of the string, they are the delimiter of > > the string, and I always run every server with magic_quotes_gpc on. > > > > anything else? :-) > > Good point. I looked at the single quotes of the second line and somehow >

Re: [SQL] Inserting NULL into Integer column

2004-02-18 Thread scott.marlowe
On Wed, 18 Feb 2004, Rod Taylor wrote: > > and then you can foreach across the input: > > > > foreach($fields as $f){ > > if (!$_POST[$f]){ > > $_POST[$f]='DEFAULT'; > > } else { > > $_POST[$f] = "'".$_POST[$f]."'"; > > } > > } > > Default in quotes isn't going to work, and please

Re: [SQL] Inserting NULL into Integer column

2004-02-18 Thread scott.marlowe
On Wed, 18 Feb 2004, Jeremy Smith wrote: > > > I've run into this kind of thing before. IT helps if you have an array of > all your fields like: > > $fields = array("field1","field3","last_name"); > > and then you can foreach across the input: > > foreach($fields as $f){ > if (!$_POST[$f])

Re: [SQL] Inserting NULL into Integer column

2004-02-18 Thread scott.marlowe
I guess I am just looking for a > shortcut since the site conversion has already taken a week and counting, > when I originally was misguided enough to think it would take hours. Well, you might find yourself rewriting fair portions of your site, but usually you wind up with better code and

Re: [SQL] Inserting NULL into Integer column

2004-02-18 Thread scott.marlowe
On Wed, 18 Feb 2004, Jeremy Smith wrote: > Hi, > > in mysql I was able to make an insert such as: > > INSERT INTO TABLE (integervariable) VALUES ('') > > and have it either insert that variable, or insert the default if it had > been assigned. In postgresql it gives and error every time that t

Re: [SQL] CHAR(n) always trims trailing spaces in 7.4

2004-02-17 Thread scott.marlowe
On Tue, 17 Feb 2004, Tom Lane wrote: > elein <[EMAIL PROTECTED]> writes: > > This is an example of the problem. It used to expand > > the middle thing to 15. > > > elein=# select 'x' || ' '::char(15) || 'x'; > > ?column? > > -- > > xx > > (1 row) > > Still does, but then the spaces g

Re: [SQL] techniques for manual ordering of data ?

2004-02-09 Thread scott.marlowe
On Sat, 7 Feb 2004, Peter Galbavy wrote: > I tried googling, but the keywords here are so general, that I couldn't find > much useful. > > I am looking for reommendations on how to build an ordered list of media (in > this case photographs) in a particular "context". What I have - which I have >

Re: [SQL]

2004-02-03 Thread scott.marlowe
On Tue, 3 Feb 2004, Prashanthi Muthyala wrote: > Hi > > I have a postgresql in my red hat linux machine which will be our webserver. > previously we had mysql in suse linux in another machine. so we are having > a new webserver now with postgresql. I want to transfer my tables in mysql > to postg

Re: [SQL] Sometimes referential integrity seems not to work

2004-02-03 Thread scott.marlowe
On Tue, 3 Feb 2004, Jan Wieck wrote: > scott.marlowe wrote: > > > On Mon, 2 Feb 2004, Jan Wieck wrote: > > > >> Stephan Szabo wrote: > >> > >> > On Sat, 31 Jan 2004, Tom Lane wrote: > >> > > >> >> Stephan Szabo &l

Re: [SQL] Sometimes referential integrity seems not to work

2004-02-03 Thread scott.marlowe
On Tue, 3 Feb 2004, Jan Wieck wrote: > scott.marlowe wrote: > > > On Mon, 2 Feb 2004, Jan Wieck wrote: > > > >> Stephan Szabo wrote: > >> > >> > On Sat, 31 Jan 2004, Tom Lane wrote: > >> > > >> >> Stephan Szabo &l

Re: [SQL] Sometimes referential integrity seems not to work

2004-02-02 Thread scott.marlowe
On Mon, 2 Feb 2004, Jan Wieck wrote: > Stephan Szabo wrote: > > > On Sat, 31 Jan 2004, Tom Lane wrote: > > > >> Stephan Szabo <[EMAIL PROTECTED]> writes: > >> > On Mon, 26 Jan 2004, Enio Schutt Junior wrote: > >> >> In a database I am working, I sometimes have to delete all the records in > >> >

Re: [SQL] can insert 'null' into timestamp type field from command

2004-01-13 Thread scott.marlowe
On Tue, 13 Jan 2004, Bing Du wrote: > The table is like this: > > > maxware=# \d test; >Table "public.test" > Column |Type | Modifiers > +-+--- > a | timestamp without time zone | > b | integ

Re: [SQL] Adding a column to a VIEW which has dependent objects.

2004-01-12 Thread scott.marlowe
On Sat, 10 Jan 2004, Tom Lane wrote: > Rajesh Kumar Mallah <[EMAIL PROTECTED]> writes: > > How do people extend a parent view which has > > lot of dependent views? > > The parent view cannot be dropped because that will > > require recreating a dozen of dependent views. > > You're out of luck, yo

Re: [SQL] how to show table structure?

2004-01-09 Thread scott.marlowe
On Fri, 9 Jan 2004, Bing Du wrote: > Greetings, > > How can I see the layout of a table in PostgreSQL 7.4? I've checked > several books and on-line documents, but was not able to figure out how > PostgreSQL does 'describe ' like it's done in other databases. If in psql, use the \d commands (\?

Re: [SQL] restoring database

2003-12-22 Thread scott.marlowe
On Mon, 22 Dec 2003, Theodore Petrosky wrote: > As I am not someone with a lot of experience > (depending on the size of the 'dumpall') I would > create a new database to suck up the 'all' then > pg_dump the table I really cared about. > > Obviously, if the dump_all is a terabyte database th

Re: [SQL] Skip dups on INSERT instead of generating an error ...

2003-12-12 Thread scott.marlowe
On Fri, 12 Dec 2003, Marc G. Fournier wrote: > > I need to be able to run an INSERT INTO / SELECT FROM UNION which combines > two tables into one ... *but* ... the INTO table has a primary key on the > first column, so if the result of the UNION generates dups, by default, of > course, it will ge

Re: [SQL] Skip dups on INSERT instead of generating an error ...

2003-12-12 Thread scott.marlowe
On Fri, 12 Dec 2003, Marc G. Fournier wrote: > > I need to be able to run an INSERT INTO / SELECT FROM UNION which combines > two tables into one ... *but* ... the INTO table has a primary key on the > first column, so if the result of the UNION generates dups, by default, of > course, it will ge

Re: [SQL] Regular expression problem

2003-10-24 Thread scott.marlowe
On 24 Oct 2003, Manuel Sugawara wrote: > "scott.marlowe" <[EMAIL PROTECTED]> writes: > > > It certainly seems to work in Postgresql 7.4 beta 4: > > > > create table test2 (info text); > > CREATE TABLE > > insert into test2 values ('ab

Re: [SQL] Regular expression problem

2003-10-24 Thread scott.marlowe
On 24 Oct 2003, Manuel Sugawara wrote: > Matias Surdi <[EMAIL PROTECTED]> writes: > > > Manuel Sugawara wrote: > > >Use something like '^[a-z]{2}$' > > > > so, is this a bug > > No it is not. The sintax you are using is not supported. It certainly seems to work in Postgresql 7.4 beta 4: c

Re: [SQL] Query Help

2003-10-23 Thread scott.marlowe
On Thu, 23 Oct 2003 [EMAIL PROTECTED] wrote: > I'm interested in finding the minimim A.id such that the following holds: > > select A.charge > , B.user_id > , C.employee_id > from A > inner join B using (user_id) > inner join C using (employee_id) > > except > > select X.charge > ,

Re: [SQL] Query planner: current_* vs. explicit date

2003-10-22 Thread scott.marlowe
I'd guess that the planner doesn't know what current_date::timestamp is ahead of time, so it chooses a seq scan. On Wed, 22 Oct 2003, Chris Gamache wrote: > PsotgreSQL 7.2.4: > > Query planner is behaving strangely. It operates differently for explicit dates > and derived dates... any ideas on

Re: [SQL] [PERFORM] sql performance and cache

2003-10-14 Thread scott.marlowe
On Tue, 14 Oct 2003, Wei Weng wrote: > On Sat, 11 Oct 2003, Christopher Kings-Lynne wrote: > > > > > > I have two very similar queries which I need to execute. They both have > > > exactly the same from / where conditions. When I execute the first, it takes > > > about 16 seconds. The second is

Re: [SQL] Result set granularity..

2003-09-29 Thread scott.marlowe
On Sat, 27 Sep 2003, Rasmus Aveskogh wrote: > > Hi, > > Since I went from Oracle to PostgreSQL I've been missing the "invisable" > column 'rownum'. I often used it to lower the granularity of my data. > For example, say I have a large table containing some sort of statistical > data and want to

Re: [SQL] RFC: i18n2ascii(TEXT) stored procedure

2003-09-26 Thread scott.marlowe
On Thu, 25 Sep 2003, Michael A Nachbaur wrote: > I've created the following stored procedure to allow me to do > international-insensitive text searches, e.g. a search for "Resume" would > match the text "Résumé". > > I wanted to know: > > a) am I missing any characters that need to be convert

Re: [SQL] Using sql statements in file

2003-09-23 Thread scott.marlowe
On Mon, 22 Sep 2003, Suresh Basandra wrote: > Hi, > > I would like to do the following using files: > > 1. put create database, create tables sql statements in a file and > execute through prompt > 2. insert or update data that is put in a file > > Please let me know if there are any example

Re: [SQL] virus warning

2003-09-19 Thread scott.marlowe
On Fri, 19 Sep 2003, Paul Thomas wrote: > > On 19/09/2003 07:17 Tomasz Myrta wrote: > > Hi > > Recently I receive massive mail attack. This attack comes from some > > postgresql mailing list users. All send-to adresses are taken from users > > mailboxes which contain postgresql posts. Currently

Re: [SQL] undefine currval()

2003-09-09 Thread scott.marlowe
On Mon, 8 Sep 2003, Tom Lane wrote: > "scott.marlowe" <[EMAIL PROTECTED]> writes: > > On Mon, 8 Sep 2003, Bruce Momjian wrote: > >> I don't know how you could have an application that doesn't know if it > >> has issued a nextval() in the cur

Re: [SQL] undefine currval()

2003-09-08 Thread scott.marlowe
On Mon, 8 Sep 2003, Bruce Momjian wrote: > I don't know how you could have an application that doesn't know if it > has issued a nextval() in the current connection. Unless you can explain > that, we have no intention of playing tricks with currval() for > connection pooling. Actually, I would th

Re: [SQL] Fw: Change column data type

2003-09-04 Thread scott.marlowe
On Tue, 2 Sep 2003, Kumar wrote: > > Dear Friends, > > Using Postgres 7.3.4 over the linux server 7.3. > > Is it possible to alter/change the data type of a existing table's > column, with out dropping and recreating a column of same name. Only for certain types, and only by hacking the syst

Re: [SQL] Canceling other backend's query

2003-08-28 Thread scott.marlowe
On Wed, 27 Aug 2003, daq wrote: > Hi, > > Can i cancel querys runing on other backends, or disconnect a client > from the server? I can kill the backend process, but sometimes this > causing shared memory troubles. If you kill -9 a backend, you will cause the shared memory problem. Try just a

Re: [SQL] PostgreSQL or pl/psSQL equivalent to MS SQL Server's

2003-07-24 Thread scott.marlowe
On Thu, 24 Jul 2003 [EMAIL PROTECTED] wrote: > Does anyone know of the PostgreSQL or pl/psSQL equivalent to MS SQL Server's > xp_cmdshell? This is the command that allows you issue command-line > statements from within SQL, e.g., you would do xp_cmdshell 'dir c:\' if you > wanted to see the cont

Re: [SQL] how to copy table to another database?

2003-07-18 Thread scott.marlowe
On Fri, 18 Jul 2003, Yudie wrote: > Hi, > Anyone know how the procedure or commands to copy table to another database. > or querying from another database if possible? If you want to copy a table from one db to another, you can use this: pg_dump dbname -t tablename |psql dbname -e If you want c

Re: [SQL] avoid select expens_expr(col) like unneccessary calculations

2003-07-07 Thread scott.marlowe
On 8 Jul 2003, Markus Bertheau wrote: > Hi, > > when you have > select expensive_expression(column), * from table offset 20 limit 40 > > can you somehow save the cost for the first 20 calculations of > expensive_expression? Might a functional or partial index work here?

Re: [SQL] sort for ranking

2003-07-07 Thread scott.marlowe
I'm gonna guess you stored your ranking as a "text" field, but now you'd like to treat it like an int / numeric. While it would be better to go ahead and convert it, you can always cast it: select * from table order by textfield::int; On Mon, 7 Jul 2003, Andreas Schmitz wrote: > > Hello *, >

Re: [SQL] Inquiry From Form [pgsql]

2003-07-03 Thread scott.marlowe
On Thu, 3 Jul 2003, Bruno Wolff III wrote: > On Wed, Jul 02, 2003 at 16:26:09 -0300, > Chris Schneider <[EMAIL PROTECTED]> wrote: > > I know this is basic, but couldn\'t find and in a hurry to know the answer. When > > interfacing with PostgreSQL through PSQL, it appears that DML statements ar

Re: [SQL] need some help with a delete statement

2003-07-03 Thread scott.marlowe
On Wed, 2 Jul 2003, Matthew Hixson wrote: > Thanks for all your help, Scott. A friend of mine whipped out this > script which runs a lot faster than trying to use the original query I > posted. >-M@ > > begin; > create temporary table cart_temp as select distinct a.cart_id, > a.cart_cookie

Re: [SQL] Weird order problem (ignoring whitespaces?)

2003-07-02 Thread scott.marlowe
What locales are the two databases initdb'd to? On Wed, 2 Jul 2003 [EMAIL PROTECTED] wrote: > Hello, > > I used to run a program on a box with postgres 7.1 > There was data like: > 'abc 234' > 'abc 1234' > > (not the extra blank before 234) > > so after a select * from x order by field i got

Re: [SQL] need some help with a delete statement

2003-07-01 Thread scott.marlowe
On Tue, 1 Jul 2003, Matthew Hixson wrote: > > On Tuesday, July 1, 2003, at 05:47 AM, scott.marlowe wrote: > >>> > >>> what does the output of psql say if you have the /timing switch on? > >> > >> # select cart_id from carts except (select d

Re: [SQL] need some help with a delete statement

2003-07-01 Thread scott.marlowe
On Tue, 1 Jul 2003, Matthew Hixson wrote: > > On Monday, June 30, 2003, at 12:00 PM, scott.marlowe wrote: > > > On Mon, 30 Jun 2003, Matthew Hixson wrote: > > > >> On Monday, June 30, 2003, at 05:06 AM, scott.marlowe wrote: > >> > >>> On Fri,

Re: [SQL] need some help with a delete statement

2003-06-30 Thread scott.marlowe
On Mon, 30 Jun 2003, Matthew Hixson wrote: > On Monday, June 30, 2003, at 05:06 AM, scott.marlowe wrote: > > > On Fri, 27 Jun 2003, Matthew Hixson wrote: > > > >> Hi, I have a bunch of records that I need to delete from our database. > >> These records repr

Re: [SQL] select column from table

2003-06-30 Thread scott.marlowe
On Mon, 30 Jun 2003, Abdul Wahab Dahalan wrote: > Hi everybody! > > I just want to know is there a way in SQL command that can handle column > selection?. > The case is : > If I've a table with 10 columns and I want to select 8 of them without > rewrite the columns/fields name in the SQL query?

Re: [SQL] need some help with a delete statement

2003-06-30 Thread scott.marlowe
On Fri, 27 Jun 2003, Matthew Hixson wrote: > Hi, I have a bunch of records that I need to delete from our database. > These records represent shopping carts for visitors to our website. > The shopping carts I'd like to delete are the ones without anything in > them. Here is the schema: > >

Re: [SQL] CREATE table1 FROM table2

2003-06-23 Thread scott.marlowe
On Mon, 23 Jun 2003, L.V.Boldareva wrote: > Hello! > > many people posted their answer to this simple question. however, > neither > CREATE TABLE AS > nor > SELECT INTO > > do not take care about keys and triggers, etc. > > The commands above only copy the structure of the table, and the data.

Re: [SQL] Text insert max. size.

2003-06-18 Thread scott.marlowe
On Wed, 18 Jun 2003, Rudi Starcevic wrote: > Hi, > > I'm doing some planning for storing some xml data and am wondering > what is the maximum amount I could insert with one SQL statement. There's no limit to max SQL statement size in postgresql, but practically, you might want a REALLY big mach

Re: [SQL] join syntax

2003-06-17 Thread scott.marlowe
On Tue, 17 Jun 2003, Jodi Kanter wrote: > One of my colleagues has created a database where he has the same field > name in two tables and uses this field to link his tables rather than > some arbitrary value. For example, he has used "exp_id" in two tables. > When writing his joins he uses a s

Re: [SQL] select date range?

2003-06-17 Thread scott.marlowe
On Tue, 17 Jun 2003, ko wrote: > Hi, > > When I use sql statement to select the date range from $_POST value,It doesn't work. > > --- > "select * from mydatabase where mydate between '$_POST[start_date]' and > '$_POST[end_date]' " > > There is no error,b

Re: [SQL] How to make a IN without a table... ?

2003-06-13 Thread scott.marlowe
On Thu, 12 Jun 2003, David Pradier wrote: > On Thu, Jun 12, 2003 at 01:16:27PM +0200, Christoph Haller wrote: > > > > > > i ran today in a problem when doing some (i mean too much for me) > > advanced sql... > > > > > > What i want to do is something like this: > > > > > > SELECT > > > my_va

Re: [SQL] subselects - which is faster?

2003-06-13 Thread scott.marlowe
On Thu, 12 Jun 2003, Cedar Cox wrote: > It's been a while since I've done much SQL.. > > . I'm wondering which of these two queries is faster (both get the > same result)? > > . Which one is more correct? Does it even matter or are they the > same? The first one reads easier to me. > > . Wha

Re: [SQL] [HACKERS] [GENERAL] Bug with sequence

2002-11-26 Thread scott.marlowe
On 21 Nov 2002, Rod Taylor wrote: > On Thu, 2002-11-21 at 15:09, scott.marlowe wrote: > > On 21 Nov 2002, Rod Taylor wrote: > > > > > On Thu, 2002-11-21 at 14:11, Bruce Momjian wrote: > > > > Of course, those would be SQL purists who _don'

Re: [SQL] [HACKERS] [GENERAL] Bug with sequence

2002-11-26 Thread scott.marlowe
On 21 Nov 2002, Rod Taylor wrote: > On Thu, 2002-11-21 at 14:11, Bruce Momjian wrote: > > Of course, those would be SQL purists who _don't_ understand > > concurrency issues. ;-) > > Or they're the kind that locks the entire table for any given insert. Isn't that what Bruce just said? ;^) --

Re: [PHP] [SQL] Parent table has not oid?

2002-11-14 Thread scott.marlowe
On Sun, 10 Nov 2002, Tom Lane wrote: > "Zhidian Du" <[EMAIL PROTECTED]> writes: > > CREATE TABLE Link ( > >Protein_ID oid > >CONSTRAINT one > >REFERENCES Protein (oid) > >ON DELETE CASCADE, > >Link varchar(128) > > ); > > When I insert a record into this child table, it says >

Re: [SQL] [GENERAL] arrays

2002-10-07 Thread scott.marlowe
On Sun, 29 Sep 2002, Mike Sosteric wrote: > On Sun, 29 Sep 2002, Bruce Momjian wrote: > > Apologies in advance if there is a more appropriate list. > > We are currently developing a database to host some complicated, XMl > layered data. We have chosen postgres because of its ability to store >

Re: [SQL] [GENERAL] id and ID in CREATE TABLE

2002-07-22 Thread scott.marlowe
On Fri, 19 Jul 2002, Tom Lane wrote: > "scott.marlowe" <[EMAIL PROTECTED]> writes: > > Agreed. Absolutely. But, since the SQL standard says upper case, > > wouldn't it be useful to at least have a switch (run time, initdb time, > > or ./configure

Re: [SQL] [GENERAL] id and ID in CREATE TABLE

2002-07-22 Thread scott.marlowe
On Fri, 19 Jul 2002, Bruce Momjian wrote: > scott.marlowe wrote: > > On Fri, 19 Jul 2002, Tom Lane wrote: > > > > > [EMAIL PROTECTED] writes: > > > > But anyway this is not so important, but why upper cases are bad ? > > > > > > It's

Re: [SQL] [GENERAL] id and ID in CREATE TABLE

2002-07-22 Thread scott.marlowe
On Fri, 19 Jul 2002, Tom Lane wrote: > [EMAIL PROTECTED] writes: > > But anyway this is not so important, but why upper cases are bad ? > > It's well established that all-lower-case text is more readable than > all-upper-case ... Agreed. Absolutely. But, since the SQL standard says upper cas