[GENERAL] Re: [HACKERS] Gregorian Calendar
On Mon, 12 Apr 1999, José Soares wrote: > $ cal 9 1752 The cal program has special hacks for that case. The date system doesn't know about the Gregorian Reform of dates. Taral
RE: [GENERAL] problem of upper/lower case in table names
> >i've got this annoying problem : if you create a table with an uppercase > >name, postgres transforms it in lower case. After that, if you try to > >retrieve the primary keys for this table ( still using the uppercase > >name as argument ) using the JDBC driver > >DatabaseMetaData.getPrimaryKeys(), it always return an empty result set > >since the SQL command used in the driver requests a case sensitive match > >for the table name ( and bc.relname ~ table ). > >I've a workaround in the driver ( using bc.relname ~* table ) but i'd > >like to know who's fault it is ( mine or postgres ) > >Thanks for your advices & help Try quoting the names... i.e. CREATE TABLE "TEST" etc. Taral
RE: [GENERAL] date null
use IS NOT NULL: SELECT * from prestito WHERE notifica1 IS NOT NULL OR notifica2 IS NOT NULL OR notifica3 IS NOT NULL; I seem to remember that the equality/inequality operators don't work on NULL right now... Taral > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of ZioBudda > Sent: Friday, October 23, 1998 7:47 AM > To: [EMAIL PROTECTED] > Subject: [GENERAL] date null > > > Hi, how can control in a "select" if a date is not null? > I have this table: > Table= prestito > +--+-- > +---+ > | Field | Type| > Length| > +--+-- > +---+ > | id_libro | varchar() not null | > 10 | > | id_utente| int4 not null| > 4 | > | data_prestito| date | > 4 | > | data_restituzione| date | > 4 | > | n_gg_prestito| int4 not null| > 4 | > | notifica1| date | > 4 | > | notifica2| date | > 4 | > | notifica3| date | > 4 | > +--+-- > +---+ > > and I want to select only tuples in which notifica1 or notifica2 or > notifica3 are not null. > > > "Il divertimento e' giusto se la scimmia ci prende gusto" > -- > Pluto Linux Press: http://ziobudda.enter.it/PLP > -- > Morelli 'ZioBudda' Davide Michel - Member of Pluto Linux User Group > [EMAIL PROTECTED] - http://ziobudda.enter.it/ > Linux Problem? Ask to [EMAIL PROTECTED] > "/dev/ziobudda: access to /var/tmp/beer denied, use /var/adm/pineapple" > >
RE: [GENERAL] select and join
> i have make this try: > esame=> select utente.cognome, prestito.id_utente, libro.tipo, > count(*) from prestito, libro where libro.id_libro = > prestito.id_libro and utente.id_utente = prestito.id_utente group > by id_utente, tipo\g > > but the output is : > ERROR: parser: illegal use of aggregates or non-group column in > target list I keep seeing this... When doing something like this, you must have ALL non-aggregate columns in the GROUP BY. So: (note you also forgot to update the FROM) SELECT utente.cognome, prestito.id_utente, libro.tipo, count(*) FROM prestito, libro, utente WHERE libro.id_libro = prestito.id_libro AND utente.id_utente = prestito.id_utente GROUP BY cognome, id_utente, tipo; Taral
RE: [GENERAL] Making NULLs visible.
> Yes, \ always outputs as \\, excepts someone changed it last week, and I > am requesting a reversal. Do you like the \N if it is unique? Well, it's certainly clear, but could be confused with \n (newline). Can we have \0 instead? Taral
RE: [GENERAL] Making NULLs visible.
> How do you feel about displaying nulls as \N, as we do in the COPY > output? And when I put \N in a text field? How do I distinguish? We need some kind of escaping system here... like turn '\' into '\\' and then '\N' is unique and non-textual. :) Also allows us to output control characters, etc., in a manner that is completely parsable. Taral