Re: [SQL] '13 months ago'::reltime
Christopher Sawtell writes: > On Friday 04 May 2001 06:32, you wrote: > > Type reltime is old and deprecated. Don't use it. > > What should we be using instead? interval -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [SQL] Dateadd
Folks, FYI - this difference in syntax is because PostgreSQL implements real SQL operators (i.e. what the operator does and what arguments it takes depend on the data types involved) and Microsoft does not (in MS SQL, operators mean the same thing for almost all data types). Speaking of which, why doesn't PostgreSQL allow the use of "+" between two VARCHARs to mean the same as "||" ? Is there an addition operation for PgSQL for VARCHAR other than concatination? -Josh > > I need to know if there is a sql function implemented in postgres > that gives > > me a date plus any number of days, months or years (the traditional > dateadd > > function) or how to do it in sql? __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293 for law firms, small businessesfax 621-2533 and non-profit organizations. San Francisco ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
[SQL] Need help with search-and-replace
Folks, I need to strip certain columns out of my pgdump file. However, I can't figure out how to use any Unix-based tool to search-and-replace a specific value which includes a tab character (e.g. replace "{TAB}7 00:00:00" with "" to eliminate the column). RIght now, I'm copying the file to a Win32 machine and using MS Word for the search-and-replace, but I'm sure there's got to be a better way ... *without* learning VI or Emacs. Help? -Josh __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293 for law firms, small businessesfax 621-2533 and non-profit organizations. San Francisco ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [SQL] Dateadd
"Josh Berkus" <[EMAIL PROTECTED]> writes: > Speaking of which, why doesn't PostgreSQL allow the use of "+" between > two VARCHARs to mean the same as "||" ? You mean, other than the fact that "||" is the SQL-standard string concatenation operator and "+" isn't? I'm not eager to follow the pied pipers from Redmond down the garden path to completely standards-ignorant products. *Someone's* got to stick up for standards compliance. Microsoft has a vested interest in locking people into their code via gratuitously nonstandard notations ... but let's not be like them. There was some talk recently of putting together packages of function and operator definitions to ease portability from other DBMSes to PG. I'd have no objection to including "+ as string concatenation" in a set of operators that're clearly marked as MS-SQL-isms. But I don't think we'd do the world any favor by adopting a clearly nonstandard notation as part of our standard operator set. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster