Re: [GENERAL] Removing OIDs without recreate

2004-05-07 Thread 'Karel Zak'
ALTER TABLE ... WITHOUT OIDS (Rod) -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] C Functions, datatypes

2004-05-04 Thread Karel Zak
nyone > has some example code illustrating this, that'd be great. -Adam I think best examples you can found in the pgsql/src/backend/utils/adt directory where is almost all PostgreSQL code with datatypes. Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakk

Re: [GENERAL] [HACKERS] Slony-I goes BETA

2004-06-04 Thread Karel Zak
?news_id=174 Jan, the link http://postgresql.org/~wieck/slony1/Slony-I-concept.pdf that is used on project pages doesn't work :-( Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ ---(end of broadcast)--- TI

[GENERAL] Re: Please help!

2001-07-11 Thread Karel Zak
there is a > Try "\df to_char" to see how/if to_char is defined in 6.5.3 - if you have > one with timestamp,text try something like: You needn't try it, the to_char/date is in 7.x versions only. Update you system :-) Karel -- Karel Zak <[

[GENERAL] Re: Re: Storing images in PG?

2001-08-16 Thread Karel Zak
s also portable to other SQLs because depend on your frontend application only. I haven't care about CPU time for this, the base64-algorithm is bit operation only, a problem can be 30% grow of data... (you can use "lztext" that is compressed datype:-). Ka

[GENERAL] Re: chr() in 7.0.3 !

2001-08-20 Thread Karel Zak
y to get the text from > the ascii number? > 7.1 rename ichar() to chr() --- in 7.0.3 you must use ichar() or rather update to 7.1. Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ C, PostgreSQL, PHP, WWW, http://docs.linu

Re: [GENERAL] Re: createdb -E UNICODE dbname and encoding BIG5 not working

2001-08-28 Thread Karel Zak
directly > > use big5 at server (DB). > > No. \encoding command sets the client encoding, not DB encoding. > So "\encoding BIG5" is a valid command in his case. Oh sorry. I bad read original question and a little puzzle part with createdb and \encodin. Tatsuo is right of cour

[GENERAL] Re: Default encoding in database

2001-08-30 Thread Karel Zak
tname = > 'template1'" template1 IMHO more careful is re-build it by initdb with option -E LATIN1. KArel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[GENERAL] Re: Default encoding in database

2001-08-30 Thread Karel Zak
BTW, I don't understand why you don't create new databases by CREATE DATABASE bar WITH ENCODING = 'foo' or by "createdb -E". Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ C, PostgreSQL

Re: [GENERAL] Humor me: Postgresql vs. MySql (esp. licensing)

2003-10-09 Thread Karel Zak
that any are fully I think very nice example is: SELECT 'a' || 'b'; BTW, MySQL versions without transactions are unusable for 365/7/24 systems, because you cannot make backup of DB without transaction or redo log. Ka

Re: [GENERAL] Humor me: Postgresql vs. MySql (esp. licensing)

2003-10-09 Thread Karel Zak
On Thu, Oct 09, 2003 at 01:33:39PM +0200, Harald Fuchs wrote: > In article <[EMAIL PROTECTED]>, > Karel Zak <[EMAIL PROTECTED]> writes: > > > BTW, MySQL versions without transactions are unusable for 365/7/24 > > systems, because you cannot make bac

Re: [GENERAL] OO database?

2003-12-09 Thread Karel Zak
sql? object-relational database != OO The "object-relational" features are things like dynamic datatypes, function, aggregation functions, user defined operators, etc. http://wwwdb.web.cern.ch/wwwdb/aboutdbs/classification/ Karel -- Karel Zak <[E

Re: [GENERAL] How to backup db with large objects?

2000-06-06 Thread Karel Zak
Karel /* ---- * Karel Zak * [EMAIL PROTECTED] * http://home.zf.jcu.cz/~zakkr/ * C, PostgreSQL, PHP, WWW, http://docs.linux.cz * */

