[SQL] unicode(utf-8) problem !

2004-02-29 Thread john
the chinese utf-8 code haves  3 bytes   When I use the query command Like   "  select * from phpbb_users where username='阿至' "   the Result is Too Much Records! :-( user_id=9522, username= 阿貝user_id=8261, username= 阿超user_id=6364, username= 阿聰user_id=6141, username= 阿菲use

[SQL] two records per row from query

2009-08-05 Thread John
mytable pkid class_date. sessionid select * from mytable 1 2009/01/01 2101 2 2009/01/02 2101 I would like an SQL that would produce newtable pkid, class_date1, class_date2, sessionid1, sessionid2 Select * from newtable 1 2009/01/01 2009/01/02 2101 2101 I have a list of classes that is perfect

Re: [SQL] two records per row from query

2009-08-06 Thread John
On Wednesday 05 August 2009 10:21:08 pm A. Kretschmer wrote: > In response to John : > > mytable > > pkid > > class_date. > > sessionid > > > > select * from mytable > > 1 2009/01/01 2101 > > 2 2009/01/02 2101 > > > > I

Re: [SQL] two records per row from query

2009-08-06 Thread John
On Thursday 06 August 2009 06:42:34 am Leo Mannhart wrote: > John wrote: > > mytable > > pkid > > class_date. > > sessionid > > > > select * from mytable > > 1 2009/01/01 2101 > > 2 2009/01/02 2101 > > > > I would like an SQ

Re: [SQL] two records per row from query

2009-08-07 Thread John
On Friday 07 August 2009 02:50:48 am Leo Mannhart wrote: > John wrote: > [snip] > > > I'm sorry I was attempting to simplify the problem. I will attempt to > > provide more info: > > > > OVERVIEW: > > "mytable" contains the dates of the

[SQL] trouble with getting the field names

2009-10-26 Thread John
Below is a SQL statement that was created to retreive the primary key , and column names and data types for a table name and a schema. The problem is that is works very well if I only use the 'public' schema. But it does not work if I use a 'system' schema I created (owned my me). The offendi

Re: [SQL] trouble with getting the field names

2009-10-26 Thread John
On Monday 26 October 2009 04:41:49 pm John wrote: > Below is a SQL statement that was created to retreive the primary key , and > column names and data types for a table name and a schema. The problem is > that is works very well if I only use the 'public' schema. But it does

[SQL] determine the curval() of a view

2010-03-02 Thread John
Hi, I am working with a view that has a "_INSERT" rule. I'm wondering if there is a way to determine what the curval() of the PK (serial type) after an insert occurs. Given the name of the view I'd like to determine the sequence associated with the view's PK. Actually, I wonder if it is ev

[SQL] understanding select into

2010-04-09 Thread John
Hi, I am reviewing a function written by some xTuple guys. What is interesting about it is it uses the "INTO" statement like select something into _p from sometable where somecriteria. The function contiunes and uses the data retreived _p.somefield_name And then the function ends. Ok my que

Re: [SQL] understanding select into

2010-04-09 Thread John
Wow thanks to all that replied - you folks are correct. The "_p" and the others are vars. _p RECORD; I won't forget that one for a long time (however, I do drink :-)) Johnf On Friday 09 April 2010 10:32:51 am Pavel Stehule wrote: > Hello > > 2010/4/9 John : >

[SQL] what does this do

2010-06-10 Thread John
Hi, I have a piece of python code that excutes a SQL statement: apitempCur.execute("select * from jfcs_balancedue('%s') f(enrolleeid varchar, course_cost decimal, paid_amt decimal)" % (enrollIds,)); The "enrollids" is a list of primary keys and the "jfcs_balancedue" is a user defined function.

Re: [SQL] what does this do

2010-06-10 Thread John
st/datatype of the columns returned by the function). > > Doug > > > -Original Message- > From: pgsql-sql-ow...@postgresql.org > [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of John Sent: Thursday, > June 10, 2010 4:22 AM > To: pgsql-sql@postgresql.org > Sub

[SQL] is there a tutorial on window functions?

2010-06-11 Thread John
Hi, I'd like to learn the use of window functions and did not find a tutorial using google ("postgres window function tutorial"). I'm hoping someone has a link. Johnf -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/

Re: [SQL] is there a tutorial on window functions?

2010-06-11 Thread John
On Friday 11 June 2010 07:37:29 am Andreas Kretschmer wrote: > John wrote: > > Hi, > > I'd like to learn the use of window functions and did not find a tutorial > > using google ("postgres window function tutorial"). I'm hoping someone > > has a lin

[SQL] strangest thing happened

2010-07-07 Thread John
I am the only developer, DBA etc.. for a small project. Today (yesterday was everything was perfect) many of the sequence numbers fell behind what is the actual PK value. For example the invoice PK sequence current value = 1056 but the table PK was 1071. Nobody (other than myself) knows how

Re: [SQL] strangest thing happened

2010-07-07 Thread John
; Search the logs to see what is calling nextval('My_Sequence') > > You may need to turn up logging to find it. > > On 7/7/2010 2:59 PM, John wrote: > > I am the only developer, DBA etc.. for a small project. Today (yesterday > > was everything was perfect) man

Re: [SQL] strangest thing happened

2010-07-07 Thread John
On Wednesday 07 July 2010 03:14:40 pm Justin Graf wrote: > I would be looking at the log files for the Inserts into that table as a > means to track down what is the cause.  If there are no log files or > don't have enough detail, crank up the logging level and wait for it to > happen again??? Th

[SQL] Need Help With Dates.

2000-07-03 Thread John
Hello. I just migrated a database from MySQL to postgreSQL and am having trouble wit postgres' dates. MySQL dealt with dates very well, but i don't see the same sort of functionality in postgres. The database is an archive of imformation, and i would like to do a cron'd select for an interval ba

[SQL] confused by select.

2000-07-06 Thread John
Hello. I'm trying to do a select here that i have looked at from many angles and cannot find a solution too. My main problem, (i believe) is that it is trying to create a many to many relationship. I would be grateful if anyone knew a way around this. Here's my predicamint. I have a database f

[SQL] Nested Aggregates?

2000-07-20 Thread John
I know nested aggregates aren't allowed, or at least not implicitly. Is there a way to get around this.? Or does someone feel like droppng some other hints this way? Problem : (not really) I have a table (id, date, ordertype, etc...) Based on the type i want to be able to get the counts of how

Re: [SQL] Select subset of rows

2000-08-27 Thread John McKown
alary desc limit 5; select min(salary) as minsal into test minsal from saltemp; select name, salary from employee, minsal where salary >= minsal; I don't know the speed difference between my second select and your subselect within an EXISTS clause might be. Just a thought, John

Re: [SQL] Week of the Year?

2000-09-03 Thread John McKown
On Sun, 3 Sep 2000, Brian C. Doyle wrote: > John, > > Would you have any clue how to figure out the first saturday of any month - > 6 days and the last saturday of that month? > > I know that this seems odd but i have to run reports for "Non Standard > Months"

Re: [SQL] sum of agreggates in one SELECT?

2000-09-19 Thread John McKown
f you need the output from the original SELECT then you can print it by simply doing: SELECT * FROM temp1; Hope this is of some use to you, John On Tue, 19 Sep 2000, Louis-David Mitterrand wrote: > Hello, > > I have the following query/result: > > auction=# select max(b.

Re: [SQL] memory usage

2000-09-28 Thread John Hasler
Carolyn Wong writes: > This program seems to use a lot of the memory on the linux server, and > the memory doesn't seem to be released at the end of execution. Are you quite certain that this is actually what is happening? Linux memory usage can be confusing. -- John Hasler [EMAI

Re: [SQL] -query sql

2000-10-09 Thread John McKown
le2 WHERE table1.column1=table2.column2; Change the information you want in the first line of the SELECT. I just made up some names. Hope this helps, John

Re: [SQL] if else query help

2000-10-12 Thread John McKown
On Thu, 12 Oct 2000, Jean-Christophe Boggio wrote: > portion of the day (although I don't know --yet-- how to convert > date2-date1 to an integer, trunc does not work). reltime(date2-date1)::int Will subtract date1 from date2, then cast it to an integer. John

Re: [SQL] nested transactions

2000-10-17 Thread John Hasler
Bernie Huang writes: > Just out of curiousity, does Postgres support nested transactions? I'd like to know too, and not just out of curiousity. I have a use for that. -- John Hasler [EMAIL PROTECTED] (John Hasler) Dancing Horse Hill Elmwood, WI

Re: [SQL] postgres

2000-12-13 Thread John Hasler
ll the address out of that. They never notice where the article came from. -- John Hasler [EMAIL PROTECTED] Dancing Horse Hill Elmwood, Wisconsin

Re: [SQL] Invoice number

2000-12-21 Thread John Hasler
it be possible to log SERIAL's as they are issued? It might be sufficient to just record the user id, though it would be more useful to log some indication of what the number was used for (or at least whether or not it was used at all). -- John Hasler [EMAIL PROTECTED] (John Hasler) Dancing

Re: [SQL] Invoice number

2000-12-21 Thread John Hasler
a paper world if a cup of coffee is spilt on some > invoices, and these precious items are thrown in the trash? They are returned to accounting with an explanatory note, the numbers are logged as "voided", and the spoiled forms are shredded. -- John Hasler [EMAIL PROTECTED] Dancing Horse Hill Elmwood, Wisconsin

[SQL] Re: system catalog info

2000-12-29 Thread John Reid
types ;-) cheers, John Ron Peterson wrote: > > The HTML programming documentation (e.g. > http://www.postgresql.org/devel-corner/docs/programmer/pg-system-catalogs.htm) > indicates that more extensive information about the system catalogs can > be found in the "Reference Manu

[SQL] abstract data types?

2001-01-20 Thread John Reid
y am I attempting this lunacy? I am interested in assisting with the development of a data store for GIS. Looks like most of the mooted schemas will involve the creation of large numbers of tables of identical type. Each of these in turn

[SQL] DATE

2001-01-23 Thread john whale
PLEASE ADVISE HOW I SHOULD ALTER THE COMMAND: <$NOW;DD;> TO GIVE ME A DATE THAT IS X DAYS FORWARD ie: I WISH TO REPRESENT A DATE IN FORM WHICH IS A 7 DAYS FORWARD OF THE DATE NOW. REGARDS JOHN WHALE

[SQL] Re: abstract data types?

2001-01-25 Thread John Reid
uess I don't need to worry about the parser, just how the operations related to the classes (both system and user) work/are implemented. Correct? > What goes around comes around. :-) And hits you in the back of the head just when you least expect it ... cheers, John ---

[SQL] Re: abstract data types?

2001-01-25 Thread John Reid
probably the best way to describe what I have in mind. Using views as currently implemented in PostgreSQL would probably not be viable as it is likely that, if multiple spatial reference systems are defined on a area of interest, reprojection of the geometry objects would be a performance killer. cheers, John

[SQL] Re: abstract data types?

2001-01-27 Thread John Reid
to worry about the parser, just how the operations related to the classes (both system and user) work/are implemented. Correct?" Any help people can give me would be much appreciated. I'm already feeling a little lost. I hope people don't mind if I ask a lot of dumb questio

[SQL] Re: abstract data types?

2001-01-27 Thread John Reid
Hi again, Josh Berkus wrote: > John, > > > Thanks for your comments. My 2c worth: > > That was at least $1.50 worth. Teach me to speak 'off the > cuff' on this list ... Just because I went out and brought a stack of books doesn't mean that I actually know

[SQL] Can a function return a record set?

2001-02-22 Thread John Taves
Am I correct in concluding that I can't return a record set from a function? For example, in MS SQL I would do: create procedure foo as select * from yada I expected to be able to do the following in postgresql. create function foo (integer) returns (integer) as ' begin select * from yada; end

[SQL] Newbie: execute function error!

2001-03-07 Thread John GM
I created a sample function: CREATE FUNCTION concat_text (text, text) RETURNS text AS ' BEGIN RETURN $1 || $2; END; ' LANGUAGE 'plpgsql'; The creation was fine. But when I execute the function with : select concat('a', 'b'); I get the error: NOTICE: plpgsql: ERROR during compile of conc

Re: [SQL] function to format floats as money?

2001-04-17 Thread John Hasler
Ross writes: > But seriously, numeric(10,2) (or whatever precision and scale is correct > for your application) is the standard answer. Floats are fine for money as long as you only add and subtract and don't deal in amounts that won't fit in the mantissa. -- John Hasler [EMAIL

Re: [SQL] function to format floats as money?

2001-04-17 Thread John Hasler
ring to what actually works, not to what might or might not meet with the approval of some officialdom or other. The two seldom bear any discernible relationship. -- John Hasler [EMAIL PROTECTED] (John Hasler) Dancing Horse Hill Elmwood, WI ---(end of broadcast)--

[SQL] unwritable /tmp causes initdb to crash

2001-05-14 Thread John Scott
this is a goofy situtation. we had a new linux 2.4.4 kernel with a /tmp not writable by postgres. granted, this is categorically hosed, but initdb still dumped core under these circumstances. changing the /tmp to writable immediately fixed the problem. -j = John Scott Senior Partner

[SQL] Nested Transactions

2001-06-26 Thread John Hasler
Can anyone give me an estimate of when we might expect to see nested transactions implemented? -- John Hasler [EMAIL PROTECTED] (John Hasler) Dancing Horse Hill Elmwood, WI ---(end of broadcast)--- TIP 6: Have you searched our list archives? http

Re: [SQL] Is function atomic?

2001-07-06 Thread John Hasler
Richard Huxton writes: > All functions take place within a transaction, but since PG doesn't > support nested transactions yet you can't roll back the effects of a > nested function. Do you have any idea when it will? -- John Hasler [EMAIL PROTECTED] (John Hasler) Dancing Hor

Re: [SQL] Is function atomic?

2001-07-07 Thread John Hasler
I wrote: > Do you have any idea when [nested transactions] will [be added]? Richard Huxton writes: > Check the "todo" list in the developers' area on the website - that'll > show what's planned for 7.2 It's listed there: that's why I asked. Is every

[SQL] Why does this plpgslq always return 1?

2001-07-27 Thread John Oakes
FROM benchmark WHERE passfail = passfail; SELECT INTO counttotal COUNT(*) FROM benchmark; ret := countp / counttotal; RETURN ret; END;' LANGUAGE 'plpgsql'; John ---(end of broadcast)--- TIP 2: you can get off all lists at once

[SQL] plpgsql function return multiple values?

2001-07-30 Thread John Oakes
Is it possible for a plpgsql function to return a record? I need to return multiple values, and preferably in the form of a record. Thanks in advance! John ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister

Re: [SQL] GUID in postgres

2001-10-25 Thread John Hasler
lobid table > contains a database identifier as well (like the OID of the pg_database > entry for the database). And that's fine, but the GUID system uses the word "global" in a much more grandiose sense. -- John Hasler [EMAIL PROTECTED] Dancing Horse Hill Elmwood, W

Re: [SQL] GUID in postgres

2001-10-24 Thread John Hasler
Josh writes: > I'm sure you could make your own GUID, whatever one is. Globally Unique IDentifier, probably. Just hash a 128 bit random number with the current date. -- John Hasler [EMAIL PROTECTED] Dancing Horse Hill Elmwood, Wisconsin ---(end of b

Re: [SQL] [GENERAL] CURRENT_TIMESTAMP

2002-09-23 Thread John Hasler
Bruce Momjian writes: > My point is that our current behavior may not be the most intuitive, and > that most people may prefer a change. I would prefer a change. -- John Hasler [EMAIL PROTECTED] Dancing Horse Hill Elmwood, Wisconsin ---(end of bro

Re: [SQL] [GENERAL] CURRENT_TIMESTAMP

2002-09-24 Thread John Hasler
ct time the function is called" is what most people would expect to get from now(), but it's too late for that. -- John Hasler [EMAIL PROTECTED] Dancing Horse Hill Elmwood, Wisconsin ---(end of broadcast)--- TIP 3: if posting/reading throu

Re: [SQL] HELP w/ SQL -- distinct select with non distinct fields?

2002-09-27 Thread John Gilson
"RVL" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm work with Sybase on the Sun... and, being a clueles newbee in SQL > department, hope you could help. I have a set of data: > > acct name qty link date memo > 101 item_A 100 0001 9/2/02 blah

[SQL] SELECT statement never completes.

2002-10-09 Thread John Pauley
pgsql-sql, We are porting a database from IBM DB2 to PostgreSQL. In several related scripts, there is a SELECT statement that never completes in Postgres but completes in a few seconds using DB2, for example: Table row count: SELECT count(*) FROM tableX; 112671 SELECT count(*) from tableY; 31

[SQL] NOTICE: generated by sequence nextval()

2002-10-10 Thread John Duffy
Postgresql 7.1.3-2 Red Hat 7.2   I've noticed that if I create a sequence, and then do a select on it using nextval() everything works fine. However, if I drop the sequence and then create it again, the same select statement generates a NOTICE.   Is this normal behaviour or a bug? See below.

[SQL]

2002-10-18 Thread John Geng
how to migrate sql from MS sql server to postgresql? i'd like to tranfer sql schema from MS serverExample:***1*if exists (select * from sysobjects where id = object_id(N'[admin].[test]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [ad

[SQL] help!

2002-10-18 Thread John Geng
how to migrate sql from MS sql server to postgresql? i'd like to tranfer sql schema from MS serverExample:***1*if exists (select * from sysobjects where id = object_id(N'[admin].[test]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [adm

[SQL] hi

2002-10-18 Thread lz John
i'd like to tranfer sql schema from MS serverExample:***1*if exists (select * from sysobjects where id = object_id(N'[admin].[test]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [admin].[test] go***2**

[SQL] CoreReader

2002-10-28 Thread John Ragan
Does anybody know of CoreReader being run against PostGresql? If so, I would appreciate knowing the results. -- John Ragan [EMAIL PROTECTED] http://www.CoreReader.com/ ---(end of broadcast)--- TIP 6: Have you

Re: [SQL] CoreReader

2002-10-29 Thread John Ragan
002 at 10:32:00PM -0500, John Ragan wrote: > > > > Does anybody know of CoreReader being run > > against PostGresql? > > > > If so, I would appreciate knowing the > > results. > > What's CoreReader? > > -Roberto > > --

[SQL] DB2 to Postgresql conversion help.

2002-12-23 Thread John Pauley
All, Any suggestions on a Postgresql equivalent to the following DB2 sql query: SELECT * FROM (SELECT ID,NAME,CITY,STATE,PROGRAM,CUST_NAME,CUST_ID,ROWNUMBER() OVER (ORDER BY ID ASC) AS RN FROM MERCHANT_BROWSER_VIEW WHERE CUST_ID = 'A51B8CA2' ) AS RESULT WHERE RN BETWEEN 1 AND 20 TIA, Happy Holid

[SQL] Returning records from a function

2003-02-06 Thread John C
meters, and return a result set. Any help would be appriciated. I've just recently started using PostgreSQL and I'm very impressed! I'm sure I'm jsut overlooking something easy, but for the life of me i just cant figure it out. Thanks, John ---(end of b

[SQL] How to return records from a function

2003-02-02 Thread John Cavacas
s require some input parameters, and return a result set. Any help would be appreciated. I've just recently started using PostgreSQL and I'm very impressed! I'm sure I'm jsut overlooking something easy, but for the life of me i just can't figure it out. Thanks, John

Re: [SQL] How to return records from a function

2003-02-02 Thread John Cavacas
I guess I can just use a regular statement calling a function but there seems to be problems doing that as well. Are there any other JDBC drivers for PostgreSQL? Thanks, john - Original Message - From: <[EMAIL PROTECTED]> To: "John Cavacas" <[EMAIL PROTECTED]> Cc: &l

Re: [SQL] A simple way to Create type ...?

2003-09-16 Thread John DeSoi
ption information returned by SELECT. All columns just look like varchar(50). It would be nice if there was something as easy as CREATE DOMAIN but worked more like CREATE TYPE. Best, John DeSoi, Ph.D. ---(end of broadcast)--- TIP 9: the planner

[SQL] Complex Update

2004-01-04 Thread John Coryat
Problem: I have a table that has a field I want to plug with a value from other tables. I can do it with a perl program and a loop, but want to do it with a single SQL statement. Is there a way to do an update that combines a select statement containing a "where" that uses a field from the row

Re: [SQL] Object-relational features

2004-03-15 Thread John DeSoi
t type. So your selects will return the column type as your custom type and you can process the content accordingly. From reading the docs (and asking on the list) I did not think this was possible either without writing external code in C. But a post about something else finally provided the clue

[SQL] sleep function

2004-08-10 Thread John DeSoi
Is there a sleep function of some kind? I wanted to simulate a query taking a long time to execute for testing purposes. Thanks, John DeSoi, Ph.D. ---(end of broadcast)--- TIP 6: Have you searched our list archives? http

Re: [SQL] sleep function

2004-08-11 Thread John DeSoi
On Aug 10, 2004, at 10:57 AM, Bruce Momjian wrote: I can't think of one, no. I think you will have to use one of the server-side languages and call a sleep in there. This is no good in the real world since it pounds the CPU, but it worked well enough for my testing purposes. Best, John

Re: [SQL] sleep function

2004-08-23 Thread John DeSoi
e other pl languages), but I assume there will be additional installation and configuration issues to use them. But thanks for the example, it will be helpful if I need something more processor friendly. Best, John DeSoi, Ph.D. ---(end of broadcast)---

Re: [SQL] colored PL with emacs

2004-09-01 Thread John DeSoi
. The estimated price for this product is $65. Send me an email if you are interested in beta testing the Mac OS X version. Best, John DeSoi, Ph.D. ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [SQL] Postgres Doubt

2004-10-03 Thread John DeSoi
sql to your database. see http://www.postgresql.org/docs/current/interactive/app-createlang.html http://www.postgresql.org/docs/current/interactive/sql- createlanguage.html You generally want to do this for template1 so it will be available in any new database you create. Best, John DeSoi, Ph.D.

Re: [SQL] Hide schemas and tables

2004-12-13 Thread John DeSoi
foreign schemas and relations from beeing seen. Yes, you are correct. I'm not aware of any way to hide this information. Best, John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 5: Have you checke

Re: [SQL] Table History

2004-12-17 Thread John DeSoi
ant some extra trigger examples other than what is in the documentation, there is a test file in the distribution with quite a few: src/test/regress/sql/plpgsql.sql Best, John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)

Re: [SQL] Problems with Quotes

2005-01-12 Thread John DeSoi
ail, do I need to use something like an ASCII character code in order to get rid of a quote? If so which one, and if not, is there a better solution? Try '"' as in select replace('this "is" it', '"', ''); repl

Re: [SQL] Problems with Quotes

2005-01-12 Thread John DeSoi
l.org/docs/7.4/static/plpgsql-development-tips.html John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [SQL] Looking for examples of S/P

2005-01-19 Thread John DeSoi
nsive example for importing and analyzing web server logs using only SQL and PL/pgSQL. Look in the pgEdit/Examples/web folder after installation. http://pgedit.com/download John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broa

Re: [SQL] editors with colum positioning for debugging?

2005-01-22 Thread John DeSoi
command to jump to a specific offset in the file. I hope to have something better in the near future to automatically move the cursor for you when an error is detected. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)-

Re: [SQL] Moving from Transact SQL to PL/pgsql

2005-01-25 Thread John DeSoi
racle, but there is a porting section in the documentation: http://www.postgresql.org/docs/8.0/interactive/plpgsql-porting.html John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 9: the planner will ignore

[SQL] plpgsql select into with multiple target variables

2005-01-28 Thread John DeSoi
ke SELECT into varx, vary, varz, colx, coly, colz, FROM I've tried parens and various other things but no luck. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 6: Have you searched our list arc

Re: [SQL] error in function!!

2005-01-31 Thread John DeSoi
ct type. So the message above says the first parameter passed was an integer, but your function expects the first parameter to be text. Note that you can remove all of the ALIAS declarations and use parameter name directly. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] Updating selected record

2005-02-08 Thread John DeSoi
; This locks the row for the remainder of the transaction. See http://www.postgresql.org/docs/8.0/interactive/sql-select.html#SQL-FOR- UPDATE John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 5: Have you

Re: [SQL] How to iterate through arrays?

2005-02-09 Thread John DeSoi
y use simple variables in the format string. Try it like: myTextVar := update_query_params[1]; NOTICE '% ...',myTextVar; John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] RE: [SQL] trrouble inserting stuff like é

2005-02-18 Thread John DeSoi
On Feb 18, 2005, at 11:15 AM, Joel Fradkin wrote: How do I tell the connection to use Unicode? Try SET client_encoding TO 'UNICODE'; http://www.postgresql.org/docs/8.0/interactive/sql-set.html But it should default to the database encoding, so I'm not sure if that is the probl

Re: [SQL] [ADMIN] Postgres schema comparison.

2005-03-07 Thread John DeSoi
you can use to determine if there is a mismatch. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(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] [ADMIN] Postgres schema comparison.

2005-03-07 Thread John DeSoi
if you startup psql with the -E option it will show you all the SQL it is using to run the \d command. It should be fairly easy to get the strings you need from the results of running a similar query. The psql source is a good place to look also. John DeSoi, Ph.D. http://pgedit.com/ Power Tools

[SQL] SQL query help?

2005-03-07 Thread John McGough
SELECT Count(*) FROM Work WHERE (UserID='user1' AND MAX(Finished)=0) Work:- +---+---++-+--+ | ID | JobID | UserID | Finished | Comment | +---+---++-+--+ | 1 | 1| user1 | 0 | ...| | 2 | 1|

Re: [SQL] pl/pgsql problem with return types

2005-03-11 Thread John DeSoi
On Mar 11, 2005, at 5:54 AM, Juris Zeltins wrote: FOR P IN select pageid from pages This way you are only getting the pageid column. I think what you want is FOR P in select * from pages so that P contains the complete pages record. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for

Re: [SQL] Question on triggers and plpgsql

2005-04-08 Thread John DeSoi
ng to happen? I did not notice any problems. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Question on triggers and plpgsql

2005-04-08 Thread John DeSoi
. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [SQL] Question on triggers and plpgsql

2005-04-08 Thread John DeSoi
ively expensive (since the triggering event state has to be saved and then recalled) so I could see making that tradeoff if performance is critical. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 5: Have

Re: [SQL] getting count for a specific querry

2005-04-09 Thread John DeSoi
table and column information from a cursor. If I fetch from a cursor, the table OID and column number values are 0 in the row description. If I execute the same query directly without a cursor, the row description has the correct values for table OID and column number. J

Re: [SQL] getting count for a specific querry

2005-04-09 Thread John DeSoi
thout changing the rows you are viewing. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so

Re: [SQL] php wrapper

2005-04-24 Thread John DeSoi
f by wrapper you mean an abstraction to support other databases, what other systems do you need to support? PEAR seems to have a nice databases abstraction layer (DB.php). Drupal uses this to support PostgreSQL and MySQL. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---

Re: [SQL] How do I quit in the middle of a SQL script?

2005-05-20 Thread John DeSoi
t the following large chunk is supposed to do) Can I do that? Put this at the start of the file to make psql stop if there is an error: \set ON_ERROR_STOP 1 And is it a good idea to add arbitrary code to the database dump sql script? No problem if you know what you are doing and/or have good backups :)

