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 wrote: > From: Dev Kumkar > Subject: [SQL] Unquoted column names fold to lower case > To: pgsql-sql@postgresql.org > Date: Wednesday, July 3, 2013, 5:12

[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 wrote: > From: Br

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

2005-12-04 Thread Theodore Petrosky
on for my email software... yours is a little 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

[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 '11/20/

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
lt;[EMAIL PROTECTED]> wrote: > On Sun, 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) &

[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

Re: [SQL] schemas and paths with the alter statement

2005-02-22 Thread Theodore Petrosky
Wow...in less than 5 minutes Thanks Ted --- Tom Lane <[EMAIL PROTECTED]> wrote: > Theodore Petrosky <[EMAIL PROTECTED]> writes: > > ALTER TABLE public.test ADD CONSTRAINT > public.test_PK > > PRIMARY KEY (test); > > Constraints don't have sche

[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 publi

[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 th

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 a

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 '::' sh

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 16:00'::timesta

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

2004-07-11 Thread Theodore Petrosky
ssage 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 underst

[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 jobnumb

[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! Finan

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

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

2004-05-15 Thread Theodore Petrosky
uotes. Do you have any ideas? If I reimport this dump file the triggers won't work when it meets a row with a dot in the column. Of course I can just update my data to use the underscore instead of the dot. Ted --- Stephan Szabo <[EMAIL PROTECTED]> wrote: > > On Wed, 12 May 200

[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 R

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 >

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

2004-05-06 Thread Theodore Petrosky
path. > > I see it this way more simple, maybe other have > other opinions. > > Best regards, > Andy. > > - Original Message - > From: "Theodore Petrosky" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, May 05, 2004 6:10 PM > Su

[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 looki

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 ta

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 >

Re: [SQL] Bad encoding in URL

2003-10-07 Thread Theodore Petrosky
Maybe you want to look here: http://www.brasileiro.net/postgres/cookbook/ mimic oracle's replace function. versions in pltcl and plpgsql. If the function you want isn't built in to posgresql... Ted --- HR <[EMAIL PROTECTED]> wrote: > Hi > > I have some URLs in a database but some of the URL

[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) p

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 listeni

[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) p