Re: [SQL] Unquoted column names fold to lower case

2013-07-03 Thread Theodore Petrosky
sorry, but you misunderstand. this is the correct behavior of SQL. It is part of the specification to do this. --- On Wed, 7/3/13, Dev Kumkar devdas.kum...@gmail.com wrote: From: Dev Kumkar devdas.kum...@gmail.com Subject: [SQL] Unquoted column names fold to lower case To:

[SQL]

2011-10-11 Thread Theodore Petrosky
...This site has almost all you need! http://avto-partner.si/com.friend.php?oshowtopic=48n9 -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Dates and NULL's`

2011-05-10 Thread Theodore Petrosky
If you think of it more like a null is an unknown. two unknowns can never be the same. they are unknown. and a known date can never equal an UNknown date. if the unknown date is equal to a date, then it is known my head hurts!! Ted --- On Tue, 5/10/11, Brent Dombrowski

Re: [SQL] question using 'between' in a sql query

2005-12-04 Thread Theodore Petrosky
easier to read (human).. Thanks again, Ted --- Michael Fuhr [EMAIL PROTECTED] wrote: On Sat, Dec 03, 2005 at 09:54:16AM -0800, Theodore Petrosky wrote: if 'between' is inclusive of the start and end dates why doesn't this query result in all the rows on '11/20/2005'? EXPLAIN shows what

[SQL] question using 'between' in a sql query

2005-12-03 Thread Theodore Petrosky
My table create table mytable ( employeecode text, info text, somestuff text, insertdate timestamp with time zone); I have an interface where the user can query for all employeecode between two dates. I assumed from the docs that: SELECT employeecode FROM mytable WHERE insertdate BETWEEN

Re: [SQL] getting back autonumber just inserted

2005-07-07 Thread Theodore Petrosky
you have to use currval inside a transaction... begin; insert something that increments the counter; select currval('sequence_name'); end; using currval inside a transaction guarantees that the value is correct for your insert statement and has not changed by another insert statement. Ted

Re: [SQL] info

2005-06-20 Thread Theodore Petrosky
do you 'need' to know or 'want' to know. and I guess that depends on how you define 'to' but also... is there a particular 'somebody' that you are interested (wanting or needing) in --- Luca Rasconi [EMAIL PROTECTED] wrote: I need to know if somebody read this mail. bye

Re: [SQL] to_char(interval) ?

2005-04-25 Thread Theodore Petrosky
, Apr 24, 2005 at 13:08:04 -0700, Theodore Petrosky [EMAIL PROTECTED] wrote: how do I get an interval '1 day 1 hour' to display as '25 hours'. I am hunting in the docs (and googling) and either I am blind or I need a special function? Is there an easy way? EXTRACT epoch from

[SQL] to_char(interval) ?

2005-04-24 Thread Theodore Petrosky
how do I get an interval '1 day 1 hour' to display as '25 hours'. I am hunting in the docs (and googling) and either I am blind or I need a special function? Is there an easy way? Ted __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam

[SQL] schemas and paths with the alter statement

2005-02-22 Thread Theodore Petrosky
I have to first admit that I am very green at this. I thought that one could refer to a table in a fully qualified path... public.testtable I am fooling around with webobjects and EOModeler. at one point it creates the sql to create my table structure and it does something like: ALTER TABLE

[SQL] locale with os x

2005-02-02 Thread Theodore Petrosky
The solution to locales on OS X. initdb --locale=es_ES.ISO8859-1 ~/testdb worked great the settings are at: /usr/share/locale/ I asked on the OS X discussion board in the UNIX section... Ted __ Do you Yahoo!? Yahoo! Mail - Easier

Re: [SQL] case sensitive/insensitive confusion

2005-02-01 Thread Theodore Petrosky
I seem to have a problem with controlling the locale. Mac os x, postgresql 8.0.1 ./configure --with-rendezvous --enable-thread-safety --enable-locale but when I try: initdb --locale=es_ES ~/testdb I get: The files belonging to this database system will be owned by user postgres. This user

