[SQL] changing encoding of a postgres database

2007-11-05 Thread Kenneth Gonsalves
hi, I recently did a dist-upgrade from sarge to etch on a server with a bunch of postgresql databases (7.4.9). Many of these had encoding set as unicode and contained a lot of unicode data. After the dist- upgrade, I find some of these databases are now encoded as latin1 - and I cannot pro

Re: [SQL] Authentification failed

2007-08-02 Thread Kenneth Gonsalves
On 02-Aug-07, at 2:49 AM, Judith wrote: I'm trying in SUSE to connect to a postgres db and this is the error: Ident Authentification failed for user <> I'm already created the user with createuser root, but the error persist, I would aprecciate some help, thanks in advanced edit your

Re: [SQL] workday function

2007-05-15 Thread Kenneth Gonsalves
On 15-May-07, at 2:39 PM, Richard Huxton wrote: Don't know of one - not sure what "workday" would mean in a global sense. I mean, Mon-Fri in most European office settings, but you'd include Sat in retail settings and in Islamic countries presumably exclude Fridays. Our local library shuts

[SQL] conversion of numeric field from MSSQL to postgres

2006-10-20 Thread Kenneth Gonsalves
hi, am migrating a database from MSSQL to postgres. How would i migrate this: [Id] [numeric](18, 0) IDENTITY (1, 1) -- regards Kenneth Gonsalves Associate, NRC-FOSS [EMAIL PROTECTED] http://nrcfosshelpline.in/web/ ---(end of broadcast

[SQL] migrating numeric to serial from MSSQL to postgres

2006-10-15 Thread Kenneth Gonsalves
hi, am migrating a database from MSSQL to postgres. How would i migrate this: [Id] [numerc](18, 0) IDENTITY (1, 1) -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ ---(end of broadcast)--- TIP 9: In versions below

Re: [SQL] why vacuum

2005-10-26 Thread Kenneth Gonsalves
On Wednesday 26 Oct 2005 11:52 am, Bath, David wrote: >   > This guy is not worth arguing with. > D'Accord! thanks all for the clarification. in case anyone is interested in the original conversation it is here: http://ebergen.net/wordpress/?p=83 -- regards kg http://www.livejournal.com/users/

[SQL] why vacuum

2005-10-25 Thread Kenneth Gonsalves
hi, i was in a minor flame war with a mysql guy - his major grouse was that 'I wouldnt commit mission critical data to a database that needs to be vacuumed once a week'. So why does pg need vacuum? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வா

Re: [SQL] BirthDay SQL Issue

2005-10-05 Thread Kenneth Gonsalves
On Sunday 02 Oct 2005 4:02 am, brett wrote: > This is my first posting here, please forgive me if I make any > mistakes here. thought your question was dead simple. worked on the answer for hours at end. learnt a lot of sql, but couldnt solve it. Looks like a solution is out. All i can say is -

Re: [SQL] unsubscribe

2005-09-28 Thread Kenneth Gonsalves
On Thursday 29 Sep 2005 11:47 am, [EMAIL PROTECTED] wrote: > please take me out from this group. ask the guy who put you in the group to do it -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! ---(end of broadcast)-

Re: [SQL] psql commandline

2005-08-31 Thread Kenneth Gonsalves
On Wednesday 31 Aug 2005 6:49 pm, Zac wrote: > su - postgres -c "psql --dbname database --command \"UPDATE users > SET pin=12345 WHERE login='admin';\"" works - good thing to know -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!

Re: [SQL] psql commandline

2005-08-31 Thread Kenneth Gonsalves
On Wednesday 31 Aug 2005 6:43 pm, [EMAIL PROTECTED] wrote: > After entering the statement that way my console hangs and only > ctrl-d gets it working again. the problem is that the quotes round 'admin' are needed to tell psql that this is a value - but i have no idea how to create the quotes on

Re: [SQL] psql commandline

