[GENERAL] trouble selecting from array

2008-03-27 Thread brian
Using 8.3 I have a table which has a column (tdr_tags) defined as integer[][]. The table description shows the column as integer[]. I understand from the docs that this is normal ("declaring number of dimensions or sizes in CREATE TABLE is simply documentation"). If I select the column as td

Re: [GENERAL] trouble selecting from array

2008-03-27 Thread brian
Tom Lane wrote: brian <[EMAIL PROTECTED]> writes: If I select the column as tdr_tags I get: {{161377},{32}} {{206507},{39}} {{232972,292831},{45,51}} ... But, wanting just the 2nd inner array, if I try tdr_tags[2] I get NULL. If you want a sub-array you need to use the slice no

Re: [GENERAL] table of US states' neighbours

2008-03-28 Thread brian
Michael Fuhr wrote: On Thu, Mar 27, 2008 at 06:00:57PM -0400, Colin Wetherbee wrote: brian wrote: I'd like to add a table, state_neighbours, which joins each state with all of its neighbour states. Does anyone know where I can find such a list? I'm not interested in "nearest n

Re: VS: [GENERAL] Delete after trigger fixing the key of row numbers

2008-03-28 Thread brian
Teemu Juntunen, e-ngine wrote: Hi Tomasz, with receipt rows I can't see any other option with key as running number. First I tried to use serial, but it didn't start from zero again when the foreign key (receipt number) changes. It just continues the serial despite of the foreign key. Then I

Re: [GENERAL] Primary Key with serial

2008-03-28 Thread brian
x asasaxax wrote: Hi, I have the following tablecreate table product(cod serial, user_cod bigint, constraint product_fk Foreign Key(user_cod) references user(cod), constraint product_pk Primary Key(cod, user_cod)); What i want to happend is that: user_codcod 1

Re: [GENERAL] shortcut for select * where id in (arrayvar)

2008-03-30 Thread brian
Ivan Sergio Borgonovo wrote: I'm still investigating on how to return array elements. I came out with something like: create or replace function auz(out _errcode int, out _errmsg text) returns setof record as $$ declare errcode int[]; errmsg text[]; _row record; begin

Re: [GENERAL] Secure "where in(a,b,c)" clause.

2008-04-03 Thread brian
William Temperley wrote: Hi All I hope this isn't a FAQ, but does anyone have any suggestions as to how to make a query that selects using: "where in()" secure from an sql injection point of view? I have grid of tiles I'm using to reference geographical points. These tiles are identical to the

Re: [GENERAL] Autograph Annoucement (ERD Tool)

2008-04-03 Thread brian
Colin Fox wrote: Hello everyone. There were a number of people asking about ERD tools here a while ago, so I decided to publish one that I've put together. It's called Autograph, and you can find it on the pg foundry: http://pgfoundry.org/projects/autograph/ Cool! Nice to have a new option

Re: [GENERAL] Autograph Annoucement (ERD Tool)