Re: [SQL] postgreSQL 8beta

2004-11-14 Thread Theodore Petrosky
Are you asking for a column of type 'unknown'? I don't understand what this column would be able to do. Ted --- beyaNet [EMAIL PROTECTED] wrote: Hi, does postgresql have a datatype 'other' which in hsqldb is an Object? I am trying to convert the table below into postgreSQL 8:

Re: [SQL] A transaction in transaction? Possible?

2004-11-09 Thread Theodore Petrosky
I thought nested transactions are available in the new release (8) coming up. Ted --- Andrei Bintintan [EMAIL PROTECTED] wrote: Is it possible to have another transatction in a transaction??? In the following example the last ROLLBACK is totally ignored(transaction1). //connect to

Re: [SQL] How to check postgres running or not ?

2004-09-20 Thread Theodore Petrosky
Funny... I set up a little program on my development machine that queries for the rendezvous name. This way I know my development machine is running before I try to connect. I think zeroconf could be used for this quite easily... JMHO Ted --- Arne Stoelck [EMAIL PROTECTED] wrote: How

Re: [SQL] Please help me.. problem in to_char

2004-07-21 Thread Theodore Petrosky
what kind of column is t1.created? It appears that it is a text column and the format looks like a date. Is this correct or is it a date? I need more information about your table structure. What about: SELECT t2.id, t2.name, to_char(cast (t1.created as date),'DD/MM/') but the other '::'

Re: [SQL] Problem in age on a dates interval

2004-07-16 Thread Theodore Petrosky
Luis, wow at first I thought I had my head around a leap year problem so I advanced your query a year testbed=# SELECT age('2005-05-14 16:00'::timestamp,'2005-02-18 16:00'::timestamp); age 2 mons 24 days (1 row) testbed =# SELECT '2005-02-18

[SQL] please help me with text cast to int ....

2004-07-11 Thread Theodore Petrosky
I give up.. what don't I understand about casting and ints and text.. i have a table jobinfo with: acode text, jobnumber text default nextval('public.jobinfo_seq'::text), jobtitle text I have about 3000 rows starting with jobnumber = 1000. SELECT jobnumber, jobtitle FROM jobinfo WHERE

Re: [SQL] please help me with text cast to int ....

2004-07-11 Thread Theodore Petrosky
however I failed to see it. Silly me, I kept thinking that it was an error code that I didn't recognize... Thanks again. Ted --- Stephan Szabo [EMAIL PROTECTED] wrote: On Sun, 11 Jul 2004, Theodore Petrosky wrote: I give up.. what don't I understand about casting and ints and text

[SQL] need help with os x objects into a db

2004-06-03 Thread Theodore Petrosky
Does anyone here have experience with OS X and storing NSData objects in a postgresql db? I have archived data that I want to store in a bytea column. I just can not get it to work. I hope there is a kind soul that can help Ted __ Do you Yahoo!? Yahoo!

Re: [SQL] where is this problem (trigger)

2004-05-15 Thread Theodore Petrosky
data to use the underscore instead of the dot. Ted --- Stephan Szabo [EMAIL PROTECTED] wrote: On Wed, 12 May 2004, Theodore Petrosky wrote: I can not seem to update these rows because of the dot in the jobnumber field. I have found that I can change the dot to an underscore but I

Re: [SQL] where is this problem (trigger)

2004-05-15 Thread Theodore Petrosky
Ignore that last post of course I have a production machine and a development machine and I should have updated the development machine before opening my mouth... Everything works just fine thanks. Ted --- Theodore Petrosky [EMAIL PROTECTED] wrote: Great I got the double quotes

[SQL] where is this problem (trigger)