2005-08-31 Thread Kenneth Gonsalves
On Wednesday 31 Aug 2005 6:24 pm, [EMAIL PROTECTED] wrote: > The error is : > > column "admin" doesn`t exist try \'admin\' -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! ---(end of broadcast)-

Re: [SQL] psql commandline

2005-08-31 Thread Kenneth Gonsalves
On Wednesday 31 Aug 2005 6:00 pm, dIGITx wrote: > su - postgres -c 'psql --dbname database --command "UPDATE users > SET pin=12345 WHERE login='admin';"' works for me - what is the error you are getting? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನ

Re: [SQL] How do I copy part of table from db1 to db2 (and rename the columns)?

2005-08-31 Thread Kenneth Gonsalves
On Wednesday 31 Aug 2005 3:30 pm, Joost Kraaijeveld wrote: > Hi, > > I want to copy several columns of a source table from db1 to db2, > and create the target table and rename the columns in the process. > > Is that possible in PostgresQL? If so, an example or url for such a > command /script would

Re: [SQL] How to secure PostgreSQL Data for distribute?

2005-08-17 Thread Kenneth Gonsalves
On Thursday 18 Aug 2005 8:26 am, Premsun Choltanwanich wrote: > Dear All, > > I need to distribute my application that use PostgreSQL as > database to my customer. But I still have some questions in my mind > on database security. I understand that everybody who get my > application database

Re: [SQL] trigger between to different database

2005-08-14 Thread Kenneth Gonsalves
On Tuesday 09 Aug 2005 12:11 am, Haris Saybasili wrote: > Hi everybody, > > I have two databasese: database1 and database2. I want to set a > trigger on a table of database1 which will insert some values to a > table of database2. > > Is it possible with postgresql? How can I find detailed informat

Re: [SQL] difference between all RDBMSs

2005-07-15 Thread Kenneth Gonsalves
On Friday 15 Jul 2005 2:18 pm, Richard Huxton wrote: > Sorry if this isn't as much help as you'd like, but you'll need to > give more detail if you want a more detailed answer. looks like he needs the details for a project/report -- regards kg http://www.livejournal.com/users/lawgon tally ho! h

Re: [SQL] two sums in one query

2005-07-08 Thread Kenneth Gonsalves
On Friday 08 Jul 2005 12:02 pm, Ramakrishnan Muralidharan wrote: >I have assuemed that the row will having eighter Debit account > or Credit account, the following Query will give sum of debit and > credit accounts > >SELECT SUM( CASE WHEN COALESCE( DEBIT , 0 ) <> 0 THEN > COALESCE( AMOU

list admin note:Fwd: RE: [SQL] two sums in one query

2005-07-07 Thread Kenneth Gonsalves
this guy is still polluting this list: -- Forwarded Message -- Subject: RE: [SQL] two sums in one query Date: Friday 08 Jul 2005 11:33 am From: AntiSpam UOL <[EMAIL PROTECTED]> To: lawgon <[EMAIL PROTECTED]> http://antispam.uol.com.br"; style=

[SQL] two sums in one query

2005-07-07 Thread Kenneth Gonsalves
hi i have a table like this: serialno varchar, debit integer, credit integer, amount numeric the columns 'debit' and 'credit' refer to the acount number. I want to query the table to select all the rows where either debit = account or credit=account and to get two sums - one of the amounts wher

Re: [SQL] ENUM like data type

2005-06-28 Thread Kenneth Gonsalves
On Tuesday 21 Jun 2005 8:50 pm, MRB wrote: > I'm working with a lot of data from MySQL where the MySQL ENUM type > is used. just a thought - it took me five years after migrating from mysql to pg to start thinking like an sql programmer. I used to keep trying to write stuff for pg 'like' i used

[SQL] customising serial type

2005-06-21 Thread Kenneth Gonsalves
hi, in a table with a serial datatype, how do i get the sequence to start at a specific number like 10? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! ---(end of broadcast)--- TIP 7: don't

Re: [SQL] Still getting autoreplies from list member

2005-06-16 Thread Kenneth Gonsalves
On Friday 17 Jun 2005 8:46 am, Michael Fuhr wrote: > The autoreplies mentioned in these threads are still happening: > > http://archives.postgresql.org/pgsql-sql/2005-06/msg00102.php > http://archives.postgresql.org/pgsql-sql/2005-06/msg00097.php > > I can tweak my filters to drop the autoreplies,

[SQL] rejecting characters in a field

2005-06-09 Thread Kenneth Gonsalves
hi i have a table with a varchar field called 'name'. I want postgres to reject any insert with characters defined as illegal characters, for example '*/^#'. How do i do this? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.sourceforge.net ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! ---

Re: [SQL] to listadmin

2005-06-07 Thread Kenneth Gonsalves
On Tuesday 07 Jun 2005 1:35 pm, Richard Huxton wrote: > I'm not sure it is from the list - it appears to be something setup > by [EMAIL PROTECTED] apparently he is a member of the list - so mail from any 'untrusted' guy like me gets this message. (anyone else getting it?) -- regards kg http://

[SQL] to listadmin

2005-06-07 Thread Kenneth Gonsalves
hi, every time i post to this list i get a copy of the message below - could the listadmin do something (or is there something i have to do?) -- Forwarded Message -- Subject: RE: Re: [SQL] preventing deletion of a row Date: Tuesday 07 Jun 2005 12:24 pm From: AntiSpam UOL <[EM

Re: [SQL] preventing deletion of a row

2005-06-06 Thread Kenneth Gonsalves
On Tuesday 07 Jun 2005 11:29 am, Nick Johnson wrote: > >if the value of 'fixed' is TRUE, then this row cannot be deleted. > > How do i enforce this condition? > >   > > Try this: > CREATE RULE tablename_delete AS ON DELETE TO tablename WHERE > OLD.fixed = TRUE DO INSTEAD NOTHING; cool - thanks --

[SQL] datestyle syntax

2005-06-06 Thread Kenneth Gonsalves
hi in the query: alter database dbname set datestyle='DMY','European'; what is the significance of the two parameters given in datestyle. I assumed that one is input and the other is output, but if i put: set datestyle='DMY','DMY' i get an error saying 'conflicting datestyles' -- regards kg htt

[SQL] preventing deletion of a row

2005-06-06 Thread Kenneth Gonsalves
hi i have a table of the type: id serial unique, name varchar(50), fixed boolean default FALSE if the value of 'fixed' is TRUE, then this row cannot be deleted. How do i enforce this condition? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.sourceforge.net ಇಂಡ್ಲಿನ

[SQL] pg_dump without data

2005-05-06 Thread Kenneth Gonsalves
how do i get a dump of a postgresql database without the data? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.sourceforge.net àà à! ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] gone blind - can't see syntax error

2005-04-01 Thread Kenneth Gonsalves
On Friday 01 Apr 2005 5:06 pm, Gary Stainburn wrote: > Hi folks. > > I've been looking at this for 10 minutes and can't see what's > wrong. Anyone care to enlighten me. comma after 'r'? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.sourceforge.net àà à!

Re: [SQL] Query performance problem

2005-03-17 Thread Kenneth Gonsalves
On Thursday 17 Mar 2005 7:35 pm, Richard Huxton wrote: > Not necessarily. NOT NULL here helps to ensure you can add values > together without the risk of a null result. There are plenty of > "amount" columns that should be not-null (total spent, total > ordered etc). that makes sense - but is it

Re: [SQL] Query performance problem

2005-03-17 Thread Kenneth Gonsalves
On Thursday 17 Mar 2005 1:50 pm, Phil Daintree wrote: > CREATE TABLE chartdetails ( > accountcode integer DEFAULT 0 NOT NULL, > period integer DEFAULT 0 NOT NULL, > budget double precision DEFAULT (0)::double precision NOT NULL, > actual double precision DEFAULT (0)::double precisi

[SQL] outputting dates

2005-03-13 Thread Kenneth Gonsalves
hi, i have set my datetype to 'European, SQL'. This correctly accepts dates of the form dd/mm/. However, the output is still in the '-mm-dd' format. How do i get the default output as dd/mm/? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.sourceforge.ne

Re: [SQL] datestyle setting

2005-03-09 Thread Kenneth Gonsalves
On Wednesday 09 Mar 2005 1:40 pm, Richard Huxton wrote: > > I keep making this mistake, you need to include the database name: >ALTER DATABASE my_db_name SET datestyle TO 'ISO'; er ... doesnt seem to be in the docs? Anyway it worked, thanx -- regards kg http://www.livejournal.com/users/law

Re: [SQL] datestyle setting

2005-03-08 Thread Kenneth Gonsalves
On Wednesday 09 Mar 2005 11:57 am, Tom Lane wrote: > Kenneth Gonsalves <[EMAIL PROTECTED]> writes: > > i have a website with a postgresql backend. Being a shared site, > > i have no root access. i do have shell access to the database, > > but cannot create or drop

[SQL] datestyle setting

2005-03-08 Thread Kenneth Gonsalves
hi, i have a website with a postgresql backend. Being a shared site, i have no root access. i do have shell access to the database, but cannot create or drop the database. I access the database through python scripts using the psycopg adapter. My question is, how do i set the pgdatestyle in the

Re: [SQL] Calling a table residing in another database from Plpgsql

2005-01-04 Thread Kenneth Gonsalves
On Wednesday 05 January 2005 10:43 am, [EMAIL PROTECTED] wrote: > Hi, > > I have function called test1() in database 1. I need to input the value > from this function into another table which is in database2. shouldnt you be using schemas instead? kg ---(end of broadcast)

[SQL] linux clusters and pgsql

2004-12-21 Thread Kenneth Gonsalves
hi, can postgres be run on a linux cluster, and if so what are the performance and other issues - checked archives, but the only info is over a year old kg ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://

Re: [despammed] [SQL] sql can i substitute

2004-12-17 Thread Kenneth Gonsalves
On Friday 17 December 2004 05:54 pm, Andreas Kretschmer wrote: > Yes, simple: > > test=# select name, case > test-# when fruit = 1 then 'good' > test-# when fruit = 2 then 'bad' > test-# when fruit = 3 then 'rotten' end as fruit from fruit; can one do the same thing for an 'insert' statement? k

Re: [SQL] sql can i substitute

2004-12-17 Thread Kenneth Gonsalves
On Friday 17 December 2004 06:12 pm, D'Arcy J.M. Cain wrote: > An alternative to Andreas' suggestion would be to create a simple lookup > table and join them. This is good if the real life example can get > larger and/or the list can change and you don't want to modify code > every time it does.

Re: [despammed] [SQL] sql can i substitute

2004-12-17 Thread Kenneth Gonsalves
On Friday 17 December 2004 05:15 pm, Andreas Kretschmer wrote: > test=# select * from fruit; > name | fruit > +--- > Apple | 1 > Banana | 2 > Cherry | 3 > (3 Zeilen) > > > test=# select name, fruit, case > test-# when fruit = 1 then 'good' > test-# when fruit = 2 th

[SQL] sql can i substitute

2004-12-17 Thread Kenneth Gonsalves
hi table: name varchar(10) fruit integer i want to write an sql statement like this: select fruit from table which should return 'good' if fruit = 1 and 'bad' if fruit =2 and 'rotten' if fruit =3 can it be done? kg ---(end of broadcast)--- TI

Re: [SQL] mysql set datatype

2004-12-13 Thread Kenneth Gonsalves
On Monday 13 December 2004 06:55 pm, Richard Huxton wrote: > Kenneth Gonsalves wrote: > > hi, > > how does one replicate the myql 'set' datatype in pg? i tried using > > 'check', but apparently there is much more to this > > You could use a bit-stri

[SQL] mysql set datatype

2004-12-13 Thread Kenneth Gonsalves
hi, how does one replicate the myql 'set' datatype in pg? i tried using 'check', but apparently there is much more to this regards kg ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.or

Re: [SQL] parse error at or near "(" -- Huh???

2004-12-12 Thread Kenneth Gonsalves
On Monday 13 December 2004 08:15 am, Tom Lane wrote: > > One character per character, whether that be a visible character or > whitespace (including newlines). Collapsing out whitespace is > definitely not going to give you the right count. and while on this topic, how does one interpret the line

[SQL] replacing mysql enum

2004-12-10 Thread Kenneth Gonsalves
hi, from mysql: field enum('a','b','c') default null, i translated this as: field varchar(2) check (field in (null,'a','b','c')), is it necessary to put the 'null' in the check condition? if not will pg permit you to enter a null value in the field? regards kg ---(en

Re: [SQL] Image Insert Postgresql DB

2004-11-23 Thread Kenneth Gonsalves
On Tuesday 23 November 2004 01:49 pm, Premsun Choltanwanich wrote: > I use VB as develop tool and ADO for connect. My code is show below and > for vPicMember is stand ADOStream in Binary. > > rs.Open "SELECT * FROM t_mbrpic WHERE mbrsysid = " & vSysId, conn, > adOpenStatic, adLockOptimistic > I

Re: [SQL] Image Insert Postgresql DB

2004-11-22 Thread Kenneth Gonsalves
On Tuesday 23 November 2004 12:48 pm, Premsun Choltanwanich wrote: > I face this same problem when I try to insert image by lo_import to > database with my client files. I already change the way to bytea data > type but it's not work. The error return like type mismatch when I try > to insert it fr

Re: [SQL] Image Insert Postgresql DB

2004-11-22 Thread Kenneth Gonsalves
On Tuesday 23 November 2004 09:51 am, sreejith s wrote: > Query to insert >  > INSERT INTO Imagetable VALUES (lo_import('C:\\image\\peach.jpg')); have you succeeded in inserting an image into the database from a file on the server using the above query? AFAIK you need a bytea

[SQL] anounce

2004-11-12 Thread Kenneth Gonsalves
pls check this out: http://linux-bangalore.org/2004/talks/shortlist1.php kg ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [SQL] backup of a specific schema

2004-08-28 Thread Kenneth Gonsalves
On Saturday 28 August 2004 06:18 pm, Gaetano Mendola wrote: > | > | backup/restore > > Well, that chapter speak about pg_dump, don't you had the curiosity > to look at the complete options for that command ? :-) yes. so i looked in the book from which i was learning postgres. it gave about 3 opt

Re: [SQL] backup of a specific schema

2004-08-27 Thread Kenneth Gonsalves
On Friday 27 August 2004 01:17 pm, Michalis Kabrianis wrote: > Kenneth Gonsalves wrote: > > hi, > > is there anyway to backup/restore a specfic schema in a database? > > Hi, > isn't this what pg_dump --schema=SCHEMA does? thanx - was looking in the wrong place in the

[SQL] backup of a specific schema

2004-08-27 Thread Kenneth Gonsalves
hi, is there anyway to backup/restore a specfic schema in a database? -- regards kg http://www.onlineindianhotels.net - fastest hotel search website in the world http://www.ootygolfclub.org ---(end of broadcast)--- TIP 8: explain analyze is your fr

Re: [SQL] from PG_DUMP to CVS

2004-08-26 Thread Kenneth Gonsalves
On Thursday 26 August 2004 04:48 pm, Philip Warner wrote: > At 08:43 PM 26/08/2004, Riccardo G. Facchini wrote: > >If you know of something even similar to what I'm looking for, let me > >know. > > My thinking is to modify pg_dump to add a new output format, but I'd like > to get some more feedback

Re: [SQL] surrogate key or not?

2004-08-07 Thread Kenneth Gonsalves
On Sunday 08 August 2004 06:36 am, Oliver Elphick wrote: > On Sat, 2004-08-07 at 05:00, Kenneth Gonsalves wrote: > > why shouldnt the primary key change? the only key that should never > > change is a key that is used as a foreign key in another table. In a > > table like th

[SQL] reply to setting

2004-08-06 Thread Kenneth Gonsalves
hi, any reason why the default reply-to on this list should not be set to the list? I keep replying to postings only to find later that the reply goes to the OP and not to the list. reply-all button results in needless duplication -- regards kg http://www.onlineindianhotels.net - fastest hotel

Re: [SQL] surrogate key or not?

2004-08-06 Thread Kenneth Gonsalves
On Saturday 07 August 2004 04:12 am, Josh Berkus wrote: > > > Meanwhile, every other aspect of the data can change (e.g. a person can > > change his name, sex, age, email, address, even date & place of birth). > > Not to mention data entry mistakes. So it's impossible to use any > > "real"/natural

Re: [SQL] surrogate key or not?

2004-07-27 Thread Kenneth Gonsalves
On Wednesday 28 July 2004 06:59 am, Iain wrote: > > couldnt you do something like, let them write the 'long flaky text', and > > at > > > the same time mark a certain number of key words or key phrases which > > could > > > be stored and retrieved? > > I was thinking along similar lines. On one ha

Re: [SQL] surrogate key or not?

2004-07-27 Thread Kenneth Gonsalves
On Tuesday 27 July 2004 02:04 am, Karsten Hilbert wrote: > One thing we ARE looking for in our records is the ability to > find groups of patients by arbitrary criteria since one day > I'll have to find all my patients whose father took a statine, > whose second-born child suffered a bout of neutr

Re: [SQL] surrogate key or not?

2004-07-23 Thread Kenneth Gonsalves
On Friday 23 July 2004 04:47 pm, Michael Glaesemann wrote: > > id serial unique > > namevarchar(25) not null > > primary key is name - after all, you are going to search this on name > > arent > > you? or is there some advantage in doing it your way? > > Also, your explanation "after all,

Re: [SQL] surrogate key or not?

2004-07-23 Thread Kenneth Gonsalves
On Friday 23 July 2004 03:29 pm, Michael Glaesemann wrote: > > You appear to be misunderstanding the purpose of a primary key. A > primary key is used to ensure there is a way to identify each row > uniquely. It is quite independent of which columns you may or may not > want to search on. If name

Re: [SQL] surrogate key or not?

2004-07-23 Thread Kenneth Gonsalves
On Friday 23 July 2004 12:27 pm, Karsten Hilbert wrote: > BTW, our full schema is here: > > http://www.hherb.com/gnumed/schema/ i was looking at your schema. i'm not a database pro, but in master tables i see you have made the serial id as the primary key. i do it this way: id serial uniqu

Re: [SQL] next integer in serial key

2004-07-22 Thread Kenneth Gonsalves
On Thursday 22 July 2004 05:45 pm, Oliver Elphick wrote: > On Thu, 2004-07-22 at 12:48, [EMAIL PROTECTED] wrote: > > Actually it does work, call nextval to get your next value, then call > > your INSERT statement, > > explicitly giving said value for the serial column. Then you can > > proceed wit

Re: [SQL] next integer in serial key

2004-07-22 Thread Kenneth Gonsalves
On Thursday 22 July 2004 05:18 pm, [EMAIL PROTECTED] wrote: > Alternatively, you can do: > INSERT (accepting the default) > then SELECT currval(the_sequence_object); > then did this. barf: foreign key not in original table -- regards kg http://www.onlineindianhotels.net - hotel bookings reser

[SQL] next integer in serial key

2004-07-21 Thread Kenneth Gonsalves
hi, how does one get the next number in a serial type row? -- regards kg http://www.onlineindianhotels.net - hotel bookings reservations in over 4600 hotels in India http://www.ootygolfclub.org ---(end of broadcast)--- TIP 7: don't forget to incre

[SQL] schemas

2004-07-13 Thread Kenneth Gonsalves
hi, can anyone tell me which is the earliest version of postgres to support schemas -- regards kg http://www.onlineindianhotels.net - hotel bookings reservations in over 4600 hotels in India http://www.ootygolfclub.org ---(end of broadcast)--- TI

Re: [SQL] finding if a foreign key is in use

2004-06-30 Thread Kenneth Gonsalves
On Tuesday 29 June 2004 07:19 pm, Phil Endecott wrote: > Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > in my app i have a table where the id serves as a foreign key for > > one or more other tables. if i want to delete a row in the table, > > i currently search the ot

[SQL] finding if a foreign key is in use

2004-06-28 Thread Kenneth Gonsalves
in my app i have a table where the id serves as a foreign key for one or more other tables. if i want to delete a row in the table, i currently search the other tables where this table is referenced to see if the row is in use - and then, if not in use, permit deletion. Now if i want the delete

[SQL] SET idiom in insert statement

2004-04-14 Thread Kenneth Gonsalves
hi, does any version of postgresql support the 'SET' idiom in an insert statement? Need this to generate an insert statement from a python dictionary -- regards kg -- http://www.ootygolfclub.org ---(end of broadcast)--- TIP 6: Have you searched ou

[SQL] updating remote database

2004-02-25 Thread Kenneth Gonsalves
i have a database on a local machine, and another on a remote machine. I have a dialup connection between the two - so band width is a problem. What is the most efficient way of updating the remote from the local? Does SQL or postgres have simple commands for this? -- regards kg -- http://www.

Re: [SQL] comparing nulls

2004-01-20 Thread Kenneth Gonsalves
On Tuesday 20 January 2004 19:26, Chris Bowlby wrote: > Hi Ken, > > Under 7.3.x this option was removed, you need to test via: > > SELECT * from table where field IS NULL; thanx - works in both 7.1 and 7.3 - why do these guys keep fooling around with these thangs? -- regards kg http://www.ooty

[SQL] comparing nulls

2004-01-20 Thread Kenneth Gonsalves
in postgres7.1 i had a table where an integer field could be null. There was no default value. a select statement like so: 'select * from table where field = null' would give all the rows where that field had no value. on porting to 7.3.2, this doesnt work. How to do this? -- regards kg http://

Re: [SQL] unique constraints

2004-01-07 Thread Kenneth Gonsalves
On Wednesday 07 January 2004 23:01, Michael Fuhr wrote: > On Wed, Jan 07, 2004 at 07:47:32PM +0530, Kenneth Gonsalves wrote: > > in 7.4 i'm getting an error message - UNIQUE constraint matching keys for > > table 'xxx' not found - any clues? > > It would be h

[SQL] unique constraints

2004-01-07 Thread Kenneth Gonsalves
in 7.4 i'm getting an error message - UNIQUE constraint matching keys for table 'xxx' not found - any clues? -- regards kg http://www.ootygolfclub.org poor man's tally: http://avsap.sourceforge.net ---(end of broadcast)--- TIP 9: the planner will

[SQL] schema

2003-11-16 Thread Kenneth Gonsalves
hi where can i find infor about 'schema' in postgresql? -- regards kg http://www.ootygolfclub.org ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match