2008-04-03 Thread brian
Colin Fox wrote: brian wrote: From the example page: "I also wanted to make sure that there were "no dead crows" -- having the crows-feet right side up makes the diagram a lot more readable in my humble opinion." Um ... those arrows look backwards to me :-( Actually, cro

Re: [GENERAL] Numbering rows by date

2008-04-05 Thread brian
Andrus wrote: I have table create Document ( docdate date, docorder integer ) I need update docorder column with numbers 1,2 in docdate date order Something like i = 1; UPDATE Document SET docorder = i++ ORDER BY docdate; How to do this is PostgreSQL 8.2 ? ALTER TABLE DROP COLUMN docord

Re: [GENERAL] table as log (multiple writers and readers)

2008-04-16 Thread brian
Vance Maverick wrote: I want to create a table with the semantics of a log. There may be multiple concurrent writers, because log entries will be generated by triggers. And there will be multiple concurrent readers -- mostly remote processes watching the log over time. I'd like to guarantee th

Re: [GENERAL] table as log (multiple writers and readers)

2008-04-16 Thread brian
Craig Ringer wrote: brian wrote: Use a timestamp column also. That's subject to the same issues, because a transaction's current_timestamp() is determined at transaction start. So, in a situation like this: WRITER 1WRITER 2

Re: [GENERAL] How to modify ENUM datatypes?

2008-04-23 Thread brian
Scott Marlowe wrote: On Wed, Apr 23, 2008 at 12:10 PM, Karsten Hilbert <[EMAIL PROTECTED]> wrote: On Wed, Apr 23, 2008 at 12:38:48PM +0200, Andreas 'ads' Scherbaum wrote: > Yes. You should/can use ENUM for something like 'gender': > male, female, unknown. You don't need to add other values ev

Re: [GENERAL] Calling Python functions with parameters

2008-07-21 Thread brian
Jerry McRae wrote: I am having a problem with the simplest of Python functions, so I must be doing something wrong. After hours of searching and trying many options, I need the key that my puny brain is missing here. I cannot pass parameters to a plpythonu function. I have tried within psql an

Re: [GENERAL] a SQL query question

2008-07-28 Thread brian
id) aid, pid, nmol FROM foobar WHERE pid IS NOT NULL ORDER BY pid ASC, nmol DESC; The pid ASC satisfies the requirement for the DISTINCT ON part, while the nmol DESC ensures we get the MAX from each group. Or something like that. brian -- Sent via pgsql-general mailing list (pgsql-general@postgres

Re: [GENERAL] Moved database question

2008-08-05 Thread brian
Bayless Kirtley wrote: I had to move my database to a new disk. I dropped the original after a pg_dump and then removed the old directory. I then ran initdb on the new location, created the database and restored from the pg_dump. My problem now is that I have to supply the full pathnames to sta

Re: [GENERAL] offtopic, about subject prefix

2008-09-03 Thread brian
Fernando Moreno wrote: Hello, I'm new to this mailing list, and I have a couple of questions: Is it really necessary to add the [GENERAL] prefix? The prefix is added by the mailing list software. It's there so that people subscribed to multiple pgsql-* lists can easily distinguish them. Ther

Re: [GENERAL] storing repeating dates / events

2008-09-06 Thread brian
[EMAIL PROTECTED] wrote: Hi I want to store dates / events for example birthdays (or may 5th) that repeats every year.. what is the best way to do in postgres? if i use timestamp it is going to be use the current year.. how do i do this? A timestamp includes the year so there shouldn't be any

Re: [GENERAL] Question about NOT NULL and default values.

2008-10-17 Thread brian
Scott Marlowe wrote: On Thu, Oct 16, 2008 at 10:06 PM, Stephan Szabo <[EMAIL PROTECTED]> wrote: On Thu, 16 Oct 2008, Scott Marlowe wrote: On Thu, Oct 16, 2008 at 10:01 PM, Stephan Szabo <[EMAIL PROTECTED]> wrote: On Fri, 17 Oct 2008, Tim Uckun wrote: Is there a way to change this behavior s

Re: Re[GENERAL] defining an existing Table Schema for Foreign Key Constraint - Question

2008-11-02 Thread brian
Brian714 wrote: Hello everyone, I am new to the forum and fairly new to databases (particularly PostgreSQL). I have done some searching on the internet and can't really get a hold of an answer to my question. So here it goes: I am working on a Customer Purchasing-based project where I must use

Re: [GENERAL] error en createlang

2008-11-06 Thread brian
Eduardo Arévalo wrote: Hola Lista: instale el postgres con el comando ./postgresql-8.3.4-1-linux-x64.bin instale la el postgres en /usr/local/... la base en /base/data como yo uso caracteres en español como los acentos y la ñ Ñ le puse es_ES.utf8 código 231 todo bien hasta que cree una base de

Re: [GENERAL] Current log files when rotating?

2008-11-10 Thread brian
Greg Smith wrote: Let's say you're using logging_collector and you've put some %-escapes into log_filename for daily log rotation. Perhaps it's daily rotation with this pattern: log_filename = 'postgresql-%Y-%m-%d.log' Is there any good way to ask the server what log file name it's currentl

Re: [GENERAL] simple COPY FROM issue

2008-11-12 Thread brian
> HINT: Use the escape string syntax for backslashes, e.g., E'\\'. Try: COPY imagineoptions FROM E'C:\\Options20081112.csv' ... or: COPY imagineoptions FROM 'C:/Options20081112.csv' ... Kevin Duffy wrote: Hello All: I am attempting to import data from a CSV file. The command I am

Re: [GENERAL] simple COPY FROM issue

2008-11-12 Thread brian
The file must be on the server. IIRC, with COPY FROM (as opposed to COPY TO) the path can be relative to the server process dir but it's probably a good idea to always use an absolute path. If you wish to copy from the client machine you can use \copy within psql. b Kevin Duffy wrote: Hello:

Re: [GENERAL] Stored function - send array as parameter to stored function

2008-11-12 Thread brian
Yes, this one got me, also. Strangely, you need to do: select iterate('{1,2}'); Also, you have a typo in your function: arry_upper(a,1) b hendra kusuma wrote: Hi, I'm new here I've been doing a little self-learning about postgresql and find it very interesting I've been trying to create a

Re: [GENERAL] date range query help

2008-11-19 Thread brian
novice wrote: 2008/11/20 Adam Rich <[EMAIL PROTECTED]>: select call.call_id, call.datetime, mobile_custodian.user_id, call.mobile_no call.charge from call, mobile_custodian where call.mobile_no = mobile_custodian.mobile_no and call.datetime between mobile_custodian.issue_date and mob

Re: [SQL] [GENERAL] date range query help

2008-11-19 Thread brian
novice wrote: 2008/11/20 Rodrigo E. De León Plicet <[EMAIL PROTECTED]>: On Wed, Nov 19, 2008 at 10:03 PM, novice <[EMAIL PROTECTED]> wrote: sorry I get nothing :( Of course not. None of the dates you gave in the example overlap. But it should still have the 1st entry with the name Ben? Am

Re: [GENERAL] start/stop error message

2008-11-19 Thread brian
David wrote: I am unable to solve the following problem. When I start or stop PostgreSQL using pg_ctl (without the -D option) the system works fine. No errors. I have the PGDATA environment variable set and it points to my cluster. When I run the /etc/init.d/postgresql-8.2 script with either o

Re: [GENERAL] Postgres mail list traffic over time

2008-11-20 Thread brian
Tom Lane wrote: Bruce Momjian <[EMAIL PROTECTED]> writes: >> I am finding the email traffic almost impossible to continue tracking, so something different is happening, but it seems it is not volume-related. Yes, my perception also is that it's getting harder and harder to keep up with the li

[GENERAL] does ispell have allaffixes set to on?

2010-01-18 Thread Brian
dicating that the tokens are unknown, rather than lexemes indicating a match. Is this expected behavior or a bug, and is there any way to control this? Before I try to patch this in the code I'd like to know if it's intentional behavior or not. It gets even screwier if you add &qu

Re: [GENERAL] duplicate key violates unique constraint

2006-09-18 Thread brian
upe_filenames=# insert into projects (project_id, username ) dupe_filenames-# values (2, 'bar'); INSERT 0 1 > ... dupe_filenames=# insert into projects (project_id, username ) dupe_filenames-# values (1, 'foo'); ERROR: duplicate key violates unique constraint "project

Re: [GENERAL] String handling function, substring vs. substr

2006-10-01 Thread brian
[EMAIL PROTECTED] wrote: Hi all, I want to call one of the two functions above many times (in an aggregate function) and it says in the manual pages that substr is the same as substring. Does this mean that substr calls substring internally?? Or is it the other way around?? Or are they ind

[GENERAL] trouble with setof record return

2006-10-05 Thread brian
Can anybody spot the problem with this function? Or, how i'm calling it? (it's not clear to me which it is) CREATE TABLE member ( ... first_name character varying(64), last_name character varying(64), organisation character varying(128), email character varying(128), ... ); CREATE OR R

Re: [GENERAL] trouble with setof record return

2006-10-05 Thread brian
A. Kretschmer wrote: am Thu, dem 05.10.2006, um 13:17:41 -0400 mailte brian folgendes: Can anybody spot the problem with this function? Or, how i'm calling it? (it's not clear to me which it is) CREATE TABLE member ( ... first_name character varying(64), last_name character

Re: [GENERAL] time conversion fuinctions

2006-10-07 Thread brian
Tom Lane wrote: Rafal Pietrak <[EMAIL PROTECTED]> writes: Is this the expected result? timestamp_date() currently returns NULL if the timestamp is infinity. Since we don't have any representation for infinity in the date type, this is pretty much its only alternative other than throwing an e

[GENERAL] some log statements ignored

2006-10-12 Thread brian
log_statement; log_statement --- mod (1 row) brian ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] some log statements ignored

2006-10-13 Thread brian
Bruce Momjian wrote: brian wrote: I changed my postgresql.conf to have: log_statement = mod It appears to be working, though not logging *all* INSERTs. For instance, I have a PHP class that inserts into two tables in a transaction. The log shows the first, but not the second. Has anyone

Re: [GENERAL] some log statements ignored

2006-10-13 Thread brian
Tom Lane wrote: brian <[EMAIL PROTECTED]> writes: Sorry--i hadn't had time to run a test. Setting it to 'all' works fine, and i think i see the problem: the second INSERT is in a prepared statement, so it's not being logged. PREPARE mdb2_statement_pgsql00fb05c2c

Re: [GENERAL] Column Deletion

2006-10-22 Thread brian
d set log_statement to either "mod" or "all" (restart postgres afterwards). brian ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] How to determine initdb parameters on old database?

2006-10-22 Thread brian
Joost Kraaijeveld wrote: Is it possible to find out the parameters used with initdb on an old database or is this a matter of deduction? TIA pg_controldata - display control information of a PostgreSQL database cluster pg_controldata [ datadir ] brian ---(end of

Re: [GENERAL] How to determine initdb parameters on old database?

2006-10-23 Thread brian
Joost Kraaijeveld wrote: On Mon, 2006-10-23 at 02:11 -0400, brian wrote: pg_controldata - display control information of a PostgreSQL database cluster pg_controldata [ datadir ] I was hoping for the actual command but this suggests deduction ;-) That is it. given: PG_DIR=/usr/local