2004-05-12 Thread Theodore Petrosky
I fire this trigger whenever my client updates a row in the db: CREATE FUNCTION notify_jobinfo() RETURNS trigger AS ' BEGIN EXECUTE ''NOTIFY ''||TG_RELNAME||''_''||NEW.jobnumber; RETURN NEW; END ' LANGUAGE plpgsql; CREATE TRIGGER notify_jobinfo AFTER UPDATE ON jobinfo FOR EACH

Re: [SQL] not really SQL but I need info on BLOBs

2004-05-10 Thread Theodore Petrosky
, the raid that would store the images would be seen as 'local' to as many servers (running different client services) as the SAN could support. Thanks for the reply. Ted --- Denis Braekhus [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Theodore Petrosky wrote: | I am

Re: [SQL] not really SQL but I need info on BLOBs

2004-05-06 Thread Theodore Petrosky
we will use more discs (we are not using 2 yet) and there is no difference in this case how many discs you use, because in the DB you store only the path. I see it this way more simple, maybe other have other opinions. Best regards, Andy. - Original Message - From: Theodore

[SQL] not really SQL but I need info on BLOBs

2004-05-05 Thread Theodore Petrosky
Hi, I am starting a new project where I need to store a lot of tiff images. So the question beckons... which is better (not correct)? store a blob in the database and let the db manage the data or store the image in a directory and store the path to the data in the db. What are your opinions? Is

[SQL] notify and leaks?

2004-04-07 Thread Theodore Petrosky
I am using postgresql as the backend to a job tracking system. My front app is running only on Mac OS X. I have been using notifications from postgresql to tell my user if the current record they are looking at has been updated by someone else. Obviously I am only 'listening' when a user is

Re: [SQL] restoring database

2003-12-22 Thread Theodore Petrosky
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 this method is inconvenient (to say the least). However

Re: [SQL] Getting last insert value

2003-11-15 Thread Theodore Petrosky
what does that mean the 'last row'? if client 1 inserts then client 2, the last row is client 2. do you want to know what row client 1 inserted? Personally I think your question is too broad. What are you trying to accomplish? Ted --- Yasir Malik [EMAIL PROTECTED] wrote: Hello, I have a table

Re: [SQL] URGENT!!! changing Column size

2003-10-28 Thread Theodore Petrosky
why not just pg_dump dbname olddb.out pico olddb.out edit the section that defines the table save and exit dropdb dbname createdb dbname psql dbname olddb.out no fuss no muss... Ted --- [EMAIL PROTECTED] wrote: Hi can we change the size of a column in postgres. I have a table named

Re: [SQL] Timestamp

2003-10-22 Thread Theodore Petrosky
Check this out http://www.postgresql.org/docs/7.3/static/functions-formatting.html to_char(departure, 'MM-DD- HH24:MI:SS') as newformatdeparture Ted --- Abdul Wahab Dahalan [EMAIL PROTECTED] wrote: Hi ! In my database I've a field departure with timestamp without time zone data

[SQL] help with rule and notification

2003-10-03 Thread Theodore Petrosky
I don't know if this is the correct forum for this question but I will start here... I have a job tracking system that I am developing with postgresql and mac os x. I have all the pieces in place (mostly) but i am having a problem with notify.. I am trying to set up things so that two (or more)

Re: [SQL] help with rule and notification

2003-10-02 Thread Theodore Petrosky
pretty excited about using notify,... Ted --- Tom Lane [EMAIL PROTECTED] wrote: Theodore Petrosky [EMAIL PROTECTED] writes: create rule r1 as on update to table1 do (update table2 set jobno = table1.jobno; notify table2;) so anyone listening for notifications on table2 can ask table2

[SQL] help with rule and notification

2003-10-01 Thread Theodore Petrosky
I don't know if this is the correct forum for this question but I will start here... I have a job tracking system that I am developing with postgresql and mac os x. I have all the pieces in place (mostly) but i am having a problem with notify.. I am trying to set up things so that two (or more)