Re: [GENERAL] DateTime fields

2000-06-27 Thread Karel Zak
On Mon, 26 Jun 2000, Tom Lane wrote: > "Dale Anderson" <[EMAIL PROTECTED]> writes: > > I noticed that the DateTime fields and the to_timestamp function > > interpret 12 PM as 00:00 and 12 AM as 12:00. > > Huh? > > Looks fine to me. No, you overlook "to_timestamp()" in query. This routine

Re: [GENERAL] How to dump from Postgre

2000-06-27 Thread Karel Zak
On Tue, 27 Jun 2000, Morten W. Petersen wrote: > How do you dump from the Postgre database? > (i.e. as with MySQL, where you have mysqldump) The PostgreSQL documentation is invisible? Karel

Re: [GENERAL] DateTime fields

2000-06-27 Thread Karel Zak
*/ On Tue, 27 Jun 2000, Dale Anderson wrote: > Here is am example of what I am doing. > > danderso=# \d test >Table "test" > Attribute | Type| Modifier > ---+---+-- > time | timestamp | > > danderso=# insert into test values (to_timestamp('

Re: [GENERAL] number of weeks

2000-07-04 Thread Karel Zak
On Tue, 4 Jul 2000 [EMAIL PROTECTED] wrote: > is there a function that returns the number of weeks since the begining > of the year or the number of days > date_part() or to_char() BTW. --- what is bad on postgresql docs? Karel

RE: [GENERAL] Find all the dates in the calendar week?

2000-07-06 Thread Karel Zak
On Thu, 6 Jul 2000, Andrew Snow wrote: > > See the documentation at: > > http://www.comptechnews.com/~reaster/postgres/functions2976.htm > > > So, something like: > > SELECT event FROM events WHERE to_char(CURRENT_TIMESTAMP, 'ww') = > to_char(eventdate, 'ww'); A small note about 'WW' in to_

Re: [GENERAL] Find all the dates in the calendar week?

2000-07-06 Thread Karel Zak
On Thu, 6 Jul 2000, Thomas Lockhart wrote: > > ISO-week: week that has more than 4 day and start in Sunday. > > In future I try implement 'IW' that is ISO-week, but now I work on different > > things. > > In current 7.0 is probably better for week operations use > > date_part('week', TIMESTAMP)

Re: [GENERAL] Find all the dates in the calendar week?