Re: [GENERAL] Weird double single quote issue

2006-11-02 Thread brian
ent upon the user. Is this the case? And can any of those columns used in the proc be NULL? Frankly, i couldn't read it very well (but then, i'm on my first cup of coffee this morning), but i'm wondering if the problem lies somewhere in between the dollar-quoting and coal

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread brian
id, and b) are outside the bounds set in the script (eg. MAX_GRACE_PERIOD = 30). brian ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] [PL/pgSQL] How should I use FOUND special variable.

2006-11-09 Thread brian
e. Thanks for any help. Kind Regards. EXIT WHEN NOT FOUND brian ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] sync linux and postgresql users and groups

2006-11-15 Thread brian
o run # pg_ctl reload for your change to take effect. brian ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Strange Postgresql crash

2006-11-16 Thread brian
hey are not in conflict, who knows! Is there anything else running at that time? What does /etc/crontab have? I ask because my fedora box has cron.daily scripts run at 4:02am by default. brian ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] tracking errors in psql

2006-11-17 Thread brian
ing specifics required in order that the tab character is recognised? Is this fine as is? UPDATE member SET bio = replace(bio, '\t', ''); brian ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an ap

Re: [GENERAL] Returning multiple rows from a function?

2006-11-27 Thread brian
but had no luck. Thanks, Use "RETURNS SETOF record" and "FOR r IN ... LOOP RETURN NEXT; END LOOP; RETURN;" brian ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Restore database from files (not dump files)?

