[SQL] How to use function PointN?

2007-05-07 Thread Nemo Terry
select PointN(envelope(polyline),1) from highway; return null,why? _ 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com ---(end of broadcast)--- TIP 1: if posting/reading through U

[SQL] syntax error in "createdb"

2007-05-07 Thread kannan kk
hello when i try to execute createdb,psql,pg_dump,pg_restore and similar postgre commands , i get syntax at or near 'createdb' and similar to other statements. plz help me wht would be the problem. - Office firewalls, cyber cafes, college lab

Re: [SQL] syntax error in "createdb"

2007-05-07 Thread Phillip Smith
Where are you trying to execute these commands? They should be run at the command line as they are 'standalone' programs, not SQL commands to be run in an SQL session. On Mon, 2007-05-07 at 10:01 +0100, kannan kk wrote: > hello > > when i try to execute createdb,psql,pg_dump,pg_restore and simil

Re: [SQL] Sequence vs. Index Scan

2007-05-07 Thread Andrew Sullivan
On Sun, May 06, 2007 at 01:45:54PM -0500, Aaron Bono wrote: > Then I inserted 150 more records in the slow schema and pow - it started > working like the fast schema. > > So my conclusion is that the function is being treated as volatile even > though it is stable because the number of records i

Re: [SQL] How to use function PointN?

2007-05-07 Thread Michael Fuhr
On Mon, May 07, 2007 at 04:07:00PM +0800, Nemo Terry wrote: > select PointN(envelope(polyline),1) from highway; > return null,why? PointN is a PostGIS function; you might get more help on the postgis-users mailing list. http://postgis.refractions.net/mailman/listinfo/postgis-users See also the P

Re: [SQL] Sequence vs. Index Scan

2007-05-07 Thread Tom Lane
Andrew Sullivan <[EMAIL PROTECTED]> writes: > On Sun, May 06, 2007 at 01:45:54PM -0500, Aaron Bono wrote: >> So my conclusion is that the function is being treated as volatile even >> though it is stable because the number of records is small. > I don't think that's the issue. If this is depende

[SQL] Temporal Table Relations and Referential Integrity

2007-05-07 Thread Richard Broersma Jr
In non-temporal tables, changes to the primary key of a Parent table and record deletions can be cascaded to a related Child table using "REFERENCES Parent( Parent_code ) ON DELETE CASCADE ON UPDATE CASCADE," However, since temporal UPDATEs and DELETEs do not behave in the same way as they do i

Re: [SQL] Sequence vs. Index Scan

2007-05-07 Thread Aaron Bono
On 5/7/07, Tom Lane <[EMAIL PROTECTED]> wrote: Andrew Sullivan <[EMAIL PROTECTED]> writes: > On Sun, May 06, 2007 at 01:45:54PM -0500, Aaron Bono wrote: >> So my conclusion is that the function is being treated as volatile even >> though it is stable because the number of records is small. > I

Re: [SQL] Dynamic prepare possible in plpgsql?

2007-05-07 Thread Jim Nasby
On May 1, 2007, at 12:16 PM, Jonah H. Harris wrote: On 5/1/07, Collin Peters <[EMAIL PROTECTED]> wrote: Is it faster to use PREPARE for the various INSERT statements inside a plpgsql function? Perhaps I am wrong and it does its PREPARE work when the function is parsed. IIRC, PLpgSQL automag

[SQL] Error: Input string was not in a correct format

2007-05-07 Thread Rommel the iCeMAn
Hi guys, I'm trying to call a function from my .NET project and I am getting this error: "Input string was not in a correct format". I have checked to make sure that I am not mismatching my parameters. Is there a way that I can see the actual SQL query that is being sent to postgresql? Once I can

Re: [SQL] Error: Input string was not in a correct format

2007-05-07 Thread Rommel the iCeMAn
Ok guys, Sorry for the false alarm. I solved the problem. When I define my parameters in .NET in the order they are listed in pgAdmin, the function call works. If I use the order that they are listed in Visual Studio's Server Explorer, the function call fails. It appears Visual Studio's Server exp

Re: [SQL] Error: Input string was not in a correct format

2007-05-07 Thread Michael Glaesemann
On May 7, 2007, at 18:17 , Rommel the iCeMAn wrote: Is there a way that I can see the actual SQL query that is being sent to postgresql? From within PostgreSQL you can put the SQL queries in the logs. http://www.postgresql.org/docs/8.2/interactive/runtime-config- logging.html#RUNTIME-CONFIG

Re: [SQL] Error: Input string was not in a correct format

2007-05-07 Thread Tom Lane
"Rommel the iCeMAn" <[EMAIL PROTECTED]> writes: > I'm trying to call a function from my .NET project and I am getting this > error: "Input string was not in a correct format". I have checked to make > sure that I am not mismatching my parameters. Is there a way that I can see > the actual SQL query

[SQL] Query RE using COPY

2007-05-07 Thread Paul Lambert
I use the COPY command to load data from a file into tables in my database. The following is an example done in psql: COPY deals_temp_load FROM 'c:/temp/autodrs_deals.txt' WITH DELIMITER AS '^' QUOTE '\f' CSV HEADER; If a column is added to the table but has not been added to the extracts wh

Re: [SQL] Query RE using COPY

2007-05-07 Thread Jonah H. Harris
COPY mytbl (col1, col2, col3, col4, col6) FROM 'myfile.txt' WITH DELIMITER AS '^' QUOTE '\f' CSV HEADER; On 5/7/07, Paul Lambert <[EMAIL PROTECTED]> wrote: I use the COPY command to load data from a file into tables in my database. The following is an example done in psql: COPY deals_t

Re: [SQL] Query RE using COPY

2007-05-07 Thread Paul Lambert
Jonah H. Harris wrote: COPY mytbl (col1, col2, col3, col4, col6) FROM 'myfile.txt' WITH DELIMITER AS '^' QUOTE '\f' CSV HEADER; I would rather not do it this way as I use the same load script at all customer sites where the extracts and requirements may vary. I.e. one customer may not use t

Re: [SQL] Query RE using COPY

2007-05-07 Thread Phillip Smith
Can you modify the 'extract' and make the extra column "\n" which is the null escape? That would be the only other option. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Lambert Sent: Tuesday, 8 May 2007 12:44 To: pgsql-sql@postgresql.org Subject:

Re: [SQL] Query RE using COPY

2007-05-07 Thread Paul Lambert
Phillip Smith wrote: Can you modify the 'extract' and make the extra column "\n" which is the null escape? That would be the only other option. Right now the software that does the extracts is developed by our applications developers, but I'll be taking that onto my side in the near future