2000-07-06 Thread Karel Zak
On Thu, 6 Jul 2000, Thomas Lockhart wrote: > > yes, my current to_char() is almost compatible with oracle, but I need > > last two features --- IYYY (ISO-year) and IW (ISO-week). But I not explore > > it exactly yet. I mean that current (PG's) week-of-year is like ISO or not? > > Yes. 'week' i

Re: [GENERAL] Find all the dates in the calendar week?

2000-07-07 Thread Karel Zak
On Thu, 6 Jul 2000, Helge Haugland wrote: > On Thu, Jul 06, 2000 at 15:21:53 +0200, Karel Zak wrote: > > ISO-week: week that has more than 4 day and start in Sunday. > > What about weeks that start in Monday (as here in Norway)? Yes, I known, in my country too. A question is

Re: [GENERAL] Find all the dates in the calendar week?

2000-07-07 Thread Karel Zak
On Fri, 7 Jul 2000, Thomas Lockhart wrote: > > > ISO-week: week that has more than 4 day and start in Sunday. > > What about weeks that start in Monday (as here in Norway)? > > You can probably calculate that from the existing date/time code. But it > isn't ISO-8601. Karel was referring to the

Re: [GENERAL] Stored procs: PL/Tcl only? Settable privs for them?

2000-07-11 Thread Karel Zak
On Tue, 11 Jul 2000, Randall Parker wrote: > I'm trying to figure out how to do in Postgres what I already pretty well understand >in > DB2: Create a stored procedure that accepts a couple of arguments, does a look-up > in a table using those args in a where clause, and then return a boolean

[GENERAL] Re: [HACKERS] 8Ko limitation

2000-07-20 Thread Karel Zak
>what about performances with postgreSQL and large databases, >the object size limitation (8192 bytes) is really not acceptable for this Now you can change this limit in config.h, the possible range is 8Kb - 32Kb. In new 7.1 version will this limit dead forever (see TOAST project).

Re: [GENERAL] Re: [HACKERS] 8Ko limitation

2000-07-20 Thread Karel Zak
On Thu, 20 Jul 2000, Stephane Bortzmeyer wrote: > On Thursday 20 July 2000, at 10 h 0, the keyboard of Karel Zak > <[EMAIL PROTECTED]> wrote: > > > And what is a "large database"? 1, 5 .. 10Gb? If yes, (IMHO) the PostgreSQL > > is good choice. >

Re: [GENERAL] dangers of setlocale() in backend (was: problem with float8 input format)

2000-08-14 Thread Karel Zak
On Sat, 12 Aug 2000, Louis-David Mitterrand wrote: > On Sat, Aug 12, 2000 at 12:15:26PM -0400, Tom Lane wrote: > > Louis-David Mitterrand <[EMAIL PROTECTED]> writes: > > > When "seller_locale" is, for instance, "de_DE", then I get theses > > > errors: > > > ERROR: Bad float8 input format '0.

Re: [GENERAL] replication

2000-09-21 Thread Karel Zak
On Thu, 21 Sep 2000, Adam Lang wrote: > Are there any type of replication features in postgresql 7.0? Not exist some standard solution for PG for DB replication ... Maybe in a far future (via some WAL logs?). Karel

[GENERAL] Re: [HACKERS] How to print explain using PHP

2001-01-14 Thread Karel Zak
On Tue, 9 Jan 2001, Bruce Momjian wrote: > I think the issue here was that these functions don't make any sense for > PHP because you can't register C functions. I mean (I know) that you can register some common (internal) PHP function and this function can call your PHP function. It is some u

[GENERAL] Re: to_char WW

2001-01-15 Thread Karel Zak
On Sun, 14 Jan 2001, gravity wrote: > Karl, > > you implemented to_char if I'm not mistaken. > > May I ask how you got to the algorithm for WW (weeknumber of the year) and why? > > eg: > znc=# select to_char(now(),'DD-MM- HH24:MI "week" WW'); > to_char > ---

[GENERAL] Re: Can you help a newbie?

2001-02-07 Thread Karel Zak
On Wed, 7 Feb 2001, Jamie Bumsted wrote: > Hi All, > I am new to pgsql, I have inherited a database with no documentation, i.e. > nobody knows the passwords for any of the database accounts. Anybody have > any ideas on how to change the passwords without first knowing the > passwords? As syst

[GENERAL] Re: AllocSetAlloc()

2001-02-21 Thread Karel Zak
On Wed, 21 Feb 2001, Tom Lane wrote: > Antonis Antoniou <[EMAIL PROTECTED]> writes: > > I would like to know what is causing this error. The machine has 1GB of > > memory and I use PostgreSQL 7.1beta4. > > The same function on PostgreSQL 7.0.2 works ok. Could someone explain > > me what th

[GENERAL] Re: to_date & to_char with postgres 6.5 & 7.0

2001-02-28 Thread Karel Zak
ind the postgres65.sql to install this functions under postgres 65 ? Not exists for 6.5, it's in 7.0 and later. Go and migrate to postgres 7.0.x now :-) Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ C, PostgreSQL, PHP, WWW, http://docs

[GENERAL] Re: DES in Postgres?

2001-03-01 Thread Karel Zak
I > don't know C. In the 7.1 contrib tree is nice crypto module, perhaps (I hope) contains DES too. Only 2 weeks to this release... Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

[GENERAL] Re: Delete Cascade

2001-03-12 Thread Karel Zak
] [ ON UPDATE action ] [ [ NOT ] DEFERRABLE ] [ INITIALLY checktime ] Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz ---(end of broadca

[GENERAL] Re: stored procedure and timestamp

2001-03-29 Thread Karel Zak
n the time as of the start of the current transaction; their values do not increment while a transaction is running. But timeofday() returns the actual current time. CURRENT_TIMESTAMP = now() = timestamp 'now' Karel -- Karel Zak

[GENERAL] Re: problems with pg_dumplo (was Re: backup with blobs)

2001-04-20 Thread Karel Zak
options for your DB] > my.dump DROP DATABASE my_db; CREATE DATABASE my_db; psql my_db < my.dump pg_dumplo -i -d my_db -s /my_dump/dir Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ C, PostgreSQL, PHP, WWW, http://docs.linux.cz,