2006-12-03 Thread brian
wheel wrote: In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... wheel wrote: Can a pgsql 8.1 database be restored from the raw file? For one database I have only the files found in the base folder, example C:\PostgreSQL \data\base\16404, there are many files called 1247, 1248, etc (n

Re: [GENERAL] logs not ending up at Syslog

2006-12-04 Thread brian
t specify anything for logging? If so, it's likely to have something like PGLOG="$PGDATA/postgres.log". brian ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Ident authentication failed for user - URGENT

2006-12-05 Thread brian
you create the user successfully with createuser? Have you read the docs thoroughly? http://www.postgresql.org/docs/8.1/interactive/client-authentication.html brian ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Indexes and Inheritance

2006-12-08 Thread brian
_table_pk ON child_table (id); Do those last two for each child table and then make sure that you perform your INSERTs on the child table(s). brian ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Male/female

2006-12-08 Thread brian
t think of a seventh possibility. As has been pointed out, some governments forbid the collection of gender information, so the seventh would be unknown/unreported. brian ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will i

[GENERAL] ALTER TABLE RENAME and primary key

2006-12-09 Thread brian
get 'service_provider_id_pkey'). There's a second table that has a foreign key constraint on service_id_pkey, so do i need to drop that constraint first, rename the first table, then re-create the constraint using the new pkey name? brian ---(end of broad

Re: [GENERAL] Tricky join question

2006-12-22 Thread brian
Tim Tassonis wrote: Hi Andreas First, you should use referential integrity: I do, that is not the point. It was a simplified data model. Of course I have primary keys and stuff, but they don't affect join behaviour at all. test=# create table person(id int primary key, name text); NOTIC

[GENERAL] spooky refusal to insert

2007-01-01 Thread brian
ok (1 row) INSERT 294266 1 set_id ok (1 row) DROP TABLE CREATE TABLE DROP TABLE CREATE TABLE VACUUM -- snip -- There should be a bunch of inserts (or errors, or SOMETHING) right before the VACUUM. Again, the tables are all created just fine. But it's as if all of the inserts

Re: [GENERAL] spooky refusal to insert

2007-01-01 Thread brian
That should be version 8.1.4 -- sorry brian ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] spooky refusal to insert [SOLVED]

2007-01-01 Thread brian
brian wrote: postgresql 8.1, fedora core 4 I'm trying to update a database with a few new tables and insert some data. However, psql is refusing to insert some of the data, leading to errors when trying to refer to the sequence in the next insert (to a cross table). Sure, less tha

Re: [GENERAL] spooky refusal to insert

2007-01-01 Thread brian
Gurjeet Singh wrote: On 1/2/07, brian <[EMAIL PROTECTED]> wrote: Here are the new tables (Note that set_id() and get_id() are functions which use the $_SHARED structure so that i can set some vars and refer back to them later) Hi Brian, Can you please explain the $_SHARED structu

Re: [GENERAL] Trying to load MySQL data

2007-01-10 Thread brian
of quotes, commas, and apostrophes in it). This is line 39150 in the file; all previous lines import fine, but this kills the COPY process and all of the previous inserts are rolled back. I need to get this data loaded intact. My copy command is COPY posts FROM '/tmp/posts.txt' CSV QUO

[GENERAL] missing cache data for cache id 27

2007-01-24 Thread brian
t a total of zero IF rec.total IS NULL THEN SELECT INTO total 0; ELSE total := rec.total; END IF; RETURN NEXT; END LOOP; RETURN; END; $$ LANGUAGE plpgsql IMMUTABLE; -- snip -- brian ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] missing cache data for cache id 27

2007-01-24 Thread brian
Richard Huxton wrote: brian wrote: I'm getting the above error when i try to replace a function of mine. It seems i have two problems: the latest dump (through phpPGAdmin) works fine, except that a function that should return a record was replaced without the column definition list, so

Re: [GENERAL] missing cache data for cache id 27

2007-01-24 Thread brian
Tom Lane wrote: brian <[EMAIL PROTECTED]> writes: I'm getting the above error when i try to replace a function of mine. In what PG version? http://archives.postgresql.org/pgsql-bugs/2006-10/msg00044.php http://archives.postgresql.org/pgsql-committers/2006-10/msg00084.php And w