Re: [SQL] Error on dynamic code.

2005-07-15 Thread John DeSoi
to use a cursor with OPEN-FOR- EXECUTE, as described in Section 35.8.2. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[SQL] funstions for parsing words

2005-07-19 Thread John Kopanas
-- "Hello" "World" "Goodbye" "I" "Like" "Candy" Is anything like this possible? Thanks alot. Your Friend, John Kopanas ---(end of broadcast)--- TIP 1: if posting/reading through Usen

Re: [SQL] echo/printf function in plpgsql

2005-07-19 Thread John DeSoi
27;, t; If I recall correctly, the values to be inserted into the format string can only be variables, not expressions. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 9: In versions below 8.0, the plan

Re: [SQL] incorrect syntax for 'plpgsql' function to test boolean values

2005-08-06 Thread John DeSoi
e))" PL/pgSQL function "trigger_insert_update_registration_and_attendance" line 13 at if What is wrong with my syntax above? Too much C programming :). You just want a single equal sign. select true = true; ?column? -- t (1 row) John DeSoi, Ph.D. http://pgedit.com

Re: [SQL] Number of rows in a cursor ?

2005-08-24 Thread John DeSoi
/interactive/sql-move.html John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] Need help with 'unique parents' constraint

2005-09-11 Thread John Hasler
Greg Sabino Mullane writes: > Not just old-fashioned, [having only one mother is] the biological law! I see you aren't up on current research. -- John Hasler [EMAIL PROTECTED] Elmwood, WI USA ---(end of broadcast)--- TIP 4: Have you sear

  1   2   3   >