[GENERAL] Re: static variables in functions

2001-04-20 Thread Karel Zak
.etc. Or is possible define arbitrary function as cacheable. Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz ---(end of broadcast)---

[GENERAL] Re: Performance: sql functions v. plpgsql v. plperl

2001-04-26 Thread Karel Zak
On Wed, Apr 25, 2001 at 05:03:51PM -0400, Tom Lane wrote: > Joel Burton <[EMAIL PROTECTED]> writes: > > couldn't the parse tree be cached from this for each backend? > > Yes, if someone wanted to work on it ... It needs global query plan cache and integrate it to SQL function handler. The usabl

[GENERAL] Re: Autonumber

2001-05-07 Thread Karel Zak
On Thu, May 03, 2001 at 11:11:20AM -0700, Terry Fielder wrote: > Is there an autonumber data type in postgreSQL? > "SERIAL" CREATE TABLE xxx (id SERIAL, data TEXT); or see docs for 'create sequence' -- it's more controllable stuff.

Re: [GENERAL] OID output problems

2000-05-02 Thread Karel Zak
On Tue, 2 May 2000, surfer girl wrote: > Hello, > > I am trying to write a program that will input and output images from a Postgres >database using PHP. > > The inputting seems to be going fine - well, it seems to be fine, since I can't >test it because it's the output I'm stuck on. > >

Re: [GENERAL] operator *=

1999-12-09 Thread Karel Zak - Zakkr
On 9 Dec 1999, Sascha Ziemann wrote: > Hi, > > I have two tables "user_t" and "email_alias_t". The "user_t" table > has the two fields "last_name" and "linux_login" and the > "email_alias_t" table has the two fields "login" and "alias". > > In some rows in the "user_t" table the entry "linux_

Re: [GENERAL] Future of PostgreSQL

1999-12-27 Thread Karel Zak - Zakkr
n - good LO support must be in more next PgSQL versions too. Karel ------ Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ Docs:http://docs.linux.cz

Re: [GENERAL] Future of PostgreSQL

1999-12-27 Thread Karel Zak - Zakkr
On Sun, 26 Dec 1999, Howie wrote: > On Sat, 25 Dec 1999, Bruce Momjian wrote: > > > > > > > > > > On Sat, 25 Dec 1999, Bruce Momjian wrote: > > > > My big question is, what new challenges will we face as > > > > we become more popular? > > > > > > Plug-in Oracle 7 compatibility. > > > > I

Re: [GENERAL] More newbie question: Restructuring a table

2000-03-01 Thread Karel Zak - Zakkr
On Wed, 1 Mar 2000, Timothy Grant wrote: > Hi again, > > Is there a quick and dirty way that I am missing for creating a new > database with a slightly different schema than the old db? > > For example, I have a table with a DATETIME field that I really need to > change to a DATE field. > > I

Re: [GENERAL] Use of datepart() on TimeStamp.

2000-02-01 Thread Karel Zak - Zakkr
On Tue, 1 Feb 2000, Jose Soares wrote: > I suppose do you refer to PostgreSQL date_part() function, while datepart() is a > M$Access function. Sorry, next time I read it better... Hmm, datepart/date_part, it is very simular - IMHO any Micro$oft surely copy this function from the best SQL - f