Re: [GENERAL] missing cache data for cache id 27

2007-01-24 Thread brian
Tom Lane wrote: brian <[EMAIL PROTECTED]> writes: Tom Lane wrote: Need a newer phpPGAdmin, perhaps? It'd be unsurprising for pre-8.1 code to fail to notice the OUT parameters, since it'd not know about the new columns in pg_proc ... phpPgAdmin 4.0.1 (4.1 is latest). But

Re: [GENERAL] some ports closed in Fedora

2007-02-03 Thread brian
Harpreet Dhaliwal wrote: Is there any fedora mailinglist? Never knew if there was one try here: https://www.redhat.com/mailman/listinfo/fedora-list ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] 'greatest' function?

2007-02-07 Thread brian
#FUNCTIONS-MATH-FUNC-TABLE brian ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] 'greatest' function?

2007-02-07 Thread brian
Adam Rich wrote: I don't see greatest or least anywhere on that page... But they ARE here: http://www.postgresql.org/docs/8.2/interactive/functions-conditional.htm l#AEN13140 Yes--my bad. Wrong page. ---(end of broadcast)--- TIP 4: Have you se

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread brian
good way to get across this difference is to refer to it as *the* empty string. I prefer this description because it is implicit that it is still a string. NULL has no type, regardless of the column it is inserted into. Thus, the empty string is NOT NULL. brian ---(e

Re: Checking for string data that makes sense Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread brian
Zoltan Boszormenyi wrote: Chris írta: CaT wrote: On Thu, Feb 22, 2007 at 01:08:04PM +1100, Chris wrote: In postgres, to stop an empty blank string: create table a(a text not null check (char_length(a) > 0)); What's wrrong with using a <> '' sd the check? Or is this just a flavour thin

Re: Checking for string data that makes sense Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread brian
I honestly don't know what i was thinking. trim() trims whitespace only from the beginning and the end of the strings but not from the middle: # select trim(' a b c '); I realise that. I was thinking of this case: select trim(''); Though, i'm no

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-03-06 Thread brian
While no one in thier right mind should be using wikipgedia, I'm sympathetic to those who might still be stuck on it for some reason, so if you guys can produce a patch against the wikipgedia cvs, I'd be happy to apply it. I'd like to patch that name. ---(end of broad

[GENERAL] select progressive total

2007-03-20 Thread brian
From the "I thought this would be trivially easy" dept: I have a table holding member data for an organisation CREAT table member ( id SERIAL PRIMARY KEY, applied date, ... and i'd like to plot the growth in memberships. I'd prefer to hand off the data already totaled, if

Re: [GENERAL] select progressive total

2007-03-21 Thread brian
Merlin Moncure wrote: On 3/21/07, brian <[EMAIL PROTECTED]> wrote: From the "I thought this would be trivially easy" dept: I have a table holding member data for an organisation CREAT table member ( id SERIAL PRIMARY KEY, applied date, ... and i&#x

Re: [GENERAL] COPY FROM - how to identify results?

2007-04-03 Thread brian
ve the sequence ID? Presumably, if your application is really parsing the data first, one could simply do an INSERT and then grab the last inserted ID. Look at nextval() & currval(). http://www.postgresql.org/docs/7.3/static/functions-sequence.html brian ---(end of bro

Re: [GENERAL] COPY FROM - how to identify results?

2007-04-03 Thread brian
Jaime Silvela wrote: Brian, that's not what I meant. Parsing of the uploaded file is just for the purpose of extracting the components of each spreadsheet row and constructing the INSERTs. Actually, whenever I copy from a file, either using COPY or with a custom importer, I put the data i

Re: [GENERAL] Business days

2007-04-25 Thread brian
Eddy D. Sanchez wrote: Hello... I need to get the a total number of business days (from monday to friday) between two dates. Someone can help me please. Whether you're using PHP or not, this page may be of some help: http://www.php.net/manual/en/function.date.php There are a couple of exa

Re: [GENERAL] An alternatives to rules and triggers

2007-05-04 Thread brian
Glen Eustace wrote: Is there some way that one can determine whether a table has changed i.e. an insert, delete, update, without having to resort to setting a flag in another table using a triger or rule. I was wondering whether one of the system relations keep track of whether a table has be

[GENERAL] Spam notice

2004-11-13 Thread Brian
Just a heads up folks, someone has harvested emails out of this list, or one of the windows users has a virus. Be on the lookout Full header below. From [EMAIL PROTECTED] Sat Nov 13 13:16:34 2004 Return-Path: [EMAIL PROTECTED] Received: from [62.213.193.131] (HELO alibi.mail) by genium.com (Stal

[GENERAL] datatype questions

1998-06-22 Thread Brian
bles, or do you have to do like: CREATE INDEX on forum idx1 (datestamp); CREATE INDEX on forum idx2 (id); CREATE INDEX on forum idx3 (thread); If so, then how would you say "primary"? I know some databases such as mSQL did away with "PRIMARY KEY", and you just make indices instea

[GENERAL] Few simple questions

1998-09-22 Thread Brian
he entire field have to be updated? Once again, field name "desc" data is "The red car", can I make it say "The red car with blue lights"? Or do I have to update the entire field. Brian -- Bria

[GENERAL] Upgrading 6.3.1->6.3.2

1998-10-05 Thread Brian
HP or anything like that. So I am really just looking for the thumbs up that all I have to do is a dump all. Anyone note any good performance increase from 6.3.1 to 6.3.2? -- Brian Feeny (BF304) | ShreveNet Inc. - Pr

[GENERAL] DBI/DBD-Pg/perl question

1998-07-04 Thread Brian
maintain that many different copies of one program. Thank you for your help, Brian /-- [EMAIL PROTECTED] -----\ | Brian Feeny| USR TC Hubs | ShreveNet Inc. (318)222-2638 | | Network Administrator | Perl, Linux | Web hosting,

[GENERAL] difference in INDEX's

1998-07-04 Thread Brian
Is there a difference in doing: foo int PRIMARY KEY and CREATE INDEX idx1 on table (foo); does both do the same thing (create an index)? is one faster or preffered over the other? /-- [EMAIL PROTECTED] -\ | Brian Feeny

[GENERAL] 6.3.1 -> 6.3.2 problems

1999-01-22 Thread Brian
quot; for each and every table, and that can be alot of tables! Any ideas? Should this be working? Brian -- Brian Feeny (BF304) | ShreveNet Inc. - Premium Internet Service Provider Network Administrator | Shreveport,

[GENERAL] Backup up database

1998-09-17 Thread Brian
to it, It could be 100% restored? Brian -- Brian Feeny (BF304) | ShreveNet Inc. - Premium Internet Service Provider Network Administrator | Shreveport, Louisiana - http://www.shreve.net/ [EMAIL PROTECTED] | Web Ho

Re: [GENERAL] Triggers: options besides compiled code?

1998-07-09 Thread Brian
; > /-- [EMAIL PROTECTED] -\ | Brian Feeny| USR TC Hubs | ShreveNet Inc. (318)222-2638 | | Network Administrator | Perl, Linux | Web hosting, online stores, | | ShreveNet Inc. | USR Pilot | Dial-Up 14.4-56k, ISDN &

Re: [GENERAL] What to do with no foreign keys

1998-07-10 Thread Brian
o use Postgres. One of the reasons we beleive boardtown doesn't support Postgres at this time is because of a few features SQL server has over Postgres, and they would have to work around those. Brian > > Bruce Tong | Got me an office; I'm there late at night.

[GENERAL] how to read a variable upon insert?

1999-04-13 Thread Brian
t;); $sth->execute; $insertid = $sth->{'idnum'}; I would think that last line should be able to retreive it from the statment handle, but it doesn't work. Is the only way, to do *another* select after I insert and get the data? I would hope after doing the insert, since I h

[GENERAL] How to get seq after insert

1999-04-14 Thread Brian
I have a sequence in a table that increments upon insert. After doing the insert, is their a way (function maybe?) to get the sequences value without having to do another select? Brian - Brian Feeny (BF304) [EMAIL PROTECTED] 318-222

RE: [GENERAL] How to get seq after insert

1999-04-14 Thread Brian
ming field "insertid" was the one being updated by the sequence, but that doenst seem to work. > > -----Original Message- > From: Brian [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, April 14, 1999 2:59 PM > To: [EMAIL PROTECTED] >

Re: [GENERAL] Optimizations for busy DB??

1999-05-13 Thread Brian
On Thu, 13 May 1999, Brett W. McCoy wrote: > On Thu, 13 May 1999, Brian wrote: > > > Would something like this be appropriate? > > > > /usr/bin/postmaster -B 256 -i -S -D/var/lib/pgsql -o -F -B 256 -S 1024 > > > > or should -B just be in their once? in th

Re: [GENERAL] date with month and year

2015-05-21 Thread Brian Dunavant
erting back from UTC+time zone is no longer the time that you were supposed to have been at the meeting. If you had stored that future date as a timestamp WITHOUT time zone you would have still been on-time. This is only an issue for future dates, not past ones. -Brian Dunavant (time is ha

Re: [GENERAL] date with month and year

2015-05-21 Thread Brian Dunavant
On Thu, May 21, 2015 at 5:27 PM, Thomas Kellerer wrote: > Postgres does not store the time zone. When storing a timestamp with time > zone, it > is normalized to UTC based on the timezone of the client. When you retrieve > it, > it is adjusted to the time zone of the client. > Sorry, I misspoke.

[GENERAL] to_tsvector() with hyphens

2015-07-06 Thread Brian DeRocher
_rank_cd( to_tsvector( 'gn series bandage' ), to_tsquery( 'gn | bandage' ) ); ts_rank_cd 0.2 (1 row) So wouldn't this be a better query for hyphenated words? 'gn-foo' | 'gn' | 'foo' Aside: Best i can tell the parser i

Re: [GENERAL] Bi-Directional replication(BDR)

2015-08-04 Thread Brian Dunavant
I would suggest going to http://bdr-project.org/docs/stable/index.html On Tue, Aug 4, 2015 at 3:47 PM, wrote: > Hi, > > > > Please help me on: > > > > what is the use of bidirectional replication in PostgreSQL? > > How BDR works? > > how to setup BDR? > > on which versions BDR works? > > > > Th

[GENERAL] After replication failover: could not read block X in file Y read only 0 of 8192 bytes

2016-05-30 Thread Brian Sutherland
checksums switched on so am suspecting a streaming replication bug. Anyone know of a recent bug which could have caused this? -- Brian Sutherland -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] After replication failover: could not read block X in file Y read only 0 of 8192 bytes

2016-05-31 Thread Brian Sutherland
On Tue, May 31, 2016 at 04:49:26PM +1000, Venkata Balaji N wrote: > On Mon, May 30, 2016 at 11:37 PM, Brian Sutherland > wrote: > > > I'm running a streaming replication setup with PostgreSQL 9.5.2 and have > > started seeing these errors on a few INSERTs: > >

Re: [GENERAL] bitwise storage and operations

2016-09-27 Thread Brian Dunavant
If it's in integer columns, bitwise logic works just like you would expect it to as well. https://www.postgresql.org/docs/current/static/functions-math.html db=# select 'foo' where (9 & 1) > 0; ?column? -- foo (1 row) db=# select 'foo' where (9 & 2) > 0; ?column? -- (0 rows) J

Re: [GENERAL] error updating a tuple after promoting a standby

2016-12-22 Thread Brian Sutherland
; ERROR: could not read block 12281 in file "base/16384/29153": read only 0 > of 8192 bytes > ginopino=# select * from stato where id=409; <<< IT WORKS FINE -- Brian Sutherland -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Recovery Assistance

2017-01-27 Thread Brian Mills
e given myself this weekend to attempt to recover more than the last backup, after that I need to restore the service for my team to use and suck up the lost last day of updates. Thanks, Brian

<    1   2   3   4   5   6   >