| From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
|---|---|
| To: | Hans-Jürgen Schönig <hs(at)cybertec(dot)at> |
| Cc: | <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Re: Re: open and closed paths ... |
| Date: | 2001-04-09 16:55:06 |
| Message-ID: | Pine.LNX.4.30.0104091853520.1255-100000@peter.localdomain |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Hans-Jürgen Schönig writes:
> The only problem left is the correct syntax of the command when using [].
> I've tried some versions but it did not work.
> Maybe Tom can include an example into the docs.
>
> Hans
>
>
> shop=# INSERT INTO temppath(fieldname) VALUES '((1,3), (4,12))';
> ERROR: parser: parse error at or near "'"
Should be VALUES ('((1,3), (4,12))'); The outer parentheses belong to the
INSERT command, the quotes delimit the data literal, whatever is inside
the quotes is the data type's business.
> shop=# INSERT INTO temppath(fieldname) VALUES ((1,3), (4,12));
> ERROR: parser: parse error at or near ","
> shop=# INSERT INTO temppath(fieldname) VALUES ('(1,3), (4,12)');
> INSERT 51947 1
> shop=# INSERT INTO temppath(fieldname) VALUES ['(1,3), (4,12)'];
> ERROR: parser: parse error at or near "["
> shop=# INSERT INTO temppath(fieldname) VALUES '[(1,3), (4,12)]';
> ERROR: parser: parse error at or near "'"
> shop=# INSERT INTO temppath(fieldname) VALUES '[(1,3), (4,12)]'::path;
> ERROR: parser: parse error at or near "'"
> shop=# INSERT INTO temppath(fieldname) VALUES ['(1,3), (4,12)']::path;
> ERROR: parser: parse error at or near "["
--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ross J. Reedstrom | 2001-04-09 17:02:21 | Re: Casting numeric to text |
| Previous Message | Peter Eisentraut | 2001-04-09 16:53:13 | Re: Casting numeric to text |